Advertisement
makimaki

little socket

Jun 22nd, 2010
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.57 KB | None | 0 0
  1. alias swrite { sockwrite -n nth $1- }
  2.  
  3. alias sock {
  4. if ($1 == START) {  sockclose nth | sockopen nth three.irc.sparkpea.net 6667 }
  5. elseif ($1 == MSG) { swrite PRIVMSG # $2- }
  6. elseif ($1 == MODE) { swrite MODE # $2- }
  7. elseif ($1 == JOIN || $1 == PART ) { swrite $1 $active }
  8. }
  9.  
  10. on *:sockopen:nth: {
  11.   echo -st Logging in to $network $+ ...  
  12.   swrite NICK SocketBot
  13.   if (!%sep) { set %sep $$?="Email & Pass:" }
  14.   swrite NickServ IDENTIFY %sep  
  15. }
  16.  
  17. on *:sockread:nth:{
  18.   sockread %fd
  19.   if (%fd) { tokenize 32 %fd }
  20.   if ($1 == PING) { swrite PONG $2- }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement