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.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tooter.py b/tooter.py
index c505836..7b900b3 100644
--- a/tooter.py
+++ b/tooter.py
@@ -28,7 +28,7 @@ def _send(line):
 
 
 def send(chan, msg):
-    _send(irctokens.format("PRIVMSG", [chan, msg]))
+    _send(irctokens.build("PRIVMSG", [chan, msg]))
 
 
 def think(line):
@@ -81,8 +81,8 @@ if __name__ == "__main__":
     s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     s.connect((config["address"], config["port"]))
 
-    _send(irctokens.format("USER", [config["botnick"], "0", "*", "mastodon tooter"]))
-    _send(irctokens.format("NICK", [config["botnick"]]))
+    _send(irctokens.build("USER", [config["botnick"], "0", "*", "mastodon tooter"]))
+    _send(irctokens.build("NICK", [config["botnick"]]))
 
     while True:
         lines = d.push(s.recv(1024))
@@ -95,13 +95,13 @@ if __name__ == "__main__":
             print(f"< {line.format()}")
 
             if line.command == "PING":
-                _send(irctokens.format("PONG", line.params))
+                _send(irctokens.build("PONG", line.params))
 
             elif line.command == "001":
-                _send(irctokens.format("MODE", [config["botnick"], "+B"]))
+                _send(irctokens.build("MODE", [config["botnick"], "+B"]))
                 if account is not None:
                     _send(
-                        irctokens.format(
+                        irctokens.build(
                             "SQUERY",
                             [
                                 "NickServ",
@@ -111,10 +111,10 @@ if __name__ == "__main__":
                             ],
                         )
                     )
-                _send(irctokens.format("JOIN", [",".join(channels)]))
+                _send(irctokens.build("JOIN", [",".join(channels)]))
 
             elif line.command == "INVITE":
-                _send(irctokens.format("JOIN", line.params))
+                _send(irctokens.build("JOIN", line.params))
 
             elif line.command == "PRIVMSG":
                 think(line)