From f2df22ef1a3b396a83841cd2337e3f7a750c3419 Mon Sep 17 00:00:00 2001 From: James Vega Date: Wed, 8 Apr 2009 16:55:40 -0400 Subject: [PATCH] User: Add private constraint to hostmask.add since a password may be given Signed-off-by: James Vega --- plugins/User/plugin.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/User/plugin.py b/plugins/User/plugin.py index 3f8c765a6..ad04768aa 100644 --- a/plugins/User/plugin.py +++ b/plugins/User/plugin.py @@ -279,12 +279,12 @@ class User(callbacks.Plugin): Adds the hostmask to the user specified by . The may only be required if the user is not recognized by - hostmask. If you include the parameter, this message - must be sent to the bot privately (not on a channel). - is also not required if an owner user is giving the command on - behalf of some other user. If is not given, it defaults - to your current hostmask. If is not given, it defaults to - your currently identified name. + hostmask. is also not required if an owner user is + giving the command on behalf of some other user. If is + not given, it defaults to your current hostmask. If is not + given, it defaults to your currently identified name. This message + must be sent to the bot privately (not on a channel) since it may + contain a password. """ if not hostmask: hostmask = msg.prefix @@ -323,8 +323,8 @@ class User(callbacks.Plugin): except ValueError, e: irc.error(str(e), Raise=True) irc.replySuccess() - add = wrap(add, [first('otherUser', 'user'), optional('something'), - additional('something', '')]) + add = wrap(add, ['private', first('otherUser', 'user'), + optional('something'), additional('something', '')]) def remove(self, irc, msg, args, user, hostmask, password): """ [] @@ -332,9 +332,9 @@ class User(callbacks.Plugin): Removes the hostmask from the record of the user specified by . If the hostmask given is 'all' then all hostmasks will be removed. The may only be required if - the user is not recognized by his hostmask. If you include the - parameter, this message must be sent to the bot - privately (not on a channel). + the user is not recognized by his hostmask. This message must be + sent to the bot privately (not on a channel) since it may contain a + password. """ if not user.checkPassword(password) and \ not user.checkHostmask(msg.prefix):