thanks for the reply. Well i need an auto notice script tcl. That an eggdrop notice the rules every 20minutes. Also if type !rules then it will show the channel rules. thanks
yes i already did that, ive been searching in egghelp.org for the tcl that i need. But i dont know the name also im reading the description still no luck.
Let me know here if the script is functional, as not all scripts in the archive work without error. If it does, I would be glad to make it also read the rules to the channel on a 20 min timer.
I'll be around the forum for a couple more hours, and again tomorrow. Goodluck with that script:)
Yes if you could do it sir spike i want to post the channel rules via notice every 20minutes. Uhmm i want another script not on the blackrules. If its okay.
Think i would just try to get the same script sending the same rules on a 20 min deal. Believe i would use bind times instead of timers tho...
Add this code near the top of the script:
proc publicrules {nick host hand chan arg} {
global rules count
set dir "logs/rules($chan).txt"
if {![validchan $chan]} { return 0 }
if {[channel get $chan rules]} {
if {![info exists count(rules:on)]} {
set count(rules:on) 0
}
if {$count(rules:on) >= 1} {
puthelp "NOTICE $nick :Please wait for $rules(time) seconds before i can show the rules."
return 0
}
incr count(rules:on)
utimer $rules(time) [list unset count(rules:on)]
if {[file exists $dir] == 0} {
set file [open $dir w]
close $file
}
set file [open $dir "r"]
set w [read -nonewline $file]
close $file
set data [split $w "\n"]
set i 0
if {$data == ""} { puthelp "NOTICE $nick :There are no rules for $chan"
return 0
}
foreach rule $data {
set i [expr $i +1]
if {$host eq ":TIMED:"} { set sendto $chan
} else { set sendto $nick }
puthelp "NOTICE $sendto :12The rules for 4$chan 12are:"
puthelp "NOTICE $sendto :12 $i . $rule"
}
}
}
None of this is tested tho, but looks to me to work