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.

How do I auto-identify on AstroLink?

Old posts that have not been replied to for several years.
Locked
A
Assmonkey
Voice
Posts: 11
Joined: Tue Nov 11, 2003 3:19 pm

How do I auto-identify on AstroLink?

Post by Assmonkey »

I want my eggdrop to automatically identify with NickServ when it connects to the server (AstroLink in my case).

I tried using this:

Code: Select all

proc evnt:init_server {type} {
  global botnick
puthelp "PRIVMSG NickServ :identify <password>"
putserv "MODE $botnick +x"
}
But it takes way too long to actually execute. It identfies about 30-45 seconds after I have connected to the server and within 5 seconds I (or the eggdrop rather) have already joined all channels and thus doesn't get auto-opped, hopped or voiced.

And as for executing the MODE change, it doesn't happen at all and I can't figure out why.
When I'm on AstroLink, I just type /mode +x to activate it.

Help! Please? :)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

make a Notc bind, to catch when password accepted so the bot will op itself on all channels. Or you can try using putquick instead of puthelp, but I'm not sure that would help.

As for the mode, it should work. How did you find out that its not working ?
A
Assmonkey
Voice
Posts: 11
Joined: Tue Nov 11, 2003 3:19 pm

Post by Assmonkey »

By whois'ing myself. When mode +x is activated, it will not show my real hostname.
And you are right putquick doesn't change anything, I already tried that before making my post here. :(
A
Assmonkey
Voice
Posts: 11
Joined: Tue Nov 11, 2003 3:19 pm

Post by Assmonkey »

Sir_Fz wrote:make a Notc bind, to catch when password accepted so the bot will op itself on all channels.
I would if I knew how. :(
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 - "*password accepted*" self:op

proc self:op {nick uhost hand arg dest} {
if {[string tolower $dest] == [string tolower $::botnick]} {
 foreach chan [channels] {
  putserv "PRIVMSG chanserv :op $chan $::botnick"
  }
 }
}
edit "*password accepted*" to suite your services notice (when password is accepted). Aslo change chanserv's nick and op command if they're wrong.
A
Assmonkey
Voice
Posts: 11
Joined: Tue Nov 11, 2003 3:19 pm

Post by Assmonkey »

OK, I created a script using your help and through reading other similar scripts.
It now auto identfies and succesfully sets mode +x.

But there's still one thing I want it to do but I don't know how.

I want the script to set +inactive on all channels I'm on when loading the eggdrop. Then when it has identified and set mode +x, I want it to remove the +inactive setting from all channels which will make it join the channels.

Is this possible, and if so, how?

Thanks again for the help. :)
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

add this into the init-server proc

Code: Select all

foreach chan [channels] { channel set $chan +inactive }
and use this code to join channels when password accepted:

Code: Select all

bind notc - "*password accepted*" join:chans

proc join:chans {nick uhost hand arg dest} {
if {[string tolower $dest] == [string tolower $::botnick]} {
 foreach chan [channels] {
  channel set $chan -inactive
  }
 }
}
I guess by the time the password is accepted the bot would've set mode +x.
A
Assmonkey
Voice
Posts: 11
Joined: Tue Nov 11, 2003 3:19 pm

Post by Assmonkey »

Excellent stuff! :)

It does work kinda (not your fault though).

The thing is that on AstroLink you have to identify before you can set mode +x. :(

So I have set the script so that it identifies first. And when the server sends the "password accepted" notice, the script sets mode +x.
The problem is that the server doesn't say anything about it being successful or not even though I know that it worked, so this forces me to bind the disabling of the +inactive also on the "password accepted" string but the bot joins the channels before it has time to set mode +x.

Any other solution? Is there maybe a way to set a timer on the +inactive setting?
A
Assmonkey
Voice
Posts: 11
Joined: Tue Nov 11, 2003 3:19 pm

Post by Assmonkey »

This is what the script looks like now (if it helps):

Code: Select all

# CHANGE THIS VALUE TO YOUR NICKNAME PASSWORD #
set nickpass "password"

# CHANGE THIS VALUE TO THE NICKNAME OR ADDRESS OF NICKSERV #
set nickserv "NickServ"

# CHANGE THIS VALUE TO THE IDENTIFY COMMAND OF NICKSERV #
set command "identify"

# CHANGE THIS VALUE TO WHAT NICKSERV SAYS WHEN ASKING FOR IDENTIFICATION #
set askpass "*please identify*"

# CHANGE THIS VALUE TO WHAT NICKSERV SAYS WHEN SUCCESFULLY IDENTIFIED #
set passacpt "*password accepted*"

# CHANGE THIS VALUE TO WHAT MODES YOU WANT SET ON THE BOT #
set modeset "+ix"

##############################################################

bind notc - "$askpass" identify
bind notc - "$passacpt" modechange
bind notc - "*authentication successful*" join:chans



proc identify { nick uhost hand args } {
 global botnick nickpass nickserv command

    putlog "--- Identification request received! ---"
    putserv "PRIVMSG $nickserv :$command $nickpass"
    putlog "--- Password sent, please wait! ---"
  }

proc modechange { nick uhost hand args } {
 global modeset botnick 
    putlog "--- Attempting modechange! ---"
    putserv "MODE $botnick $modeset"
    putlog "--- Command sent, please wait! ---"
  }

proc join:chans { nick uhost hand arg dest } { 
if {[string tolower $dest] == [string tolower $::botnick]} { 
 foreach chan [channels] { 
  channel set $chan -inactive 
  } 
 } 
}
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Why not do it like this. On init-server let the bot set chans +inactive and identify. When password is accepted let the bot set its modes and make a utimer to set chans -inactive.
Locked