Model Admin's ignore help after Channel's.

Closes: Sf#3054919
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
James Vega 2010-08-29 10:26:59 -04:00
parent e7ef97e529
commit 25b987cc58
1 changed files with 7 additions and 9 deletions

View File

@ -298,12 +298,10 @@ class Admin(callbacks.Plugin):
def add(self, irc, msg, args, hostmask, expires): def add(self, irc, msg, args, hostmask, expires):
"""<hostmask|nick> [<expires>] """<hostmask|nick> [<expires>]
Ignores <hostmask> or, if a nick is given, ignores whatever This will set a persistent ignore on <hostmask> or the hostmask
hostmask that nick is currently using. <expires> is a "seconds currently associated with <nick>. <expires> is an optional argument
from now" value that determines when the ignore will expire; if, specifying when (in "seconds from now") the ignore will expire; if
for instance, you wish for the ignore to expire in an hour, you it isn't given, the ignore will never automatically expire.
could give an <expires> of 3600. If no <expires> is given, the
ignore will never automatically expire.
""" """
ircdb.ignores.add(hostmask, expires) ircdb.ignores.add(hostmask, expires)
irc.replySuccess() irc.replySuccess()
@ -312,8 +310,8 @@ class Admin(callbacks.Plugin):
def remove(self, irc, msg, args, hostmask): def remove(self, irc, msg, args, hostmask):
"""<hostmask|nick> """<hostmask|nick>
Ignores <hostmask> or, if a nick is given, ignores whatever This will remove the persistent ignore on <hostmask> or the
hostmask that nick is currently using. hostmask currently associated with <nick>.
""" """
try: try:
ircdb.ignores.remove(hostmask) ircdb.ignores.remove(hostmask)
@ -325,7 +323,7 @@ class Admin(callbacks.Plugin):
def list(self, irc, msg, args): def list(self, irc, msg, args):
"""takes no arguments """takes no arguments
Returns the hostmasks currently being globally ignored. Lists the hostmasks that the bot is ignoring.
""" """
# XXX Add the expirations. # XXX Add the expirations.
if ircdb.ignores.hostmasks: if ircdb.ignores.hostmasks: