aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar jesopo2016-05-01 22:47:59 +0100
committerGravatar jesopo2016-05-01 22:47:59 +0100
commitbdf21643a3825c6f881275aa05a44dbe6e98ac55 (patch)
tree208e0d7c691d09e82775333c164fe897410c19ac
parentadded a command to quotes.py to get a random quote from a category. (diff)
made set/channelset settings consistent.
-rw-r--r--modules/karma.py4
-rw-r--r--modules/quotes.py2
-rw-r--r--modules/youtube.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/modules/karma.py b/modules/karma.py
index d57a3922..3fe46add 100644
--- a/modules/karma.py
+++ b/modules/karma.py
@@ -17,7 +17,7 @@ class Module(object):
def boot_done(self, event):
self.bot.events.on("postboot").on("configure").on(
- "channelset").call(setting="karmaverbose",
+ "channelset").call(setting="karma-verbose",
help="Disable/Enable automatically responding to karma changes",
validate=Utils.bool_or_none)
@@ -27,7 +27,7 @@ class Module(object):
def channel_message(self, event):
match = re.match(REGEX_KARMA, event["message"].strip())
if match:
- verbose = event["channel"].get_setting("karmaverbose", False)
+ verbose = event["channel"].get_setting("karma-verbose", False)
if not event["user"].last_karma or (time.time()-event["user"
].last_karma) >= KARMA_DELAY_SECONDS:
target = match.group(1).lower().strip()
diff --git a/modules/quotes.py b/modules/quotes.py
index 58f4075e..d09bba58 100644
--- a/modules/quotes.py
+++ b/modules/quotes.py
@@ -30,7 +30,7 @@ class Module(object):
if category and quote:
setting = "quotes-%s" % category
quotes = event["server"].get_setting(setting, [])
- quotes.append([event["user"].name, time.time(), quote])
+ quotes.append([event["user"].name, int(time.time()), quote])
event["server"].set_setting(setting, quotes)
event["stdout"].write("Quote added")
else:
diff --git a/modules/youtube.py b/modules/youtube.py
index e14f9118..d4567a34 100644
--- a/modules/youtube.py
+++ b/modules/youtube.py
@@ -28,7 +28,7 @@ class Module(object):
def boot_done(self, event):
self.bot.events.on("postboot").on("configure").on(
- "channelset").call(setting="autoyoutube",
+ "channelset").call(setting="auto-youtube",
help="Disable/Enable automatically getting info from youtube URLs",
validate=Utils.bool_or_none)
@@ -99,7 +99,7 @@ class Module(object):
def channel_message(self, event):
match = re.search(REGEX_YOUTUBE, event["message"])
- if match and event["channel"].get_setting("autoyoutube", False):
+ if match and event["channel"].get_setting("auto-youtube", False):
youtube_id = match.group(1)
video_details = self.video_details(youtube_id)
if video_details: