on *:input:*: {
if ($1 = !translate ) && ($2) {
if ($chan = $null) {
run http://tools.search.yahoo.com/language/translation/translate.php?doit=done&tt=text&intl=1&text= $+ $htmlfrm($2-) $+ &lp=nl_en
halt
}
run http://tools.search.yahoo.com/language/translation/translate.php?doit=done&tt=text&intl=1&text= $+ $htmlfrm($2-) $+ &lp=nl_en
halt
}
}
on *:text:*!translate-NL-ENG*:#oceanworld,#spelops,#testt: {
if ($chan = $null) {
msg $chan http://tools.search.yahoo.com/language/translation/translate.php?doit=done&tt=text&intl=1&text= $+ $htmlfrm($2-) $+ &lp=nl_en
halt
}
msg $chan http://tools.search.yahoo.com/language/translation/translate.php?doit=done&tt=text&intl=1&text= $+ $htmlfrm($2-) $+ &lp=nl_en
}
alias htmlfrm {
var %i = 1,%r
while (%i <= $len($1-)) {
if ($mid($1-,%i,1) isalnum) { %r = %r $+ $ifmatch }
else { %r = %r $+ % $+ $base($asc($mid($1-,%i,1)),10,16,2) }
inc %i
}
return %r
}
Ok, this code is translating a text, when somebody say's !translate-NL-ENG.
It works, but it says the WEBSITE, and i wanna know the WORD, the translated word.
Somebody know's how to do that?
I've heard then i can do that.. but i don't know HOW...(Witch script)