on $*:TEXT:/^[!@](quest|idlequest)/Si:#:{ .set %quest.way $iif($left($1,1) == @,.msg $chan,.notice $nick) .sockopen QUEST www.xnemesis.net 80 } on *:SOCKOPEN:QUEST: { sockwrite -nt $sockname GET /superirc/irpg/quest.php sockwrite -nt $sockname Host: www.xnemesis.net sockwrite -nt $sockname $crlf $crlf } on *:SOCKREAD:QUEST: { if ($sockerr) { echo -at ** Error ** in socket: $sockerr | halt } else { var %questit sockread %questit if (*

Sorry, there is no active quest.

* iswm %questit) { %quest.way $c1(Sorry, there is no active quest for the) $c2(SuperIRC) $c1(network.) | unset %quest.* | set %quest.wrong 1 | halt } if (*

Quest:* iswm %questit) { tokenize 32 %questit | set %quest.info $nohtml($2-) } if (*p>Participant 1:* iswm %questit) { tokenize 32 %questit | set %quest.par1 $nohtml($3-) } if (*p>Participant 2:* iswm %questit) { tokenize 32 %questit | set %quest.par2 $nohtml($3-) } if (*p>Participant 3:* iswm %questit) { tokenize 32 %questit | set %quest.par3 $nohtml($3-) } if (*p>Participant 4:* iswm %questit) { tokenize 32 %questit | set %quest.par4 $nohtml($3-) } if (*

Current Goal:* iswm %questit) { tokenize 32 %questit | set %quest.goal $nohtml($3-) } } } on *:SOCKCLOSE:QUEST: { if ($var(%quest.wrong)) { unset %quest.wrong | halt } else { %quest.way $c2(Current Quest Info:) $c1(%quest.info) %quest.way $c2(Quest Goal:) $c1(%quest.goal) %quest.way $c2(Participant's: 1:) $c1(%quest.par1) $c2(2:) $c1(%quest.par2) $c2(3:) $c1(%quest.par3) $c2(4:) $c1(%quest.par4) } unset %quest.* }