Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias swrite { sockwrite -tn nth $1- }
- alias sock { if ($$1 == START) { if ($sock(nth)) { sockclose nth } | .timer -m 1 10 .sockopen nth three.irc.sparkpea.net 6667 } | elseif ($$1 == MSG) { swrite privmsg # $2- | halt } | elseif ($$1 == MODE) { swrite MODE # $2- | halt } | elseif ($$1 == JOIN) { swrite JOIN $active | halt } | elseif ($$1 == PART) { swrite PART $active | halt } | elseif ($$1 == AUTH) { if (%sep == $null) { set %sep $$?="Email & Pass:" } | swrite NickServ IDENTIFY %sep } }
- on *:sockopen:nth: { sockwrite -tn nth NICK SocketBot | echo -st Logging in to $network $+ ... | sock auth }
- on *:sockread:nth:{
- var %fd | sockread %fd | if (!%fd) { halt }
- tokenize 32 %fd
- window -m @sock | echo @sock $1-
- if ($1 == PING) { swrite nth PONG $2- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement