mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-06 17:44:09 +01:00
User: Add private constraint to hostmask.add since a password may be given
Signed-off-by: James Vega <jamessan@users.sourceforge.net>
This commit is contained in:
parent
d6f6f32219
commit
f2df22ef1a
@ -279,12 +279,12 @@ class User(callbacks.Plugin):
|
|||||||
|
|
||||||
Adds the hostmask <hostmask> to the user specified by <name>. The
|
Adds the hostmask <hostmask> to the user specified by <name>. The
|
||||||
<password> may only be required if the user is not recognized by
|
<password> may only be required if the user is not recognized by
|
||||||
hostmask. If you include the <password> parameter, this message
|
hostmask. <password> is also not required if an owner user is
|
||||||
must be sent to the bot privately (not on a channel). <password>
|
giving the command on behalf of some other user. If <hostmask> is
|
||||||
is also not required if an owner user is giving the command on
|
not given, it defaults to your current hostmask. If <name> is not
|
||||||
behalf of some other user. If <hostmask> is not given, it defaults
|
given, it defaults to your currently identified name. This message
|
||||||
to your current hostmask. If <name> is not given, it defaults to
|
must be sent to the bot privately (not on a channel) since it may
|
||||||
your currently identified name.
|
contain a password.
|
||||||
"""
|
"""
|
||||||
if not hostmask:
|
if not hostmask:
|
||||||
hostmask = msg.prefix
|
hostmask = msg.prefix
|
||||||
@ -323,8 +323,8 @@ class User(callbacks.Plugin):
|
|||||||
except ValueError, e:
|
except ValueError, e:
|
||||||
irc.error(str(e), Raise=True)
|
irc.error(str(e), Raise=True)
|
||||||
irc.replySuccess()
|
irc.replySuccess()
|
||||||
add = wrap(add, [first('otherUser', 'user'), optional('something'),
|
add = wrap(add, ['private', first('otherUser', 'user'),
|
||||||
additional('something', '')])
|
optional('something'), additional('something', '')])
|
||||||
|
|
||||||
def remove(self, irc, msg, args, user, hostmask, password):
|
def remove(self, irc, msg, args, user, hostmask, password):
|
||||||
"""<name> <hostmask> [<password>]
|
"""<name> <hostmask> [<password>]
|
||||||
@ -332,9 +332,9 @@ class User(callbacks.Plugin):
|
|||||||
Removes the hostmask <hostmask> from the record of the user
|
Removes the hostmask <hostmask> from the record of the user
|
||||||
specified by <name>. If the hostmask given is 'all' then all
|
specified by <name>. If the hostmask given is 'all' then all
|
||||||
hostmasks will be removed. The <password> may only be required if
|
hostmasks will be removed. The <password> may only be required if
|
||||||
the user is not recognized by his hostmask. If you include the
|
the user is not recognized by his hostmask. This message must be
|
||||||
<password> parameter, this message must be sent to the bot
|
sent to the bot privately (not on a channel) since it may contain a
|
||||||
privately (not on a channel).
|
password.
|
||||||
"""
|
"""
|
||||||
if not user.checkPassword(password) and \
|
if not user.checkPassword(password) and \
|
||||||
not user.checkHostmask(msg.prefix):
|
not user.checkHostmask(msg.prefix):
|
||||||
|
Loading…
Reference in New Issue
Block a user