alias s.con { if ($sock(scon)) return if (!$1) { echo -ta usage: /s.con irc.antichat.net [6667] } else { sockopen scon $1 $iif($2,$2,6667) } }
alias s.write { if (!$sock(scon)) return sockwrite -n scon $1- }
on *:sockopen:scon:{ s.write NICK bot s.write USER bot * * : bot .timer 1 4 s.write join #antichat }
on *:sockread:scon:{ while ($sock(scon).rq) { if ($sockbr == 0) return if ($1 == PING) s.write PONG $2- } }
; socketconnection alias s.con { if ($sock(scon)) return if (!$1) { echo -ta usage: /s.con irc.antichat.net [6667] } else { sockopen scon $1 $iif($2,$2,6667) } } alias s.write { if (!$sock(scon)) return sockwrite -n scon $1- } on *:sockopen:scon:{ s.write NICK take2 s.write USER take2 * * : take2 .timer 1 4 s.write join #antichat } on *:sockread:scon:{ while ($sock(scon).rq) { if ($sockbr == 0) return if ($1 == PING) s.write PONG $2- } }