13/08/2010, 17:09
Hello,
Sorry for speaking English but I can't speak French
I'm testing oracle, the idea is to use it in Spanish. I think it shouldn't be any problem with Levenshtein.tcl since it should work in every language.
Neither with MenzAgitats_Soundex.tcl since I could just change the "string map" from French special chars to Spanish ones (ie. "à" to "á").
I'd also modify "string matches" and some other few things in Oracle.tcl to suit my needs.
Anyway, I'm testing all in French for now, but I can't make it work.
It worked when I used !oracle command without input or only with a interrogation mark.
I'm using eggdrop 1.6.20 (*not* windrop) but I have the same problem with eggdrop 1.6.19. The three required scripts are loaded.
*Edited: pasted .set errorInfo output:
*Edit2: Sorry, I realized that with at least a 3rd user in chan, besides the one who ask !oracle and the Oraclebot (or other bots on the botnet) the script works.
Could this be disabled without affecting the whole script?
*Edit3: I think I got it. I just need to remove proc Oracle::randnick and stop using $randnick variable
Merci beaucoup.
Sorry for speaking English but I can't speak French

I'm testing oracle, the idea is to use it in Spanish. I think it shouldn't be any problem with Levenshtein.tcl since it should work in every language.
Neither with MenzAgitats_Soundex.tcl since I could just change the "string map" from French special chars to Spanish ones (ie. "à" to "á").
I'd also modify "string matches" and some other few things in Oracle.tcl to suit my needs.
Anyway, I'm testing all in French for now, but I can't make it work.
Citation :<panfleto> !oracle est-ce que ce script déchire sa mémère ?
Tcl error [Oracle::ask_oracle]: random limit must be greater than zero
It worked when I used !oracle command without input or only with a interrogation mark.
Citation :<panfleto> !oracle
<eggdrop> !panfleto
<panfleto> !oracle ?
<eggdrop> !panfleto ?
I'm using eggdrop 1.6.20 (*not* windrop) but I have the same problem with eggdrop 1.6.19. The three required scripts are loaded.
*Edited: pasted .set errorInfo output:
Citation :.set errorInfo
Currently: random limit must be greater than zero
Currently: while executing
Currently: "rand [llength $users_list]"
Currently: (procedure "Oracle::randnick" line 4)
Currently: invoked from within
Currently: "Oracle::randnick $nick $chan"
Currently: (procedure "Oracle::ask_oracle" line 44)
Currently: invoked from within
Currently: "Oracle::ask_oracle $_pub1 $_pub2 $_pub3 $_pub4 $_pub5"
*Edit2: Sorry, I realized that with at least a 3rd user in chan, besides the one who ask !oracle and the Oraclebot (or other bots on the botnet) the script works.
Code :
# Retourne un nick aléatoire parmi les users présents sur le chan
# (sauf l'eggdrop, sauf les autres eggs du botnet, sauf l'user qui a posé la
# question)
proc Oracle::randnick {nick chan} {
set users_list [lreplace [set users [chanlist $chan -b|]] [set index [lsearch $users $nick]] $index]
set users_list [lreplace $users_list [set index [lsearch $users_list $::botnick]] $index]
return [lindex $users_list [rand [llength $users_list]]]
}
Could this be disabled without affecting the whole script?
*Edit3: I think I got it. I just need to remove proc Oracle::randnick and stop using $randnick variable

Merci beaucoup.