about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tooter.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tooter.py b/tooter.py
index 7b900b3..4e98182 100644
--- a/tooter.py
+++ b/tooter.py
@@ -36,7 +36,8 @@ def think(line):
     words = line.params[0].split(" ")
 
     if len(words) > 0 and line.hostmask.nickname != config["botnick"]:
-        if words[0] == "!toot":
+        cmd = words[0].lower()
+        if cmd == "!toot":
             status = emoji.emojize(" ".join(words[1:]), use_aliases=True)
             if chan == "#team":
                 res = tildeteam.toot(status)
@@ -44,9 +45,9 @@ def think(line):
                 res = tildeverse.toot(status)
             print(res)
             send(chan, "tooted! {}".format(res["url"]))
-        elif words[0] == "!source":
+        elif cmd == "!source":
             send(chan, "https://tildegit.org/ben/tooter")
-        elif words[0] == "!botlist" or words[0] == "!toothelp":
+        elif cmd in ["!botlist", "!toothelp"]:
             send(
                 chan,
                 "helo i can send toots from irc: @tildeverse@tilde.zone - from @tildeteam from the #team channel)",