From c0a6e9bc3bd13edc9b3af8de1bc6569c8cdc8040 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Fri, 20 Mar 2015 00:25:16 -0400 Subject: [PATCH] modify fgoat to use all the arguments given if the first one isn't a nick --- modules/wolfgame.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 51e2fea..07b0e09 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -2739,11 +2739,15 @@ def goat(cli, nick, chan, rest): @cmd("fgoat", admin_only=True) def fgoat(cli, nick, chan, rest): """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']) - cli.msg(chan, '\x02{}\x02\'s goat walks by and {} \x02{}\x02.'.format( - nick, goatact, rest)) + cli.msg(chan, '\x02{}\x02\'s goat walks by and {} \x02{}\x02.'.format(nick, goatact, togoat)) @hook("nick") def on_nick(cli, oldnick, nick):