So I figured out this isnt a problem at all - but what is a problem is another feature that needs to be combined with that one, but lets start from the beginning ^^
Im up to let the bot catch specific messages from (make it a random number) 3 channels where it sits in. There are 3 different channels where other bots are going to announce news from 3 different news sites which will be catched from my bot. So now I want my bot to announce ALL of the 3 channels it is in except the one where it got the news message from. I hope I explained it well ^^
here is an example of what I tried:
Code: Select all
bind pub - !lol lolproc
set diffchans [list "#LOL" "#ROFL" "#OMGWTF"]
proc lolproc { nick uhost handle chan text } {
set value [lindex $text 0]
set dchans [split $::diffchans]
if { [string equal -nocase $chan $dchans] } {
set dchans [string map { "$chan" "" } $dchans]
}
foreach schan $diffchans {
putquick "PRIVMSG $schan :\[NEWS\] - $value"
}
}
Im not sure if there is also another way to remove a item from a list temporarily - thats why I did the set dchans [string map { "$chan" "" } $dchans. Someone please keep the ball rolling so I can get a new impression on this one
appreciated