From d6b1604a1b054f4886d3e8d20bc9808c24174f40 Mon Sep 17 00:00:00 2001 From: Sfan5 Date: Sun, 22 Dec 2013 00:06:44 +0100 Subject: [PATCH] [Tell] Don't allow people to tell themselves/the bot anything --- tell.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tell.py b/tell.py index 94d5f98..6d48bee 100755 --- a/tell.py +++ b/tell.py @@ -21,6 +21,10 @@ def tell(phenny, input): return phenny.reply("Need a nickname...") if not ' ' in arg: return phenny.reply("...and text") + if target.lower() == teller.lower(): + return phenny.say("You can tell that to yourself") + if target.lower() == phenny.nick.lower(): + return phenny.say("I'm not dumb, you know?") teller = input.nick target = arg.split(" ")[0] text = " ".join(arg.split(" ")[1:]) @@ -37,8 +41,8 @@ def tell(phenny, input): response = "I'll pass that on when %s is around" % target rand = random.random() - if rand > 0.9999: response = "yeah, yeah" - elif rand > 0.999: response = "yeah, sure, whatever" + if rand > 0.999: response = "yeah, yeah" + elif rand > 0.99: response = "yeah, sure, whatever" phenny.reply(response)