i found this scipt on forums (and this is only script which at last half worked for me), but it doesn't working so i fixed it a little, but still having Tcl error [identnick]: wrong # args: should be "identnick" error when it try to identify afeter gets its nick recovered
Code: Select all
# nickserv event driven identify script
set nickserv "NickServ"
set chanserv "ChanServ"
set mynick "Devastation"
set mypass "*"
set recovery 1
set mydebug 1
bind evnt - init-server my-initserver
#bind motd - "*For more information please see http://noneatall/*" my-initserver
bind notc - "*nickname is registered*" identnick
bind notc - "*password accepted*" authsuccess
bind raw - 436 { set recovery 1 }
bind need - "% op" needop
proc my-initserver {type} {
nickservices
}
proc nickservices {} {
global mydebug passauth channels recovery
if {$mydebug} { putlog "Nickservices started" }
# turn channels off until ident complete
chanoff
if {$recovery} { recovernick }
# ok we are done Smile
if {$mydebug} { putlog "Nickservices finished" }
}
proc authsuccess {} {
global mydebug
if {$mydebug} { putlog "Authenticaion Success" }
# turn channels back on
chanon
unbind notc - "password accepted" authsuccess
unbind notc - "please choose a different nick" identnick
unbind raw - 436 { set recovery 1 }
}
# turn all channels on
proc chanon {} {
global mydebug channels
if {$mydebug} { putlog "Channels set active" }
foreach ch [channels] {
channel set $ch -inactive
}
}
# turn all channels off
proc chanoff {} {
global mydebug channels
if {$mydebug} { putlog "Channels set inactive" }
foreach ch [channels] {
channel set $ch +inactive
}
}
proc recovernick {} {
global mydebug mynick mypass nick nickserv
if {$mydebug} { putlog "Recovering nick" }
bind notc - "RELEASE $mynick" releasenick
putserv "PRIVMSG $nickserv :RECOVER $mynick $mypass"
}
proc releasenick {} {
global mydebug mynick mypass nick nickserv
if {$mydebug} { putlog "Releasing nick" }
unbind notc - "RELEASE $mynick" releasenick
bind notc - "your nick has been released" revertnick
putserv "PRIVMSG $nickserv :RELEASE $mynick $mypass"
}
proc revertnick {} {
global mydebug nick mynick
if {$mydebug} { putlog "Reverting nick" }
unbind notc - "your nick has been released" revertnick
set nick mynick
}
proc identnick {} {
global mydebug nickserv mypass
if {$mydebug} { putlog "Identify myself" }
putserv "PRIVMSG $nickserv :IDENTIFY $mypass"
}
proc needop {channel type} {
global mydebug chanserv nick
if {$mydebug} { putlog "I need ops" }
putserv "PRIVMSG $chanserv :OP $channel $nick"
}