aboutsummaryrefslogtreecommitdiff
path: root/modules/auto_mode.py
diff options
context:
space:
mode:
authorGravatar Evelyn2016-04-10 17:40:58 +0100
committerGravatar Evelyn2016-04-10 17:40:58 +0100
commit190d42fbb527a8710a8e710dc3260ad8054a9d1d (patch)
treed69cfbac8105ff18230b9828bec1b412e42db7ea /modules/auto_mode.py
parentadded a confirmation of message save to in.py. (diff)
signature
simpler boolean channel settings
Diffstat (limited to 'modules/auto_mode.py')
-rw-r--r--modules/auto_mode.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/auto_mode.py b/modules/auto_mode.py
index b369bcbd..2d7370a4 100644
--- a/modules/auto_mode.py
+++ b/modules/auto_mode.py
@@ -1,4 +1,4 @@
-
+import Utils
class Module(object):
def __init__(self, bot):
@@ -7,13 +7,11 @@ class Module(object):
bot.events.on("channel").on("mode").hook(self.on_mode)
bot.events.on("received").on("join").hook(self.on_join)
- def validate_setchannel(self, s):
- return s.lower() == "true"
def boot_done(self, event):
self.bot.events.on("postboot").on("configure").on(
"channelset").call(setting="automode",
help="Disable/Enable automode",
- validate=self.validate_setchannel)
+ validate=Utils.bool_or_none)
def on_mode(self, event):
if event["channel"].get_setting("automode", False):