All pastes #597949 Raw Edit

Something

public text v1 · immutable
#597949 ·published 2007-06-30 23:09 UTC
rendered paste body
on $*:TEXT:/^[?!@]spell(check)*/Si:#: {  
  if (!$2) { 
    notice $nick 4!spellcheck7 *word* 
    halt 
  } 
  set %output  $iif($left($1,1) == !,notice $nick,msg $chan) 
  set %spell $nick 
  set %word $2 
  sockopen spell [ $+ [ %spell ] ] www.o-ss.net 80 
} 

on *:SOCKOPEN:spell*: { 
  sockwrite -nt $sockname GET /parsers/spell.php?word= $+ %word HTTP/1.1 
  sockwrite -nt $sockname Host: www.o-ss.net 
  sockwrite -nt $sockname $crlf 
} 

on *:SOCKREAD:spell*: { 
  if ($sockerr) { 
    %output 4An error has occoured while connecting. Please contact:7 Jammin699604. 
    unset %word 
    unset %output 
    unset %spell 
    unset %read 
    sockclose $sockname    
    halt 
  } 
  var %read 
  sockread %read 
  if ([SPELL]* iswm %read) { 
    tokenize 32 %read 
    if (*Word is correct* iswm $1-) { 
      %output 7 $+ %word 4is correct. 
      unset %word 
      unset %output 
      unset %spell 
      unset %read 
      sockclose $sockname      
      halt 
    } 
    %output 7 $+ %word 4is not correct. Heres some suggestions:7 $2- $+ 4. 
    unset %word 
    unset %output 
    unset %spell 
    unset %read 
    sockclose $sockname 
  } 
}