Code: Select all
                                        set namae [tgstripcodesdx [strlwr [string trim $nick]]]
                                        set firstone [lsearch $tgwrngansw $namae]
                                        if {$firstone ==-1} {lappend tgwrngansw $namae}
                                        if {$firstone !=-1} {
                                        tggamemsg2 "$nick, only 1 time bet"
                                        return
                                        }
					tggamemsg2 "$nick, bet accepted: $text"
Code: Select all
proc tgstripcodesdx {text} {
        regsub -all -- "(\[0-9\]\[0-9\]?(,\[0-9\]\[0-9\]?)?)?" $text "" text
        regsub -all -- "\t" $text " " text
        set text "[string map -nocase [list "\[" "" "\]" "" "~" ""] $text]"
        return $text
}the problem is, if nick like "[]Name" or "[the]master" without quote, has always can pass the strict .. can bet 10 times.. the codes should only allow 1 time betting..
another nick like symbol ~-_ and of course also A-Za-z0-9 have no problem with it, everything good (only 1 time bet)
thanks in advance
