made set/channelset settings consistent.
This commit is contained in:
parent
3a7481315d
commit
bdf21643a3
3 changed files with 5 additions and 5 deletions
|
@ -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()
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue