Code: Select all
set nickpass "password"
set channame "#channel"
set nickserv "nickserv@services.dal.net"
set chanserv "chanserv@services.dal.net"
bind time - "10 * *" services_check
bind notc - "*You do not have access to op people*" services_ident
bind notc - "*Password accepted*" services_accept
proc services_check {nick uhost hand chan args} {
global botnick chanserv channame
if {![botisop $channame]} {
putlog "Uhhhh im not oped trying to op"
putserv "PRIVMSG $chanserv :OP $channame $botnick" }
}
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_accept { nick uhost hand args } {
global botnick chanserv channame
putlog "Trying to op myself"
putserv "PRIVMSG $chanserv :OP $channame $botnick" }
}
putlog "DALnetServices Version 1.0 loaded by Kyle@DALnet & ^JustinTime^@DALnet"
if {![botisop $channame]}
We want to make him ping chaserv and if chanserv returns with the message Error then to go ahead and send the command to op meaning chanserv isn't down/lagged.
The problem with other scripts is they don't check to see if chanserv is lagged and if its lagged the script hammers the hell out of chanserv.
Me and Kyle are new to tcl and we did this together, were sooo close to being finished. It works now as is, but I'd really like to add in those "protections".
I appreciate all help
I figured I should explain more hence this edit, when you ping just "chanserv" without the extension like "chanserv@services.dal.net" you get an an error like ChanServ- Error! "/msg ChanServ" is no longer supported. Use "/msg chanserv@services.dal.net" or "/chanserv" instead.
or I could actually ping chanserv@services.dal.net and get a ping reply.
So either make him only execute the command to ophimself when you get that "error" or when you get an actual ping reply from chanserv, it doesnt matter each will say that chanserv is a alive and kicking. If he doesnt get that reply we would like him to just not do anything until the next time check, once were done he will check say every 10 mins.