allow nick blacklisting

This commit is contained in:
Ryan Hitchman 2014-04-24 14:15:58 -07:00
parent a5dd272767
commit 4c3cb0c9b7
2 changed files with 7 additions and 4 deletions

View File

@ -19,18 +19,18 @@ class Input(dict):
def reply(msg):
if chan == nick: # PMs don't need prefixes
conn.msg(chan, msg)
self.say(msg)
else:
conn.msg(chan, nick + ': ' + msg)
self.say(nick + ': ' + msg)
def pm(msg):
def pm(msg, nick=nick):
conn.msg(nick, msg)
def set_nick(nick):
conn.set_nick(nick)
def me(msg):
conn.msg(chan, "\x01%s %s\x01" % ("ACTION", msg))
self.say("\x01%s %s\x01" % ("ACTION", msg))
def notice(msg):
conn.cmd('NOTICE', [nick, msg])

View File

@ -40,6 +40,9 @@ def sieve_suite(bot, input, func, kind, args):
if 'blacklist' in acl:
if func.__name__ in acl['whitelist']:
return None
if 'blacklist-nicks' in acl:
if input.nick.lower() in acl['blacklist-nicks']:
return None
if args.get('adminonly', False):
admins = bot.config.get('admins', [])