The bot can now be in several channels at once

This commit is contained in:
moneromooo 2015-01-01 10:59:56 +00:00
parent e4b403cc31
commit 27117ae53e
2 changed files with 4 additions and 6 deletions

View file

@ -16,7 +16,7 @@ irc_network = 'irc.freenode.net'
irc_port = 6697
irc_send_delay = 0.4
irc_welcome_line = 'Welcome to the freenode Internet Relay Chat Network'
irc_homechan = '#txtptest000'
irc_channels = ['#txtptest000']
irc_timeout_seconds = 600
irc_use_ssl = True

View file

@ -106,9 +106,6 @@ def connect_to_irc(network,port,name,password,delay):
def reconnect_to_irc():
connect_to_irc(irc_network,irc_port,irc_name,irc_password,irc_line_delay)
def Send(msg):
SendIRC ('PRIVMSG ' + config.irc_homechan + ' : ' + msg)
def SendTo(where,msg):
SendIRC ('PRIVMSG ' + where + ' : ' + msg)
@ -272,8 +269,9 @@ def IRCLoop(on_idle,on_identified,on_command):
userstable = dict()
registered_users.clear()
SendTo("nickserv", "IDENTIFY %s" % irc_password)
Join(config.irc_homechan)
#ScanWho(None,[config.irc_homechan])
for chan in config.irc_channels:
Join(chan)
#ScanWho(None,[chan])
if data.find ( 'PING' ) == 0:
log_log('Got PING, replying PONG')