Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on $*:TEXT:*:*:{
- if (Celestialskillersbot ison $chan) && ($me != Celestialskillersbot) { halt }
- if ($regex($1,/^[`~!@.]g(rand)?E(x(Change)?)?$/Si)) {
- if ($ isin $1-) || (.txt isin $1-) || (.ini isin $1-) || ($chr(124) isin $1-) { msg # Illegal characters: $nick in $chan -> $1- | halt }
- if ($2 == $null) { $iif($chan,$iif($left($1,1) == @,msg $chan,notice $nick),msg $nick) You must specify something to lookup. | halt }
- hinc -m $me commands 1
- inc %tGE
- hadd -m $+(GE.,%tGE) output $iif($chan,$iif($left($1,1) == @,msg $chan,notice $nick),msg $nick)
- sockopen $+(GE.,%tGE) ilog.ujordan.net 80
- sockmark $+(GE.,%tGE) $replace($2-,$chr(32),_)
- }
- }
- on *:SOCKOPEN:GE.*:{
- sockwrite -nt $sockname GET $+(/parsers/ge.php?item=,$sock($sockname).mark)) HTTP/1.1
- sockwrite -nt $sockname Host: ilog.ujordan.net
- sockwrite -nt $sockname $crlf
- }
- on *:SOCKREAD:GE.*:{
- if ($sockerr) {
- msg # SOCKET ERROR: ge -> $sockname -> $sock($sockname).wserr -> $sock($sockname).wsmsg
- sockclose $sockname
- halt
- }
- var %GE
- sockread %GE
- if (OUTPUT:* iswm %GE) {
- $hget($sockname,output) ** [GE]: $remove(%GE,$gettok(%GE,1,32),GE)
- }
- }
Add Comment
Please, Sign In to add comment