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.

SETIDENT Issue

Help for those learning Tcl or writing their own scripts.
Post Reply
D
DragonRyder
Voice
Posts: 12
Joined: Thu Nov 22, 2007 9:12 pm
Location: USA
Contact:

SETIDENT Issue

Post by DragonRyder »

Found a script by Xenogear. It has been changed some since I found it.
here is the code:

Code: Select all

#Put Your Server Identify Command
set identcmd "identify"
#Put Your Bot Nick  Password"
set identpass "SOMETHING"
#Put Your NickServ Services Nick
set nickserv "NickServ"

# Change this to what nickserv says on connection
bind notc - "*This nickname is registered and protected*" identify:notc
#It's Okay  Right Now ... Never Change It If U Are Beginner In Tcl Scripts
proc identify:notc { nick uhost handle text dest } { 
 global botnick nickserv identcmd identpass 
 if { $nick == $nickserv } {
  puthelp "PRIVMSG $nickserv $identcmd $identpass"
  putserv "SETIDENT NewIdent"
  putlog "Identifying : $nickserv (as $botnick)"
 }
}
putlog "Nick Identify Script Has Been Loaded make by Blue ... Repaired By Xenogear"
this part of the code is not working:

Code: Select all

putserv "SETIDENT NewIdent"
Am I doing something wrong here? I Looked through the forums, and found the SETIDENT in 2 post and mine matches what is in the archives from back in 2001. I understand code does change some over time and this is 2011 (tens years since the archive messages i found)

Can anyone help me figure out what I am doing wrong? Running an UnrealIRCd Network with Anope Services (latest stable of both).

In mIRC for the fun of it i ran a timer that made me change my own ident using the /SETIDENT command and doing a whois to see it had changed, and it had. but for some reason it is not working from within the TCL script.

ps i even tried putquick and puthelp, nothing has worked so far.
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Re: SETIDENT Issue

Post by speechles »

Code: Select all

  puthelp "PRIVMSG $nickserv $identcmd $identpass"
  putserv "SETIDENT NewIdent" 
See the problem...??

It's priority... To eggdrop here is the rule:

1) Any and all put-quick messages in the queue, send them all before any other.
2) Any and all put-serv messages in the queue, send them all after all put-quick messages are exhausted, but before any put-helps.
3) Lastly, any put-help messages in the queue, send them finally. After all put-quick and put-serv messages are exhausted.


So your problem, is when you ident, you are using puthelp. This message wont be sent right away. Next you putserv your ident set. This will actually be done before it has idented now. This won't be possible. So instead, try this... where those 2 lines above are.

Code: Select all

  putserv "PRIVMSG $nickserv $identcmd $identpass"
  putserv "SETIDENT NewIdent" 
Now they are within the same queue priority and will happen in the predicted order they are in now.
Post Reply