This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
Gothic-Angel
Op
Posts: 109 Joined: Mon Sep 23, 2002 9:46 pm
Post
by Gothic-Angel » Thu Feb 20, 2003 10:19 pm
Code: Select all
set nickpass "pass"
set channame "chan"
set nickserv "nickserv@services.dal.net"
set chanserv "chanserv@services.dal.net"
set blah "."
bind notc - "*This nick is owned by someone else*" services_ident
bind notc - "*Password accepted*" services_check
bind notc - "*You do not have access to op people*" services_ident
bind time - "0 * *" services_check
bind time - "5 * *" services_check
bind time - "10 * *" services_check
bind time - "15 * *" services_check
bind time - "20 * *" services_check
bind time - "25 * *" services_check
bind time - "30 * *" services_check
bind time - "35 * *" services_check
bind time - "40 * *" services_check
bind time - "45 * *" services_check
bind time - "50 * *" services_check
bind time - "55 * *" services_check
bind time - "00 * *" services_check
bind pub n|n ${blah}identify pub:ident
bind pub n|n ${blah}op pub:op
bind pub n|n ${blah}test services_check
bind ctcr - PING services_op
bind mode - "* -o" services_autoreop
bind need - "* unban" services_autounban
proc services_ident { nick uhost hand args } {
global botnick nickpass nickserv
putlog "Services: Trying to identify with nickserv"
putserv "PRIVMSG $nickserv :identify $nickpass"
}
proc services_ping {nick uhost hand args} {
putlog "PING: Trying to ping chanserv"
putserv "PRIVMSG $chanserv :\001PING"
}
proc services_op {nick uhost hand args} {
global botnick chanserv channame
putserv "PRIVMSG $chanserv :OP $channame $botnick"
}
proc services_check {nick uhost hand chan arg} {
global botnick channame chanserv
if {![botisop $channame] && [botonchan $channame] } {
putserv "PRIVMSG $chanserv :\001PING $chanserv"
}
}
proc pub:ident {nick host hand chan text} {
global botnick nickpass nickserv
putserv "PRIVMSG $nickserv :identify $nickpass"
}
proc pub:op {nick host hand chan text} {
global botnick chanserv channame
putserv "PRIVMSG $chanserv :OP $channame $botnick"
}
proc services_autoreop {nick uhost hand chan deop deopd} {
global botnick channame
if {[matchattr $hand n]} { return }
if {([string match -nocase $deopd $botnick]) } {
putserv "ChanServ op $channame $botnick"
}
}
proc services_autounban {chan unban} {
global channame botnick
putserv "ChanServ unban $chan"
}
I want to make it support more than one channel but not all, so could I set a variable like.
[/code]
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Feb 21, 2003 1:50 am
Once the game is over, the king and the pawn go back in the same box.
Papillon
Owner
Posts: 724 Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no
Post
by Papillon » Fri Feb 21, 2003 6:44 am
just a little tip
Code: Select all
bind time - "0 * *" services_check
bind time - "5 * *" services_check
bind time - "10 * *" services_check
bind time - "15 * *" services_check
bind time - "20 * *" services_check
bind time - "25 * *" services_check
bind time - "30 * *" services_check
bind time - "35 * *" services_check
bind time - "40 * *" services_check
bind time - "45 * *" services_check
bind time - "50 * *" services_check
bind time - "55 * *" services_check
bind time - "00 * *" services_check
this can be done by using just two lines:
Code: Select all
bind time - "*0 * *" services_check
bind time - "*5 * *" services_check
Elen sila lúmenn' omentielvo
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Fri Feb 21, 2003 8:54 am
Papillon wrote: just a little tip
this can be done by using just two lines:
Code: Select all
bind time - "*0 * *" services_check
bind time - "*5 * *" services_check
i am unsure, wouldn't this trigger each minute when hour or day contains 0 or 5? you probably mean
bind time - "*5 * * * *" services_check and
bind time - "*0 * * * *" services_check tcl-commands.tcl wrote: mask matches 5 space separated integers of the form:
"minute hour day month year". minute, hour, day, month have a
zero padding so they are exactly two characters long; year is
extended to four characters in the same way.
means the old bind
bind time - "5 * *" services_check is wrong, too.
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Fri Feb 21, 2003 9:01 am
*grml*
PS: you can delete this double post...
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Fri Feb 21, 2003 11:19 am
As you probably can see (or atleast you should..) Gothic-Angel is tryng to do a *call* for its proc from 5 in 5 minutes, so Papillon's tip is correct.
Once the game is over, the king and the pawn go back in the same box.
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Fri Feb 21, 2003 3:48 pm
seems you need an example:
like of the disciption from the doc file 2003-2-21 20:44 will be masked as ["44 20 21 02 2003". 44 is not dividable by 5, bot it still matchs "*0 * *" !!! first * is "44 2" then comes 0, then space, then "21 02", one more space, then 2003. it matchs and is true, and it will trigger EVERY minute in hours or months containg 0 or 5. * = can be ANY number of charachters, even zero. correct would be "?0*" or "*0 * * * *".
hope this helps you to understand the logic of a stupid computer
.
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Sat Feb 22, 2003 2:45 pm
Da Kus is correct in what he is saying.
However, at the same time, the original post was correct. "5 * *", Note the lack of wildcard before the 5, meaning this must be at the start.
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Sat Feb 22, 2003 3:14 pm
ppslim wrote: However, at the same time, the original post was correct. "5 * *", Note the lack of wildcard before the 5, meaning this must be at the start.
yes, its at the front, and this means its never true, because
tcl-commands.doc wrote: minute, hour, day, month have a zero padding so they are exactly two characters long
means, there will never be a 5 followed by an space at the begining because it will be 05 not 5
.