On second thought (thanks jemfinch) making insults to channels without

knowing who is insulting can be used dangerously.  In practice I have
seen this command only used among friends or when someone is bored and
wants to see the random string produced.
This commit is contained in:
Grant Bowman 2004-09-06 17:54:44 +00:00
parent 87a532374e
commit a96229de1c
1 changed files with 4 additions and 6 deletions

View File

@ -166,20 +166,18 @@ class Insult(callbacks.Privmsg):
an, adj1, amount, adj2, noun)
def insult(self, irc, msg, args):
"""[<channel>] [<target>]
"""[<target>]
Reply optionally directed at a random string, person,
object, etc. <channel> is only necessary if the message isn't sent
in the channel itself.
object, etc.
"""
tempinsult = self._buildInsult()
channel = privmsgs.getChannel(msg, args)
victim = privmsgs.getArgs(args, required=0, optional=1)
if not victim:
irc.reply(tempinsult, to=channel, prefixName=False)
irc.reply(tempinsult, prefixName=False)
else:
irc.reply('%s - %s ' % (victim, tempinsult),
to=channel, prefixName=False)
prefixName=False)
Class = Insult