Merge pull request #957 from GLolol/seen/self-nick

Seen: insert a specific message when calling seen/any on the bot
This commit is contained in:
Valentin Lorentz 2014-12-20 07:55:52 +01:00
commit 828eaaad06

View File

@ -233,6 +233,9 @@ class Seen(callbacks.Plugin):
saying. <channel> is only necessary if the message isn't sent on the
channel itself. <nick> may contain * as a wildcard.
"""
if name and ircutils.strEqual(name, irc.nick):
irc.reply(_("You've found me!"))
return
if msg.nick not in irc.state.channels[channel].users:
irc.error(format('You must be in %s to use this command.', channel))
return
@ -250,6 +253,9 @@ class Seen(callbacks.Plugin):
and returns the last time user was active in <channel>. <channel> is
only necessary if the message isn't sent on the channel itself.
"""
if name and ircutils.strEqual(name, irc.nick):
irc.reply(_("You've found me!"))
return
if msg.nick not in irc.state.channels[channel].users:
irc.error(format('You must be in %s to use this command.', channel))
return