From b973b31c9785356d399187ae80ca18801c053e1f Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 1 May 2020 13:15:15 -0400 Subject: update irctokens to v1.0.0 --- tracer.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tracer.py') diff --git a/tracer.py b/tracer.py index 1b68451..8a4e430 100644 --- a/tracer.py +++ b/tracer.py @@ -111,7 +111,7 @@ def _send(line): def send(chan, msg): - _send(irctokens.format("PRIVMSG", [chan, msg])) + _send(irctokens.build("PRIVMSG", [chan, msg])) def think(line): @@ -159,8 +159,8 @@ if __name__ == "__main__": s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((bot["server"], int(bot["port"]))) - _send(irctokens.format("USER", [bot["nick"], "0", "*", "tracery bot"])) - _send(irctokens.format("NICK", [bot["nick"]])) + _send(irctokens.build("USER", [bot["nick"], "0", "*", "tracery bot"])) + _send(irctokens.build("NICK", [bot["nick"]])) while True: lines = d.push(s.recv(1024)) @@ -173,13 +173,13 @@ if __name__ == "__main__": print(f"< {line.format()}") if line.command == "PING": - _send(irctokens.format("PONG", [line.params[0]])) + _send(irctokens.build("PONG", [line.params[0]])) elif line.command == "001": - _send(irctokens.format("MODE", [bot["nick"], "+B"])) + _send(irctokens.build("MODE", [bot["nick"], "+B"])) if account is not None: _send( - irctokens.format( + irctokens.build( "SQUERY", [ "NickServ", @@ -190,10 +190,10 @@ if __name__ == "__main__": ) ) - _send(irctokens.format("JOIN", [",".join(bot.getlist("channels"))])) + _send(irctokens.build("JOIN", [",".join(bot.getlist("channels"))])) elif line.command == "INVITE": - _send(irctokens.format("JOIN", [line.params[1]])) + _send(irctokens.build("JOIN", [line.params[1]])) elif line.command == "PRIVMSG": try: -- cgit 1.4.1