In this TCL, for some reason the author decided to clean than nicks, the characters '{} [] \\'
For this purpose he used this process:
Code: Select all
proc charfilter {x {y ""} } {
for {set i 0} {$i < [string length $x]} {incr i} {
switch -- [string index $x $i] {
"\"" {append y "\\\""}
"\\" {append y "\\\\"}
"\[" {append y "\\\["}
"\]" {append y "\\\]"}
"\}" {append y "\\\}"}
"\{" {append y "\\\{"}
default {append y [string index $x $i]}
}
}
return $y
}
Example.
Then when I want to remove that nick, bot tells me that is not found in the database.<oper> !addison {fosforito}
<bot> Done. Successfully added \{fosforito\}.
And if I try to remove the nick, the same way the bot added,the bot tells me that eliminated him, but in reality it does not eliminate the nick follows the archive database.<oper> !delison {fosforito}
<bot> Nickname fosforito not found in the database!
<oper> !delison \{fosforito\}
<bot> Nickname {fosforito} erased from the database!
I had a hard time understanding how this code, it may be because of my lack of experience.<oper>!list
<bot>Added in the database: \{fosforito\}
Anyway, I could solve the other characters such as hyphens (-_-), but I could with whom I have discussed them.
Code: Select all
regsub -all "$who" $nicknames "" nicknames
EDIT: Solved! see this post.