Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
on ^*:TEXT:pgauigh*:#IRCwars: {
sockclose test
sockopen test appspot.com 80
set %nick $+(<,$nick(#,$nick).pnick,>)
set %method decode
set %msg $replace($1-, $chr(32), $chr(37) $+ 20, $chr(35),$chr(37) $+ 23)
haltdef
}
on *:INPUT:#IRCwars: {
if ($left($1,1) != /) {
sockclose test
sockopen test appspot.com 80
set %nick $+(<,%nick(#,%nick).pnick,>)
set %method encode
set %msg $replace($1-, $chr(32), $chr(37) $+ 20, $chr(35),$chr(37) $+ 23)
echo # $+(<,$nick(#,$nick).pnick,>) $1-
haltdef
}
}
on *:sockopen:test: {
sockwrite -n $sockname GET /? $+ %method $+ = $+ %msg HTTP/1.0
sockwrite -n $sockname Host: mrdvpfr.appspot.com
sockwrite -n $sockname
}
on *:sockread:test: {
var %x
sockread %x
while ($sockbr) {
if (__Result:__ isin %x) {
if (%method == decode) {
echo #IRCwars %nick $remove(%x, __Result:__)
}
if (%method == encode) {
.msg #IRCwars $remove(%x, __Result:__)
}
}
sockread -f %x
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.