thanks Sir_FZ its working perfectly . .
but now i have another problem (n00b stuff) :\
im trying to set some flags to binds like:
Code: Select all
#flag setup
set normal_flag "m"
#bind setup
set bind_op "!op"
bind $normal_flag ${bind_op} pub:op
proc pub:op {....} {
when i use this set's (flags and binds) the
if {[botisop $chan]} { stops working :\
i tryed some diferent code situations and i cant figure why and how to solve it :\
then i thinked on something like this:
Code: Select all
if ![matchattr $hand $normal_flag $chan] {
puthelp "NOTICE $nick :you dont have permission"
but doesnt worked to...
i tryed diferente ways to put that if but with no sucess :\ i even dont figure how and the order of the code .. the order how it calls the processes .. so is a little dificult to me to make it right before to gain practice to this new order :\
my last proc code is this
Code: Select all
#flag setup
set normal_flags "o"
#bind setup
set bind_voice "!voice"
#script
bind pub - ${bind_voice} pub:voice
proc pub:voice {nick uhost hand chan arg} {
global normal_flags
set newvc [lindex [split $arg] 0]
if {[botisop $chan]} {
if {$newvc==""} {
if {![isvoice $nick $chan]} {
if ![matchattr $hand $normal_flags $chan] {
putserv "NOTICE $nick :not allowed to use command"
}
putserv "MODE $chan +v $nick"
} {
puthelp "NOTICE $nick :you're already voiced on $chan."
}
} elseif {[onchan $newvc $chan]} {
if {[isbotnick $newvc]} {
puthelp "NOTICE $nick :don't touch me!"
} elseif {![isvoice $newvc $chan]} {
putserv "MODE $chan +v $newvc"
} {
puthelp "NOTICE $nick :$newvc is already voiced on $chan."
}
} {
puthelp "NOTICE $nick :$newvc is not on $chan."
}
} {
puthelp "NOTICE $nick :not voiced on $chan"
}
}
i moved that new if up and down in the code and i cant make it work lol :\
sorry for taking your time.. but can you give me a light ?
thanks
(sorry my english)