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.

Please Help

Old posts that have not been replied to for several years.
Locked
S
StarCat

Please Help

Post by StarCat »

I can not get services.tcl to work on gamesnet, keeps saying botnick no such variable =[

i peiced togeather this but im not a coder =[
set init-server {
putserv "MODE $botnick +i-ws"
putserv "PRIVMSG authserv@services.gamesnet.net :auth bot password
}
timer 5 reauth
proc reauth {} {
putserv "PRIVMSG AuthServ@services.gamesnet.net :auth bot password
timer 15reauth
}

would someone help me with a small script? all i need is,when theres a netsplit my bot becomes un-auth to authserv when he comes back so my bot tries to op a user and fights with chanserv cause hes not auth anymore. authserv sends a notice to the bot saying to auth. what i need is a script that will auth to authserv when he gets a notice from him. easy? I can drive 40 tons of truck but i cant seem to write 1 ounce of tcl script
any help would be greatly appreciated
thanks.
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Post by Ian-Highlander »

I dont know about those particular services, but here's something I knocked up quickly for a friend who wanted his bot to be an oper (sysop) and identify to nickserv (Auspice services) on an Unreal IRCd server.

You can edit this to suit your needs, the response from nickserv may be different, but other than that this should work ok.

Code: Select all

set o "\002\**System Bot**\002"
set identified 0

##Init Server Routine
##(Identifies To Nickserv And Authenticates Oper)
set init-server {
putserv "oper <opernick> <operpassword>"
putserv "nickserv identify <nickservpass>"
utimer 10 set_ident
}

##Part Of The Init-Server Routine
##(Bot Sets It's Ident And Host To System Specs)
proc set_ident {} {
global o identified
set identified 1
putserv "setident SystemBot"
putserv "sethost HighlandFox.com"
putlog "$o Set Ident and Host for server"
utimer 30 reset_identified
}

bind notc - "*This nick is owned by someone else*" nickserv_identify
bind notc - "*If you do not change within one minute*" identify_now

proc nickserv_identify {nick hand uhost chan {rest ""}} {
global o identified
if {$identified != 1} {
putserv "PRIVMSG Nickserv :identify <nickservpass>"
putlog "$o Re-identified with Nickserv"
set identified 1
utimer 30 reset_identified
 } else {
putlog "Got Request To Re-Identify ?"
 }
}

proc identify_now {} {
global o identified
set identified 0
putlog "$o Phew, that was close almost missed identifying there :o)"
nickserv_identify
}

proc reset_identified {} {
global o identified
set identified 0
kill_timers
putlog "Identified Variable Reset"
}

proc kill_timers {} {
   global chan
   foreach j [utimers] {
     if {[lindex $j 1] == "no_answer"} {
        killutimer [lindex $j 2]
     }
   }
   return 0
}

putlog "\002\**System Bot**\002 ©Ian-Highlander Loaded"
HTH

Regards

Ian-Highlander
"Insanity Takes Its Toll, Please Have Exact Change"
S
StarCat

Post by StarCat »

Thanks for your post, i think i might have confused everyone, when i re-read my post i got confised =]
what im tring to to do is add to this script so i dont use the timer. Im tring to get my bot to PRIVMSG authserv@services.gamesnet.net :auth bot <password> when he recieves any notices from authserv@services.gamesnet.net and reply to a channel "my nic is authorized" I have been tring for 3 days to wright this but i cant get passed the set init-server

set init-server {
putserv "MODE $botnick +i-ws"
putserv "PRIVMSG authserv@services.gamesnet.net :auth bot password
}
t
tainted
Master
Posts: 239
Joined: Sun May 12, 2002 8:00 pm
Location: chicago
Contact:

Post by tainted »

I'm not sure if your network is just that diffrent, but you normally do not need to (and can not) add the full host to it. If the service's nick is authserv, then PRIVMSG authserv :blah would be the correct way.
I
Ian-Highlander
Op
Posts: 165
Joined: Mon Sep 24, 2001 8:00 pm
Location: Ely, Cambridgeshire

Re: Please Help

Post by Ian-Highlander »

StarCat wrote:I can not get services.tcl to work on gamesnet, keeps saying botnick no such variable =[
I re-read your post and there's your problem, its not even getting to the auth command because its barfing out at the botnick variable not being there.
"Insanity Takes Its Toll, Please Have Exact Change"
S
StarCat

Post by StarCat »

what happens on gamesnet is theres a netsplit,2-3 a day, when chanserv and authserv comeback my bot is no longer authorized as a op all though he is a op in the channel still. so peeps enter and my bot tries to op them but because he is no longer authorized chanserv set -o to the user my bot oped. my bot re-ops him and chanserv -o him again and this goes on like spam in the channel. chanserv sets -o to the user my bot set +o and sends a notice to my bot you "must be a op or above to op peeps"
this is were my bot needs to re-auth. So basically my bot needs to do
putserv "PRIVMSG authserv@services.gamesnet.net :auth bot password
when ever he recieves any notice from authserv@services.gamesnet.net

My original script is working I'm just tring to get away from the timer part and trigger it on a notice.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

If your network supports the WATCH command, it's even better if you have it send the auth whenever services come online. I have a little script I could post if you want. Just make sure you can do /watch +authserv and that the server tells you if it's online.
S
StarCat

Post by StarCat »

stdragon wrote:If your network supports the WATCH command, it's even better if you have it send the auth whenever services come online. I have a little script I could post if you want. Just make sure you can do /watch +authserv and that the server tells you if it's online.
typing /watch is a unknown cmd so i guess not unless theres another way i can tell?
Locked