From 85f4cd724ff9887fcd6fb5e073552f2f80f6b883 Mon Sep 17 00:00:00 2001 From: Cybo Jenix Date: Mon, 22 Jul 2013 12:20:47 +0100 Subject: [PATCH] fix the topic command, now it will actually do something --- plugins/op.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/op.py b/plugins/op.py index 63e8668..159b32c 100755 --- a/plugins/op.py +++ b/plugins/op.py @@ -7,8 +7,16 @@ def topic(inp, conn=None, chan=None, notice=None): "topic [channel] -- Change the topic of a channel." inp = inp.split(" ") if inp[0][0] == "#": - out = "PRIVMSG %s :%s" % (inp[0], message) + message = "" + for x in inp[1:]: + message = message + x + " " + message = message[:-1] + out = "TOPIC %s :%s" % (inp[0], message) else: + message = "" + for x in inp[0:]: + message = message + x + " " + message = message[:-1] out = "TOPIC %s :%s" % (chan, message) conn.send(out)