made set/channelset settings consistent.

This commit is contained in:
jesopo 2016-05-01 22:47:59 +01:00
parent 3a7481315d
commit bdf21643a3
No known key found for this signature in database
GPG key ID: 0BBDEB2AEFCFFCB3
3 changed files with 5 additions and 5 deletions

View file

@ -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()

View file

@ -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:

View file

@ -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: