about summary refs log tree commit diff
path: root/tooter.py
diff options
context:
space:
mode:
Diffstat (limited to 'tooter.py')
-rw-r--r--tooter.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tooter.py b/tooter.py
index 6dbe28b..2910435 100644
--- a/tooter.py
+++ b/tooter.py
@@ -35,10 +35,9 @@ def think(line):
     chan = line.params.pop(0)
     words = line.params[0].split(" ")
 
-    if len(words) > 0 and line.hostmask.nickname != botnick:
+    if len(words) > 0 and line.hostmask.nickname != config["botnick"]:
         if words[0] == "!toot":
             status = emoji.emojize(" ".join(words[1:]), use_aliases=True)
-            print(f"{status} posted by {nick}")
             if chan == "#team":
                 res = tildeteam.toot(status)
             else:
@@ -64,7 +63,6 @@ if os.path.isfile(os.path.join(path, "account.json")):
     with open(os.path.join(path, "account.json"), "r") as f:
         account = json.load(f)
 
-botnick = config["botnick"]
 channels = config["channels"]
 if len(sys.argv) > 1:
     for c in sys.argv[1:]:
@@ -100,7 +98,7 @@ if __name__ == "__main__":
                 _send(irctokens.format("PONG", line.params))
 
             elif line.command == "001":
-                _send(irctokens.format("MODE", [botnick, "+B"]))
+                _send(irctokens.format("MODE", [config["botnick"], "+B"]))
                 if account is not None:
                     _send(
                         irctokens.format(