Guest User

Untitled

a guest
Jan 23rd, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. def say(sock, chan, str):
  2.     sock.send('PRIVMSG '+channel+' :'+ str
  3.  
  4.  
  5. def main_loop(line, envp):
  6.     # set globals inside module
  7.     sock = envp['ircserv'] 
  8.  
  9.     # show what's going on in channel
  10.     print( line )
  11.  
  12.     # Test for commands to bot
  13.     sections = line.split(' ')
  14.     if( '!say' in sections ):
  15.        
  16.         chan = envp['USERINFO']['CHAN']
  17.         say( sock, chan, sections[4] )
  18.         print( ': ' + sections[4] )
  19.  
  20.     if('!exit' in line):
  21.         exit()
Add Comment
Please, Sign In to add comment