Mise en forme de code: pensez à utiliser les balises [ tcl ] et [ /tcl ] (sans les espaces bien sûr) autour de vos codes tcl afin d'avoir un meilleur rendu et une coloration syntaxique. x

[Bug] Badword issue
CrazyCat 1 question when the string map is * badword * how can be with space when i add word kar to not match and ban user for word miokardi
to check and match only the word kar kar kkkar kaaar karrrr kar k aa r

i have the regex for that but this string match is match miokardi for the word added in list kar
if {[string match -nocase "* [lindex [split $ b,] 1] *" $ arg]

any idea how can be better to not match other words in front midle end of the word i add in list badwords

[17:09:58] <army> .bw add kar

[17:10:00] <Nasa> Succesfully added 'kar' into the global database.

[05:10:04] <VIRUS> miokardi

[05:10:04] * Nasa sets mode: + b *!*@nasa.army-3F8BE0D0.access.hol.gr
i fixed doing this miokardi is not match and other kar kar is match

but is not match kkkar and karrr

do u have any better idea?

  set re [join [split [index [split $ b,] 1] {}] {+ [^ a-zA-Z0-9] *}]
     if {[string match -nocase "* [lindex [split $ b,] 1] *" "$ arg"] || [regexp -nocase "$ re" "$ text"]} {

when i change * with? here:

is match all patterns but onlyt the karrr is not match

set re [join [split [index [split $ b,] 1] {}] {+ [^ a-zA-Z0-9]?}]


.tcl set re [join [split [index [split $ b,] 1] {}] {+ [^ a-zA-Z0-9] *}]
[10:41] tcl: builtin dcc call: *dcc:tcl CrazyCat 12 set re [join [split [index [split $ b,] 1] {}] {+ [^ a-zA-Z0-9] *}]
[10:41] tcl: evaluate (.tcl): set re [join [split [index [split $ b,] 1] {}] {+ [^ a-zA-Z0-9] *}]
Tcl error: invalid command name "index"
Correct your errors before asking anything. And you have strange spaces between $ and variable name ($ b, $ re, $ text)...
zeolia: tchat gratuit, sans inscription ni publicité
Merci de ne pas demander d'aide en MP
i have fixed all errors is work and match how i want
but when i do .bw list is not show the list cozz all list is in 1 line and server have limit 450 char 500char
how can be to show all list in diferent lines when first line rich 450 char to show other badwords in others lines slow slow to not disconnect excess flood

this the way how add and save

array set badwords {global, ropsh {1606164105 panic} global, tqijsha {1606168186 panic} global, alabak {1606168501 panic}
array set tempbw {}


Forum Jump:

Users browsing this thread: 1 Guest(s)