BaroqueW

and his side-kick nikkitaa

Autoregistration to Nickserv for your eggdrop bot

with 6 comments

I guess when people set a bot for themselves, to use on IRC, they want it to identify its name, especially when it ends up managing a channel. Here is how to configure this (somewhat summarily, but at least you don’t have to install a script) for your eggdrop.

Edit eggdrop.conf to look like below, set nick “Mybot” and other lines are already present but at least you see where to add the lines:

# Set the nick the bot uses on IRC, and on the botnet unless you specify a
# separate botnet-nick, here.
set nick "Mybot"
set identpass "mypass"   # set the variables used to register (identpass, nickserv, identcmd)
set nickserv "NickServ@services.dal.net"   # It is safer to use the full nickserv identifier, not jut "nickserv"
set identcmd "IDENTIFY"

# Set the alternative nick which the bot uses on IRC if the nick specified
# by 'set nick' is unavailable. All '?' characters will be replaced by random
# numbers.
set altnick "MybotX?"

# Set what should be displayed in the real-name field for the bot on IRC.
# This can not be blank, it has to contain something.
set realname "It's my bot"

# This is a Tcl script to be run immediately after connecting to a server.
bind evnt - init-server evnt:init_server

proc evnt:init_server {type} {
  global botnick nickserv identcmd identpass # don't forget to tell the script to use the global variables we defined above
  putquick "MODE $botnick +i-ws"
  putquick "PRIVMSG $nickserv :$identcmd $identpass"  # we will identify on connect
}

# All this is new
# Upon receiving "*This nickname is owned by someone else.*", we will try to identify
bind notc - "*This nickname is owned by someone else.*" identify:notc
proc identify:notc { nick uhost handle text dest } {
 global botnick nickserv identcmd identpass
  if { $nick == $nickserv } {
    puthelp "PRIVMSG $nickserv :$identcmd $identpass"
      putlog "Identifying : $nickserv (as $botnick)"
       }
       }

Written by baroquew

December 21, 2008 at 10:52

6 Responses

Subscribe to comments with RSS.

  1. Hello,
    I have already seen it somethere…

    Have a nice day
    Pett

    Pett

    March 16, 2009 at 10:59

  2. Hi, very nice post. I have been wonder’n bout this issue,so thanks for posting

    KattyBlackyard

    June 15, 2009 at 01:26

  3. Or, for freenode, you can just supply the password with the server like:
    set servers [ irc.freenode.net:6667:PASSWD }

    I am unsure as to other networks.

    grtz.

    brabo

    August 8, 2009 at 10:50

  4. correction:
    set servers { irc.freenode.net:6667:PASSWD }

    grtz.

    brabo

    August 8, 2009 at 10:51

  5. What blog script do you use on your site ?

    lornetki sklep

    December 29, 2009 at 21:43

    • I guess now that I migrated back on wordpress.com it is more obvious…

      baroquew

      February 7, 2010 at 17:00


Leave a Reply