a few fixes

This commit is contained in:
Luke Rogers 2012-03-23 07:54:57 +13:00
parent d74a57d387
commit d6e2dc8f85

View file

@ -21,9 +21,8 @@ def is_muted(target):
@hook.sieve @hook.sieve
def mutesieve(bot, input, func, type, args): def mutesieve(bot, input, func, type, args):
# if type == "event": if type == "event":
# print "type: event, dying" return input
# return input
if is_muted(input.chan) or is_muted(input.nick): if is_muted(input.chan) or is_muted(input.nick):
if input.command == "PRIVMSG" and input.lastparam[1:] == "unmute": if input.command == "PRIVMSG" and input.lastparam[1:] == "unmute":
return input return input
@ -35,8 +34,11 @@ def mutesieve(bot, input, func, type, args):
@hook.command("muted") @hook.command("muted")
@hook.command(autohelp=False) @hook.command(autohelp=False)
def listmuted(inp, bot=None): def listmuted(inp, bot=None):
".muted -- Lists the muted users/channels." ".listmuted -- Lists the muted users/channels."
return "Muted users/channels are: " + ", ".join(muted) if muted:
return "Muted users/channels are: " + ", ".join(muted)
else:
return "No users are currently muted."
@hook.command(adminonly=True) @hook.command(adminonly=True)