מה שהסקריפט הזה עושה, הוא למעשה פותח sock לאתר של גוגל ובודק את האיות של המילה שרשמתם, בעקרון זה ללא popups אך אפשר להכין לו בקלות.
יש לשים את הקוד ב- Remote
הפקודה לבדיקת האיות היא:
/spell word
והקוד:
קוד:
alias spell {
set %spell.query $1-
sockopen spell www.google.com 80
}
on *:sockopen:spell:{
sockwrite -nt spell GET /search?hl=en&ie=UTF-8&q= $+ $replace(%spell.query,$chr(32),+) $+ &btnG=Google+Search HTTP/1.0
sockwrite -n spell
}
on *:sockread:spell: {
var %s
sockread %s
if (did not match any documents isin $nohtml(%s)) {
set %spell.sent 1
echo -agt No suggestions for $+ %spell.query $+ .
sockclose spell
return
}
if (Did you mean isin $nohtml(%s)) {
set %spell.sent 1
echo -agt $+ $mid($gettok($replace($nohtml(%s),Did you mean: ,—, ,—),2,151),2,$len($gettok($replace($nohtml(%s ),Did you mean: ,—, ,—),2,151))) $+
sockclose spell
return
}
if (Similar pages isin $nohtml(%s)) {
set %spell.sent 1
echo -agt $+ %spell.query $+ appears correct.
sockclose spell
return
}
}
on *:sockclose:spell:{
if (!%spell.sent) {
echo -agt $+ %spell.query $+ appears correct.
}
unset %spell.query %spell.sent
}
alias nohtml {
var %tmp, %sgnore = $regsub($1-,/(<[^>]+>)/g,$null,%tmp)
return %tmp
}