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.

ChanServ/NickServ - Re-Identifying

Old posts that have not been replied to for several years.
Locked
B
B|aDe

Post by B|aDe »

Hi...

On the irc.webchat.org network, occassionally they reset the servers and this results in your bots being deopped and having to re-identify themselves.

All the chanserv/nickserv scripts I have use easily identifies the bot and asks for ops when the bot joins a channel BUT doesnt handle the event of the bot no longer having ops and needing to re-identify itself and asking for ops again.

In summary, I'm after a script that does the following:

1. bot detects it no longer has ops
2. re-identifies itself to NickServ with:
/msg NickServ IDENTIFY <password>
3. ask ChanServ for ops with:
/msg ChanServ OP #<room> <nick>

Any help would be appriated...

Regards,

B|aDe
E
Evil-Dragon

Post by Evil-Dragon »

This is what I use to get my bot to identify to nickserv under the circumstances of services playing around:

## Begin Code ##

#Put Your Bots Nick Pass here
set nick_pass "passwordhere"

# Channels that the bot has ops in
set channels "#channel1 #channel2 #channel3"

# Set how often to check for ops (in minutes).
set loop_timer 5

#Manual Ident Response
bind pub +o !ident identify
bind dcc o|o ident identify

proc identify {nick uhost handle args} {
global nick_pass awaytext botnick channels
putserv "Nickserv :identify $nick_pass"
putlog "Identified to Nickserv for $botnick on Request by $nick"
set chan_tot [llength $channels]
for {set loop 0} {$loop < $chan_tot} {incr loop} {
if {![botisop [lindex $channels $loop]]} {
utimer 10 "do_op [lindex $channels $loop]"
putlog "Asking Chanserv for ops in channel [lindex $channels $loop]"
}
}
}
putlog "Manual identify response loaded - use !ident in channel or .ident in DCC Chat"
#Manual Ident End


#DalGetOPs timer
proc do_login {} {
global nick_pass loop_timer _loop_timer channels server
unset _loop_timer
if {$channels == "" || $nick_pass == ""} {
putlog "Error: Either channels or nickpass is not defined!"
unset _loop_timer
return 0
} else {
set chan_tot [llength $channels]
for {set loop 0} {$loop < $chan_tot} {incr loop} {
if {![botisop [lindex $channels $loop]]} {
putserv "NICKSERV IDENTIFY $nick_pass"
utimer 10 "do_op [lindex $channels $loop]"
putlog "Identifying to get ops in channel [lindex $channels $loop]"
}
}
set _loop_timer [timer $loop_timer do_login]
}
}

proc do_op {channel} {
global botnick
if {![botisop $channel]} {putserv "CHANSERV OP $channel $botnick"}
}

if {[info exists _loop_timer]} {killtimer $_loop_timer}
set _loop_timer [timer $loop_timer do_login]

putlog "Dalnet Getops (by Biffa) Revision v1.00 loaded."

## End Code ##

Btw this is not my code, it's from a script that i've had for a long time. All the best of luck!

Evil-Dragon
DALnet


User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

Biffa's DALgetops works too?
Dormant egghead.
C
ClubCX
Voice
Posts: 35
Joined: Mon Nov 19, 2001 8:00 pm
Location: Bournemouth, UK
Contact:

Post by ClubCX »

Try services.tcl by ClubCX.

It's in the tcl archive, or available at:
http://www.botservice.net/en/downloads/services.zip

The bot will check if it needs ops every 20 minutes, but you can also specify certain channels be 'op-critical', meaning the bot won't allow itself to stay deopped at all.

(As a note, this script will never flood services, and even if the same commands are somehow sent to the eggdrop's output queue twice, there's an elongated delay between commands to services, so the netadmins won't complain.)

- Billy
http://www.botservice.net
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

Actually, i have'nt seen your script working so fine.

Its always deopped, even on the critical channels.. unless i do .dump...

My mails to you regarding this were ignored, so i thought why not reach you, ClubCX, here.
Dormant egghead.
X
XRTC

Post by XRTC »

yeah Evil-Dragon this tcl is really kewl :smile:
B
B|aDe

Post by B|aDe »

Thanks guys for all your help.

I just edited the script i was using,
"Chanserv.tcl 0.1 by #egghelp@efnet (KuNgFo0)" and added in an extra line to make my bots msg nickserv first to re-identify themselves and then they'll ask chanserv for ops...pretty simple and straight forward..

Cheers...
C
ClubCX
Voice
Posts: 35
Joined: Mon Nov 19, 2001 8:00 pm
Location: Bournemouth, UK
Contact:

Post by ClubCX »

Yourname,

As for you comments about my script, here's an explanation...

The only time the bot should be deopped in an op-crit channel is if it has just logged on to the IRC server, having been disconnected (this does not include the bot's initial startup).

In this situation, it is *supposed* to call the identification procs using init-server as a trigger, but the proc is being called too early (before the bot even gets on irc) which is why its not identifying. If you were to wait until the next automatic login (which occurs at :15 :35 :55 past every hour) the bot would regain ops in the op-crit channels, and then retain them (unless cservice goes offline).

I will naturally examine the script and see if I can do something to fix this bug by the next release. If your bot, and the irc server its connected to, are stable this should never pose much of a problem ofc.

Additional fyi: when the bot DOES begin to identify, it will take about 6 seconds to regain ops in *each* channel. This is so as to avoid flooding the channels services, of which the sensitivity of the flood threshold varies from net to net. This is first and foremost a multi-network channel services interaction script, and I think it's fair to desist from flooding on any network, don't you?


I don't recall receiving any e-mail from you, perhaps botservice mail was offline at the time you sent it. Sorry I can't offer a better explanation on that.

- Tom
User avatar
Yourname
Master
Posts: 358
Joined: Mon Sep 24, 2001 8:00 pm
Location: Toronto

Post by Yourname »

:smile: I wudnt ask you for the explanation as it tends to happen sometimes.

About the mails, if the mail service were offline, the mails shud've bounced back, which didnt take place.

About the script, well, the bots are'nt getting their ops back even after 3 hours :smile:

(in op-crit channels i.e)

..Wud want you to look into it..
And yeah, the bots are on DALnet
Dormant egghead.
Locked