set do "no"
bind pubm - * uploaded
proc uploaded { nick host hand chan arg } {
if {$nick == "BotNick"} {
set got_custom_number [split $arg]
global stamp name cat size value rob
set stamp [lindex $got_custom_number 0 ]
regsub -all {14,1} $stamp "" stamp
putlog "Stamp is $stamp"
if {$stamp == "Znacznik1......:4"} {
set name [lindex $got_custom_number 1 ]
putlog "Name is $name"
set do no
}
if {$stamp == "Zacznik2..:3"} {
set cat [lindex $got_custom_number 1 ]
set do no
putlog "cat is $cat"
}
if {$stamp == "Znacznik3...:4"} {
set do yes
putlog "Now i can do my best!"
}
if {$do == "yes"} {
timer 20 "exec /home/eggdrop/script.sh $name $cat"
putlog "/scriptt.sh $name $cat"
}
}
}
Here is sample log from mIRc with NNS from my channel:
Everytime i see "Stamp is Znacznik1......:4" etc.. but "Name is nazwa" neighter "cat is kategoria" Can you explain me why ?
You are removing the color codes, but you don't remove the preceding control character. This messes up your string comparisons. Have a look at the stripcodes function. You'll find it documented in the doc/tcl-commands.doc file.