Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def say(sock, chan, str):
- sock.send('PRIVMSG '+channel+' :'+ str
- def main_loop(line, envp):
- # set globals inside module
- sock = envp['ircserv']
- # show what's going on in channel
- print( line )
- # Test for commands to bot
- sections = line.split(' ')
- if( '!say' in sections ):
- chan = envp['USERINFO']['CHAN']
- say( sock, chan, sections[4] )
- print( ': ' + sections[4] )
- if('!exit' in line):
- exit()
Add Comment
Please, Sign In to add comment