Merge pull request #80 from cybojenix/patch-1

fix the topic command, now it will actually do something
This commit is contained in:
Luke Rogers 2013-07-26 22:47:13 -07:00
commit 510f70decb

View file

@ -7,8 +7,16 @@ def topic(inp, conn=None, chan=None, notice=None):
"topic [channel] <topic> -- 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)