I guesss so. But that would always be handy if someone is using the bot's nick at anytime, not only when it has an enforcer or when it is held.Alchera wrote:Given the second scenario would ghosting the nick be an easier solution?
where put the nick of the eggdrop and the passwd of the eggdrop ?¿awyeah wrote:What you can do here is directly bind to the raw number as you have done, 432 if its correct or string match the $arg or $text var.
This is the raw and not 'Server say nick is invalid.' You will need to match for the following text:
The nick asskicker is currently being held by a Services Enforcer. If you are the nicks owner, use /msg NickServ@services.dal.net RELEASE asskicker password to release the nickname. If the nickname recently expired, please wait patiently and try again later. [asskicker]Note: I used puthelp for the delay in releasing the nick after you are connected and putquick -next for the nick change when you are connecting, which might solve it, if possible.Code: Select all
bind raw - 432 nickserv:release proc nickserv:release {from keyword arg} { global botnick nickpass nick altnick putquick "NICK $altnick" -next #putquick "NICK $nick[rand 10][rand 10]" #for alternative nick puthelp "PRIVMSG NickServ@services.dal.net :RELEASE $nick $nickpass" return 0 } or bind raw - * nickserv:release proc nickserv:release {from keyword arg} { global botnick nickpass nick altnick if {([string match "*The nick * is currently being held by a Services Enforcer. If you are the nicks owner*" $arg])} { putquick "NICK $altnick" -next #putquick "NICK $nick[rand 10][rand 10]" #for alternative nick puthelp "PRIVMSG NickServ@services.dal.net :RELEASE $nick $nickpass" return 0 } }
The thing is, mostly it doesn't let you kill the enforcer or release the nick when it gives you the raw message. You have to switch to an alternative nick, then bind init-server or something then go ahead and release that nick after you have connected to the server, not while you are connecting to it or when it is giving you that error message.
You cannot release the nick enforcer when it gives you that error message, and that is really crappy I say, the coders should atleast let people release it when they get the error while connecting.
The thing is that you are not fully connected to the client server, hence you cannot message nickserv to release your nick while you get that message. Untill you are fully connected then only you can.
Code: Select all
set aslinick $nick
set needrelease 0
bind raw - 432 release_nick
proc release_nick {from key text} {
global botnick nick altnick needrelease
if {[string match "*Services*RELEASE*nickname*please wait patiently and try again later*" " $text "]} {
set keep-nick 0
set needrelease 1
set nick "$altnick"
putlog "Change nick to $altnick and then jump."
jump
}
}
bind notc - "*Do not share your password with anyone*" releasenick2
proc releasenick2 {n uhost hand text dest} {
global nickbot passwordbot needrelease aslinick
set nickserv "nickserv"
if {$needrelease == 1} {
if {[string match [string tolower $n] [string tolower $nickserv]]} {
putlog "Release to NickServ for $aslinick."
putserv "PRIVMSG NickServ@services.dal.net :release $aslinick $passwordbot"
}
}
}
bind notc - "The nickname * has been released." success_release
proc success_release {n uhost hand text dest} {
global nickbot passwordbot needrelease aslinick
set nickserv "nickserv"
if {$needrelease == 1} {
if {[string match [string tolower $n] [string tolower $nickserv]]} {
putlog "Success Release."
putserv "NICK $aslinick"
set keep-nick 1
set needrelease 0
set nick "$aslinick"
putlog "Change nick to $aslinick"
}
}
}
bind notc - "*is currently being held by a Services Enforcer. If you are the nicks owner, use *msg NickServ@services.dal.net RELEASE*" notc_nick_release
proc notc_nick_release {n uhost hand text dest} {
global nickbot passwordbot needrelease aslinick
set nickserv "nickserv"
if {$needrelease == 0} {
if {[string match [string tolower $n] [string tolower $nickserv]]} {
putlog "Release to NickServ for $aslinick."
putserv "PRIVMSG NickServ@services.dal.net :release $aslinick $passwordbot"
set keep-nick 0
set needrelease 1
set nick "$altnick"
putlog "Change nick to $altnick"
putserv "NICK $altnick"
}
}
}
putlog "nick release v 0.1"
Code: Select all
set aslinick $nick
set needrelease 0
Code: Select all
set aslinick $nick
set needrelease 0
set passwordbot "PutYourBotPassHere"