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.

tcl script that refuses to work

Old posts that have not been replied to for several years.
Locked
S
Syntax
Voice
Posts: 10
Joined: Sun Oct 05, 2003 2:37 pm

tcl script that refuses to work

Post by Syntax »

Code: Select all

proc identify_notc { nick uh hand text } { 
 global botnick nickserv identcmd identpass
 if {[string match [string tolower $nick] [string tolower $nickserv]]} {
  putserv "PRIVMSG $nickserv :$identcmd $identpass"
  putlog "Identifying: $nickserv (as $botnick)"
 }
}
it refuses to work all i get is

Code: Select all

Tcl error: wrong # args: should be "identify_notc nick uh hand text"
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Re: tcl script that refuses to work

Post by Xpert »

Syntax wrote:

Code: Select all

proc identify_notc { nick uh hand text } {
Should be:

Code: Select all

proc identify_notc {nick uh hand text} {
also, you can change this line:

Code: Select all

if {[string match [string tolower $nick] [string tolower $nickserv]]} {
to:

Code: Select all

if {[string match -nocase "$nick" "$nickserv"]} {
:)
Xpert.
S
Syntax
Voice
Posts: 10
Joined: Sun Oct 05, 2003 2:37 pm

Post by Syntax »

Nope still refuses to work
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

Where is the bind of the code?
Xpert.
S
Syntax
Voice
Posts: 10
Joined: Sun Oct 05, 2003 2:37 pm

Post by Syntax »

bind notc - "*This nickname is registered and protected*" identify_notc
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

proc identify_notc {nick uh hand text dest} {
Elen sila lúmenn' omentielvo
S
Syntax
Voice
Posts: 10
Joined: Sun Oct 05, 2003 2:37 pm

Post by Syntax »

Tcl error: wrong # args: should be "identify_notc nick uh hand text dest"
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

This code must work:

Code: Select all

bind notc - "*This nickname is registered and protected*" identify_notc
proc identify_notc {nick host hand text dest} { 
  global botnick nickserv identcmd identpass 
  if {[string match -nocase "$nick" "$nickserv"]} {
    putserv "PRIVMSG $nickserv :$identcmd $identpass" 
    putlog "Identifying: $nickserv (as $botnick)" 
  } 
}
Xpert.
S
Syntax
Voice
Posts: 10
Joined: Sun Oct 05, 2003 2:37 pm

Post by Syntax »

gah still
Tcl error: wrong # args: should be "identify_notc nick host hand text dest"

Tcl version: 8.4.2 (header version 8.4.2)
running eggdrop v1.6.15
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

When do you get the error? Where do you see the error?
S
Syntax
Voice
Posts: 10
Joined: Sun Oct 05, 2003 2:37 pm

Post by Syntax »

dcc chat
i try to run the proc mannually too and still same error
.tcl identify_notc

but all i get is that tcl error message
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

That's the problem then -- you are running it wrong. It expects arguments and you are giving it none. Try:

.tcl identify_notc somenick uhost hand text dest
Locked