Reading these forums has helped me a lot, but now I've come across a problem for which I can't find a solution in the search.
I wrote three scripts which all use the same handles. Individually they work fine, but when I load them together on the same bot, only the last loaded script works. I use a udef flag to assign the scripts to a specific channel, and check for that flag in the procs of the script.
How can I make it so that if I use !le on a channel it uses the script assigned to that channel?
Example:
Code: Select all
#This is channel raid, I have enabled the script with .chanset #raid +raid
bind pub - !le1 raid:le1
proc raid:le1 {nick host hand chan args} {
global raidflag
if { [channel get $chan $raidflag] } {
#code
}
}
Code: Select all
#This is channel oc, I have enabled the script with .chanset #oc +oc
bind pub - !le1 oc:le1
proc oc:le1 {nick host hand chan args} {
global ocflag
if { [channel get $chan $ocflag] } {
#code
}
}
Code: Select all
#This is channel moc, I have enabled the script with .chanset #moc +moc
bind pub - !le1 moc:le1
proc moc:le1 {nick host hand chan args} {
global mocflag
if { [channel get $chan $mocflag] } {
#code
}
}
thanks in advance for your replies, and please let me know if you need more info.