Skip to content

Commit

Permalink
Merge pull request sopel-irc#302 from Preston4tw/master
Browse files Browse the repository at this point in the history
[adminchannel] Change .tmask and .showmask to treat channel name as case insensitive.
  • Loading branch information
Ari Koivula committed Jul 15, 2013
2 parents b45dc84 + 9efa252 commit 6bfb2a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions adminchannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def set_mask(bot, trigger):
if not bot.db:
bot.say("I'm afraid I can't do that.")
else:
bot.db.preferences.update(trigger.sender, {'topic_mask': trigger.group(2)})
bot.db.preferences.update(trigger.sender.lower(), {'topic_mask': trigger.group(2)})
bot.say("Gotcha, " + trigger.nick)


Expand All @@ -319,8 +319,8 @@ def show_mask(bot, trigger):
return
if not bot.db:
bot.say("I'm afraid I can't do that.")
elif trigger.sender in bot.db.preferences:
bot.say(bot.db.preferences.get(trigger.sender, 'topic_mask'))
elif trigger.sender.lower() in bot.db.preferences:
bot.say(bot.db.preferences.get(trigger.sender.lower(), 'topic_mask'))
else:
bot.say("%s")

Expand Down

0 comments on commit 6bfb2a8

Please sign in to comment.