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.

too many arguments error

Old posts that have not been replied to for several years.
Locked
t
tonyrayo
Voice
Posts: 20
Joined: Thu Jul 31, 2003 3:29 pm
Location: Waldorf, MD
Contact:

too many arguments error

Post by tonyrayo »

I have used this script in the past and have great results, as it has been the only script I've seen that can intercept nickserv messages and execute an ident. I am currently having a problem with running with the latest version of eggdrop. I was not using the channel part of the script, so I removed that, but left in any needed parts. Here is what the script looks like currently.

Code: Select all

set nickpass "*******"
set eggnick "massimo"
 
bind notc B "*This nickname is registered and protected.*" nickserv_sux
   
proc nickserv_sux { nick uhost hand text } { 
 global botnick eggnick nickpass
  if { $botnick == "$eggnick" } {
   putserv "PRIVMSG nickserv :identify $nickpass"
   putlog "Sending Identify to NickServ"
  } else {
   putlog "$eggnick is using a nick owned by someone else"
  }
}
 
bind dcc o nickserv nickserv
 
proc nickserv { hand idx mascara } {
 global nickpass
 putserv "PRIVMSG nickserv :identify $nickpass"   
}
 
putlog "Loading Bot_Identifyer Script, v0.4 -- By GiZZmo <vivas@usa.net> and Buster_ <ejr@infonet.com.br> - Edited by DBG"
That last line is all on one line btw. When I manually ident, it works fine, but when the NickServ bot sends the message asking it to identify, I get this responce from the bot:

[ massimo ] [23:10] Tcl error [nickserv_sux]: called "nickserv_sux" with too many arguments
[ massimo ] [23:10] Tcl error [nickserv_sux]: called "nickserv_sux" with too many arguments

If you could help in any way it would be great. Thank you for your time. :)
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

Newer eggdrop versions added an additional argument to nick binds.

Change

Code: Select all

proc nickserv_sux { nick uhost hand text } {
to

Code: Select all

proc nickserv_sux { nick uhost hand chan newnick } {
Since your script doesn't use $text this shouldn't affect its behaviour.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

from tcl-commands.doc:
NOTC (stackable)
bind notc <flags> <mask> <proc>
procname <nick> <user@host> <handle> <text> <dest>

Description: dest will be a nickname (the bot's nickname,
obviously) or a channel name. mask is matched against the entire
notice and can contain wildcards. It is considered a breach of
protocol to respond to a /notice on IRC, so this is intended for
internal use (logging, etc.) only. Note that server notices do not
trigger the NOTC bind.

New Tcl procs should be declared as
proc notcproc {nick uhost hand text {dest ""}} {
global botnick; if {$dest == ""} {set dest $botnick}
...
}
for compatibility.
Module: server
always see this file when u have such TCL errors.
User avatar
slennox
Owner
Posts: 593
Joined: Sat Sep 22, 2001 8:00 pm
Contact:

Post by slennox »

:oops:

I should pay closer attention.
t
tonyrayo
Voice
Posts: 20
Joined: Thu Jul 31, 2003 3:29 pm
Location: Waldorf, MD
Contact:

Post by tonyrayo »

thx to both of you, i'll try to take the info you have given and fix it =)
Locked