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.

Can't get my bot to ID after a netsplit

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

Can't get my bot to ID after a netsplit

Post by Synapse »

My bot needs to id to nickserv in order to get ops.

Does anyone know how to convert a simple irc id into tcl so I can add it as a script please.

Connecting with a regged nick on this network you get:
-NickServ- This is a registered nick, please identify to NickServ now.
-
-NickServ- To identify, use /ns id <password>
-
-NickServ- Nick will be changed in 30 seconds if you do not identify.

And the perform I use is:
/msg nickserv identify PASS

The bot needs to do it on connect.



I tried a premade tcl script but that seemed to cause conflicts with my bot and it refused to load until I removed it
:-?

Many thanks in advance
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind notc - "*please identify to NickServ now*" identify:nick
bind notc - "*password accepted*" self:op

proc identify:nick {nick uhost hand dest arg} {
if {([string tolower $dest] == [string tolower $::botnick]) && ($nick == NickServ)} {
 putserv "PRIVMSG nickserv :identify PASS"
 }
}

proc self:op {nick uhost hand dest arg} {
if {([string tolower $dest] == [string tolower $::botnick]) && ($nick == NickServ)} {
 foreach chan [channels] {
  putserv "PRIVMSG chanserv :op $chan $::botnick"
  }
 }
}
this will let the bot identify on notice and op itself when password accepted.

dont forget to edit the PASS and the password accepted message (if needed) to suit you.
S
Synapse

Post by Synapse »

Many thanks for the reply - that's great :)

this will let the bot identify on notice and op itself when password accepted.

dont forget to edit the PASS and the password accepted message (if needed) to suit you.
Confirmation from nickserv is:
[21:35] -NickServ- Password for BOTNICK accepted.

Would that require a slight alteration to the script?
D
Darkj
Halfop
Posts: 86
Joined: Sun Jul 06, 2003 9:58 pm

Post by Darkj »

just change

bind notc - "*password accepted*" self:op

to

bind notc - "*password for*accepted*" self:op

that should work
S
Synapse

Post by Synapse »

That's fantastic. I'll try it and let you know.
Many thanks again.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You should've figured that by yourself, its pretty obvious what to change.
S
Synapse

Post by Synapse »

*sigh*
This one doesn't work either. The bot doesn't ID to nickserv and when I do it manually I now get this error.

Tcl error [self:op]: syntax error in expression "([string tolower $dest] == [string tolower $::botnick]) && (...": variable references require preceding $

I've obviously missed something. Maybe I need to specify nick and channels in that argument somewhere.

Oh well - thanks for trying anyway
User avatar
z_one
Master
Posts: 269
Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada

Post by z_one »

Synapse wrote:
Tcl error [self:op]: syntax error in expression "([string tolower $dest] == [string tolower $::botnick]) && (...": variable references require preceding $


Change both lines that say:

Code: Select all

if {([string tolower $dest] == [string tolower $::botnick]) && ($nick == NickServ)} {

into

Code: Select all

if {([string tolower $dest] == [string tolower $::botnick]) && ([string tolower $nick] == "nickserv")} {
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I had that once and i fixed it like this:

Code: Select all

if {("[string tolower $dest]" == "[string tolower $::botnick]") && ("$nick" == "NickServ")} {
NickServ is always the same (capital N and S) so no need to do string tolower here.
Locked