Advertisement
makimaki

socketbot

Jun 22nd, 2010
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.69 KB | None | 0 0
  1. alias sock {
  2.   if ($1 == START) {
  3.     sockclose nth
  4.     var %i %nth.idx
  5.   while (%i) { sockopen nth. [ $+ [ %i ] ] three.irc.sparkpea.net 6667 | dec %i }
  6.   }
  7.   elseif ($1 == CLOSE) { sockclose nth.* }
  8.   elseif ($1 == MSG) { swrite PRIVMSG # : $2- }
  9.   elseif ($1 == MODE || $1 == KICK || $1 == NOTICE) { swrite $1 # $2- }
  10.   elseif ($1 == JOIN || $1 == PART) { swrite $1 $active }
  11.   elseif ($1 == HOP) { swrite PART $active | swrite JOIN $active }
  12. }
  13. alias swrite { sockwrite -n nth.* $1- }
  14. on *:sockopen:nth.*: {
  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