diff --git a/src/User.py b/src/User.py index e59881169..d8b46d878 100755 --- a/src/User.py +++ b/src/User.py @@ -191,17 +191,23 @@ class User(callbacks.Privmsg): irc.replySuccess() def addhostmask(self, irc, msg, args): - """ [] + """[] [] [] 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. + other user. If is not given, it defaults to your current + hostmask. If is not given, it defaults to your currently + identified name. """ - (name, hostmask, password) = privmsgs.getArgs(args, 2, 1) + (name, hostmask, password) = privmsgs.getArgs(args, 0, 3) self._checkNotChannel(irc, msg, password) + if not hostmask: + hostmask = msg.prefix + if not name: + name = msg.prefix if not ircutils.isUserHostmask(hostmask): irc.error('That\'s not a valid hostmask. Make sure your hostmask ' 'includes a nick, then an exclamation point (!), then '