mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
The bot can now be in several channels at once
This commit is contained in:
parent
e4b403cc31
commit
27117ae53e
2 changed files with 4 additions and 6 deletions
|
@ -16,7 +16,7 @@ irc_network = 'irc.freenode.net'
|
||||||
irc_port = 6697
|
irc_port = 6697
|
||||||
irc_send_delay = 0.4
|
irc_send_delay = 0.4
|
||||||
irc_welcome_line = 'Welcome to the freenode Internet Relay Chat Network'
|
irc_welcome_line = 'Welcome to the freenode Internet Relay Chat Network'
|
||||||
irc_homechan = '#txtptest000'
|
irc_channels = ['#txtptest000']
|
||||||
irc_timeout_seconds = 600
|
irc_timeout_seconds = 600
|
||||||
irc_use_ssl = True
|
irc_use_ssl = True
|
||||||
|
|
||||||
|
|
|
@ -106,9 +106,6 @@ def connect_to_irc(network,port,name,password,delay):
|
||||||
def reconnect_to_irc():
|
def reconnect_to_irc():
|
||||||
connect_to_irc(irc_network,irc_port,irc_name,irc_password,irc_line_delay)
|
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):
|
def SendTo(where,msg):
|
||||||
SendIRC ('PRIVMSG ' + where + ' : ' + msg)
|
SendIRC ('PRIVMSG ' + where + ' : ' + msg)
|
||||||
|
|
||||||
|
@ -272,8 +269,9 @@ def IRCLoop(on_idle,on_identified,on_command):
|
||||||
userstable = dict()
|
userstable = dict()
|
||||||
registered_users.clear()
|
registered_users.clear()
|
||||||
SendTo("nickserv", "IDENTIFY %s" % irc_password)
|
SendTo("nickserv", "IDENTIFY %s" % irc_password)
|
||||||
Join(config.irc_homechan)
|
for chan in config.irc_channels:
|
||||||
#ScanWho(None,[config.irc_homechan])
|
Join(chan)
|
||||||
|
#ScanWho(None,[chan])
|
||||||
|
|
||||||
if data.find ( 'PING' ) == 0:
|
if data.find ( 'PING' ) == 0:
|
||||||
log_log('Got PING, replying PONG')
|
log_log('Got PING, replying PONG')
|
||||||
|
|
Loading…
Reference in a new issue