###########################################################
#
#    Identify 1.0 tcl for eggdrop (20/01/2005)
#    by lnx85 at #lnxlabs on AzzurraNet (irc.azzurra.org)
#    E-mail: lnx85@lnxlabs.it
#
#    Impostare la password del nick nella variabile identify(pass) (vedi GLOBALS)
#    Lo script èensato per Azzurra ma, con qualche piccola modifica, èdattabile
#    anche ad altri Network
#
###########################################################

### GLOBALS ###
set identify(pass) "mettici la password del nick del bot qui"
set identify(ns) "NickServ!services@services.simosnap.com"
set identify(cs) "ChanServ!services@services.simosnap.com"
### END GLOBALS ###

### BINDS ###
bind evnt - init-server identify:identify
bind notc - *nick*regist*Nickserv*password* identify:notice
bind notc - *rimangono*secondi*cambiare*automaticamente* identify:notice
### END BINDS ###

### PROCS ###
proc identify:identify { type } {
        set ns [ lindex [ split $::identify(ns) "!" ] 0 ]
        putserv "PRIVMSG $ns :IDENTIFY $::identify(pass)"
}

proc identify:notice { nick host handle text dest } {
        set ns [ lindex [ split $::identify(ns) "!" ] 0 ]
        putserv "PRIVMSG $ns :IDENTIFY $::identify(pass)"
}
### END PROCS ###

### INITIAL ###
if { ! [ validuser [ finduser $::identify(ns) ] ] } {
        adduser NS [ lindex [ split $::identify(ns) "!" ] 1 ]
        chattr NS +f
}
if { ! [ validuser [ finduser $::identify(cs) ] ] } {
        adduser CS [ lindex [ split $::identify(cs) "!" ] 1 ]
        chattr CS +f
}
putlog "\037IDENTIFY\037 \002::\002 \037LOADED\037 version 1.0 by lnx85"

