aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2018-12-06 12:13:59 +0000
committerGravatar jesopo2018-12-06 12:13:59 +0000
commit3e0bd3ee857d90b218bbbaf5f913802e308e8a2d (patch)
tree2cd4ac989fb68836860e1cf4263efa2f23508d7f
parent'X-GitHub-Event' -> 'X-Github-Event' now that we .title() header keys (diff)
signature
Add 'bot-channel' config in bot.conf.example and use it, if present, in
bot_channel.py
-rw-r--r--bot.conf.example3
-rw-r--r--modules/bot_channel.py5
2 files changed, 6 insertions, 2 deletions
diff --git a/bot.conf.example b/bot.conf.example
index 28be3183..6e16d8a9 100644
--- a/bot.conf.example
+++ b/bot.conf.example
@@ -7,6 +7,9 @@ tls-certificate =
tls-api-key =
tls-api-certificate =
+# the default channel BitBot automatically joins
+bot-channel =
+
# https://openweathermap.org/api
openweathermap-api-key =
diff --git a/modules/bot_channel.py b/modules/bot_channel.py
index 2fe4e1fd..6f0f4d04 100644
--- a/modules/bot_channel.py
+++ b/modules/bot_channel.py
@@ -5,5 +5,6 @@ from src import ModuleManager, utils
class Module(ModuleManager.BaseModule):
@utils.hook("received.numeric.001")
def do_join(self, event):
- event["server"].send_join(event["server"].get_setting("bot-channel",
- "#bitbot"))
+ bot_channel = event["server"].get_setting("bot-channel",
+ self.bot.config.get("bot-channel", "#bitbot"))
+ event["server"].send_join(bot_channel)