Advertisement
makimaki

socketbot

Jun 23rd, 2010
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.07 KB | None | 0 0
  1. ; #******** Socketbot ********#
  2. ;Basic Protection Bot || Built for Sparkpea || By MakiMaki || Thanks extremity for all the help
  3. ;Enjoy :)
  4. alias sock {
  5.   if ($1 == START) { sockclose nth | sockopen nth three.irc.sparkpea.net 6667 } | elseif ($1 == CLOSE) { sockclose nth }
  6.   elseif ($1 == JOIN || $1 == PART) { swrite $1 # } | elseif ($1 == HOP) { swrite PART $+(#,$crlf,JOIN) # }
  7.   elseif ($1 == MSG) { swrite PRIVMSG # : $2- } | elseif ($1 == MODE || $1 == KICK || $1 == NOTICE) { swrite $1 # $2- }
  8. }
  9. alias swrite { sockwrite -n nth $1- }
  10. on *:sockopen:nth: {
  11.   if (!%s) { set %s $$?="Email & Pass:" }
  12.   swrite NICK SocketBot | swrite NickServ IDENTIFY %s
  13. }
  14. on *:sockread:nth:{
  15.   sockread %fd
  16.   if (%fd) { tokenize 32 %fd }
  17.   if ($1 == PING) { swrite PONG $2- }
  18.   elseif ($2 == KICK) { if ($knick == $me) && ($nick != $me || $nick != $level($address($nick,1)) == ADMIN)) { swrite KICK # $nick : $knick Is Protected By Me } }
  19.   elseif ($2 == MODE) {
  20.     if (- isin $4 && q isin $4) {
  21.       if ($istok($5-,$me,32)) { swrite MODE $3 +q $me }
  22.     }
  23.     return
  24.   }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement