This commit is contained in:
RussellChamp committed 2015-04-06 14:40:08 +00:00
1 parent 670eb6fac8
commit f0f375a9b1
6 files changed
+40 -17

No files matched your search

+2 -2
View File
@@ -85,13 +85,13 @@ def set_topic(channel, user, time, msg):
ircsock.send("TOPIC "+ channel +" :" + msg + "\n")
count_topic(channel, user, time, msg)
def random_topic(channel, user, time, setTopic=false):
def random_topic(channel, user, time, setTopic=False):
with open("randomtopics.txt") as rtopics:
msg = random.choice(rtopics.readlines()).strip("\n")
if(setTopic):
set_topic(channel, user, time, msg)
else:
ircsock.send("TOPIC "+ channel +" :Suggested Topic: " + msg + "\n")
ircsock.send("PRIVMSG "+channel +" :Suggested Topic: " + msg + "\n")
def rollcall(channel):
ircsock.send("PRIVMSG "+ channel +" :topicbot reporting! I respond to !topic !settopic !randomtopic !thistory\n")