hello all... I have installed restrict.tcl on my eggy, and would like to modify it a bit, but I am a TCL dummy. It allows anyone in the userlist to enter a channel, those who are now, are kicked/temp banned on join. Brilliant idea, and I appreciate the script writers effort, but I would like to change it a bit so that it allows people in the userlist with a certain flags. I think this is the line that needs changed.
if { ![validuser $hand] } {
any help would be appreciated, I have had to remove my auto-voices and a few of my auto-ops just to lock down this channel to the appropriate user list. (and no, I dont want to +k or +i the channel, I've been through that, the whole reason I went with this script was to get away from that)
This script is small, so for better reference, here is a bigger exerpt.
set r_chan "#complete-servers"
set r_time 60
bind join -|- "$r_chan *!*@*" out
proc out { nick uhost hand chan } {
global r_ban r_time r_chan
if {![file exists restrictkick]} {
set rnum [open restrictkick w]
puts $rnum "0"
close $rnum
}
set rnum [open restrictkick r]
gets $rnum knum
close $rnum
set cnum [expr $knum + 1]
set rnum [open restrictkick w]
puts $rnum "$cnum"
close $rnum
OK... took your advice, but I must be doing something wrong... can someone please tell me where I screwed up and how to fix it? I get this error.
[13:56] <CW-Bot> "proc out { nick uhost hand chan }"
[13:56] <CW-Bot> (file "scripts/restricted.tcl" line 21)
[13:56] <CW-Bot> invoked from within
from this script:
bind join -|- "$r_chan *!*@*" out
proc out { nick uhost hand chan } {
global r_ban r_time r_chan
foreach user [chanlist $r_chan] {
if {![matchattr] $hand S]} { halt }
if {![file exists restrictkick]} {
set rnum [open restrictkick w]
puts $rnum "0"
close $rnum
}
set rnum [open restrictkick r]
gets $rnum knum
close $rnum
set cnum [expr $knum + 1]
set rnum [open restrictkick w]
puts $rnum "$cnum"
close $rnum