Advertisement
makimaki

socketbot

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