You can now ignore by host

This commit is contained in:
Luke Rogers 2012-03-31 12:52:51 +13:00
parent a69e7fa510
commit 22ba86ec5a

View file

@ -30,7 +30,7 @@ def ignoresieve(bot, input, func, type, args):
# don't block input to event hooks # don't block input to event hooks
if type == "event": if type == "event":
return input return input
if is_ignored(input.chan) or is_ignored(input.nick): if is_ignored(input.chan) or is_ignored(input.nick) or is_ignored(input.host):
if input.command == "PRIVMSG" and input.lastparam[1:] == "unignore": if input.command == "PRIVMSG" and input.lastparam[1:] == "unignore":
return input return input
else: else:
@ -40,16 +40,16 @@ def ignoresieve(bot, input, func, type, args):
@hook.command(autohelp=False) @hook.command(autohelp=False)
def ignored(inp, bot=None): def ignored(inp, bot=None):
".ignored -- Lists ignored channels/users." ".ignored -- Lists ignored channels/users/hosts."
if ignorelist: if ignorelist:
return "Ignored channels/users are: %s" % ", ".join(ignorelist) return "Ignored channels/users/hosts are: %s" % ", ".join(ignorelist)
else: else:
return "No channels/users are currently ignored." return "No channels/users/hosts are currently ignored."
@hook.command(adminonly=True) @hook.command(adminonly=True)
def ignore(inp, input=None, notice=None): def ignore(inp, input=None, notice=None):
".ignore <channel/user> -- Makes the bot ignore <channel/user>." ".ignore <channels/users/hosts> -- Makes the bot ignore someone."
target = inp target = inp
if is_ignored(target): if is_ignored(target):
@ -61,7 +61,7 @@ def ignore(inp, input=None, notice=None):
@hook.command(adminonly=True) @hook.command(adminonly=True)
def unignore(inp, input=None, notice=None): def unignore(inp, input=None, notice=None):
".unignore <channel/user> -- Makes the bot listen to <channel/user>." ".unignore channels/users/hosts -- Makes the bot listen to someone."
target = inp target = inp
if is_ignored(target): if is_ignored(target):