| View previous topic :: View next topic |
| Author |
Message |
tagoy Voice
Joined: 05 Jul 2012 Posts: 8 Location: Philippines
|
Posted: Thu Jul 05, 2012 10:07 pm Post subject: request auto notice of rules |
|
|
please help. _________________ wew |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jul 05, 2012 10:33 pm Post subject: more info |
|
|
I think we are going to need a little more information on your request.
What exactly are we looking for here? _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
tagoy Voice
Joined: 05 Jul 2012 Posts: 8 Location: Philippines
|
Posted: Thu Jul 05, 2012 10:36 pm Post subject: |
|
|
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 _________________ wew |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jul 05, 2012 10:44 pm Post subject: |
|
|
Have you tried looking in the script archive for something close to what your looking for? _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
tagoy Voice
Joined: 05 Jul 2012 Posts: 8 Location: Philippines
|
Posted: Thu Jul 05, 2012 10:45 pm Post subject: |
|
|
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. _________________ wew |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jul 05, 2012 10:52 pm Post subject: |
|
|
have you looked at BlackRules script in the archive?
if that script was to work all we would need is a bind time to do the timed readings of the rules. _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
tagoy Voice
Joined: 05 Jul 2012 Posts: 8 Location: Philippines
|
Posted: Thu Jul 05, 2012 11:06 pm Post subject: |
|
|
okay thanks i will search for it. _________________ wew |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Thu Jul 05, 2012 11:15 pm Post subject: |
|
|
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:) _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
tagoy Voice
Joined: 05 Jul 2012 Posts: 8 Location: Philippines
|
Posted: Fri Jul 06, 2012 2:00 am Post subject: |
|
|
Thansk for the help sir spike. _________________ wew |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Jul 06, 2012 12:48 pm Post subject: Think that script needs timers? |
|
|
So, now that we have a working trigger script for for your channel rules, don't we still need a way to post the rules on a 20 minute timer? _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
tagoy Voice
Joined: 05 Jul 2012 Posts: 8 Location: Philippines
|
Posted: Fri Jul 06, 2012 9:52 pm Post subject: |
|
|
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. _________________ wew |
|
| Back to top |
|
 |
SpiKe^^ Owner

Joined: 12 May 2006 Posts: 792 Location: Tennessee, USA
|
Posted: Fri Jul 06, 2012 10:11 pm Post subject: |
|
|
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:
| Code: | bind time - "00 *" callrules
bind time - "20 *" callrules
bind time - "40 *" callrules
proc callrules {mn hr da mo yr} { global botnick
publicrules $botnick :TIMED: :RULES: #yourchannel none
} |
Replace #yourchannel with the channel we are sending the timed rules to.
Then change the last process in the script to look more like this:
| Code: | 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
Goodluck _________________ SpiKe^^
Get BogusTrivia 2.06.4.7 at www.mytclscripts.com
or visit the New Tcl Acrhive at www.tclarchive.org
. |
|
| Back to top |
|
 |
|