Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; #******** Socketbot ********#
- ;Basic Protection Bot || Built for Sparkpea || By MakiMaki || Thanks extremity for all the help
- ;Enjoy :)
- alias sock {
- if ($1 == START) { sockclose nth | sockopen nth three.irc.sparkpea.net 6667 } | elseif ($1 == CLOSE) { sockclose nth }
- elseif ($1 == JOIN || $1 == PART) { swrite $1 # } | elseif ($1 == HOP) { swrite PART $+(#,$crlf,JOIN) # }
- elseif ($1 == MSG) { swrite PRIVMSG # : $2- } | elseif ($1 == MODE || $1 == KICK || $1 == NOTICE) { swrite $1 # $2- }
- }
- alias swrite { sockwrite -n nth $1- }
- on *:sockopen:nth: {
- if (!%s) { set %s $$?="Email & Pass:" }
- swrite NICK SocketBot | swrite NickServ IDENTIFY %s
- }
- on *:sockread:nth:{
- sockread %fd
- if (%fd) { tokenize 32 %fd }
- if ($1 == PING) { swrite PONG $2- }
- elseif ($2 == KICK) { if ($knick == $me) && ($nick != $me || $nick != $level($address($nick,1)) == ADMIN)) { swrite KICK # $nick : $knick Is Protected By Me } }
- elseif ($2 == MODE) {
- if (- isin $4 && q isin $4) {
- if ($istok($5-,$me,32)) { swrite MODE $3 +q $me }
- }
- return
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement