if i need to use this code for one or more channel only? what to do ?
Code: Select all
bind mode - "* +v *" auto:addvoice
proc auto:addvoice {nick uhost hand chan text} {
if {![validuser $hand]} {
adduser $nick [maskhost $uhost]
chattr $nick +v $chan
}
}
and about the other code.. will not work


Code: Select all
#CODE1
set vlist "vnick.txt"
bind mode - "#channel +v" vlist:add
proc vlist:add {nick host hand chan mc vc} {
set f [open $::vlist a+]
set i 0
while {[gets $f n]>-1} {
if {[string match -nocase $vc $n]} {
incr i
}
}
if {$i} {
puts $f $vc
}
close $f
}
#CODE2
set vlist "vnick.txt"
bind join - "#channel *" voice:join
proc voice:join {nick uhost handle chan} {
if {[isbotnick $nick] || ![botisop $chan] || ![file exists $::vlist]} {
return
}
set f [open $::vlist r]
while {[gets $f n]>-1} {
if {[string match -nocase $nick $n]} {
pushmode $chan +v $nick
}
}
}