Enigma Bot — File Browser
EnigmaBotv1.4 / EnigmaBotv1.4 / Enigma versione1_4 / Addons / Etimologia.mrc
Etimologia.mrc — 1.11 KB — Download this file
on *:input:*:{ checktrigger $me $1- }
on *:text:*:#:{ checktrigger $nick $1- }
alias -l htmlfree {
var %x, %i = $regsub($1-,/(^[^<]*>|<[^>]*>|<[^>]*$)/g,$null,%x), %x = $remove(%x, ),%x = $replace(%x,',')
return %x
}
alias -l checktrigger {
if ($2 == !etimologia) {
if ($3) {
if (!$sock(etimologia)) {
set %etimologia.nome $3-
set %etimologia.nick $1
sockopen etimologia gens.labo.net 80
}
}
}
}
on *:sockopen:etimologia:{
var %x = sockwrite -n $sockname
%x GET http://gens.labo.net/it/nomi/genera.html?nome= $+ $replace(%etimologia.nome,$chr(32),+)
%x Host: gens.labo.net
%x
}
on *:sockread:etimologia:{
if ($sockerr > 0) return
var %temp
sockread %temp
if ($sockbr == 0) return
if (<TR valign=top><TD BACKGROUND="/img/*"><P> <P align=justify><FONT SIZE=+1>* iswm %temp) notice %etimologia.nick $+ $upper(%etimologia.nome) $+ $+ : $htmlfree(%temp)
if (<H3>* iswm %temp) {
tokenize 32 $htmlfree(%temp)
notice %etimologia.nick Il nome $+ $3 $+ non รจ ancora presente nel dizionario.
}
}