egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

request auto notice of rules

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
tagoy
Voice


Joined: 05 Jul 2012
Posts: 8
Location: Philippines

PostPosted: Thu Jul 05, 2012 10:07 pm    Post subject: request auto notice of rules Reply with quote

please help.
_________________
wew
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jul 05, 2012 10:33 pm    Post subject: more info Reply with quote

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
View user's profile Send private message Visit poster's website
tagoy
Voice


Joined: 05 Jul 2012
Posts: 8
Location: Philippines

PostPosted: Thu Jul 05, 2012 10:36 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jul 05, 2012 10:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tagoy
Voice


Joined: 05 Jul 2012
Posts: 8
Location: Philippines

PostPosted: Thu Jul 05, 2012 10:45 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jul 05, 2012 10:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tagoy
Voice


Joined: 05 Jul 2012
Posts: 8
Location: Philippines

PostPosted: Thu Jul 05, 2012 11:06 pm    Post subject: Reply with quote

okay thanks i will search for it.
_________________
wew
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Thu Jul 05, 2012 11:15 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
tagoy
Voice


Joined: 05 Jul 2012
Posts: 8
Location: Philippines

PostPosted: Fri Jul 06, 2012 2:00 am    Post subject: Reply with quote

Thansk for the help sir spike.
_________________
wew
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Fri Jul 06, 2012 12:48 pm    Post subject: Think that script needs timers? Reply with quote

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
View user's profile Send private message Visit poster's website
tagoy
Voice


Joined: 05 Jul 2012
Posts: 8
Location: Philippines

PostPosted: Fri Jul 06, 2012 9:52 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger
SpiKe^^
Owner


Joined: 12 May 2006
Posts: 792
Location: Tennessee, USA

PostPosted: Fri Jul 06, 2012 10:11 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber