diff options
| author | 2018-09-12 15:44:50 +0100 | |
|---|---|---|
| committer | 2018-09-12 15:44:50 +0100 | |
| commit | 6db97c7df5833c1112571bb4fe5cf842a76d585b (patch) | |
| tree | a00aefe9ef7f51871f65aadee06d3c82722d96b0 /modules/bot_channel.py | |
| parent | Add missing argument to Utils._multi_replace calls in irc_lower (diff) | |
| signature | ||
join.py -> bot_channel.py, make the bot channel (default #bitbot) configurable
Diffstat (limited to 'modules/bot_channel.py')
| -rw-r--r-- | modules/bot_channel.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/modules/bot_channel.py b/modules/bot_channel.py new file mode 100644 index 00000000..fc4fe813 --- /dev/null +++ b/modules/bot_channel.py @@ -0,0 +1,12 @@ + + +class Module(object): + def __init__(self, bot, events, exports): + events.on("received").on("numeric").on("001").hook(self.do_join) + + exports.add("serverset", {"setting": "bot-channel", + "help": "Set main channel"}) + + def do_join(self, event): + event["server"].send_join(event["server"].get_setting("bot-channel", + "#bitbot")) |
