modify fgoat to use all the arguments given if the first one isn't a nick

This commit is contained in:
jacob1 2015-03-20 00:25:16 -04:00
parent 0678e097d6
commit c0a6e9bc3b

View File

@ -2739,11 +2739,15 @@ def goat(cli, nick, chan, rest):
@cmd("fgoat", admin_only=True) @cmd("fgoat", admin_only=True)
def fgoat(cli, nick, chan, rest): def fgoat(cli, nick, chan, rest):
"""Forces a goat to interact with anyone or anything, without limitations.""" """Forces a goat to interact with anyone or anything, without limitations."""
rest = rest.split(' ')[0].strip() nick_ = rest.split(' ')[0].strip()
ul = list(var.USERS.keys())
if nick_.lower() in [x.lower() for x in ul]:
togoat = nick_
else:
togoat = rest
goatact = random.choice(['kicks', 'headbutts']) goatact = random.choice(['kicks', 'headbutts'])
cli.msg(chan, '\x02{}\x02\'s goat walks by and {} \x02{}\x02.'.format( cli.msg(chan, '\x02{}\x02\'s goat walks by and {} \x02{}\x02.'.format(nick, goatact, togoat))
nick, goatact, rest))
@hook("nick") @hook("nick")
def on_nick(cli, oldnick, nick): def on_nick(cli, oldnick, nick):