egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

"invalid command name "sumuser"" why?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
MrAnderson
Voice


Joined: 24 Aug 2004
Posts: 9
Location: Portugal

PostPosted: Mon Aug 15, 2005 6:04 pm    Post subject: "invalid command name "sumuser"" why? Reply with quote

hello

hi have a problem with this code:
Code:

bind pub - !transferir pub:transferir
proc pub:transferir {nick uhost hand chan text} {
set cromo1 [lindex $text 0]
set cromo2 [lindex $text 1]
set resto [lindex $text 2]
if {![matchattr $nick o]} {
   putserv "NOTICE $nick :No access!"; return 0}
if {$resto != "" || $cromo2 == ""} {
   putserv "NOTICE $nick : make: !transferir <nick1> <nick2>"; return 0
} elseif {[matchattr $cromo2 o] || ![validuser $cromo1] || ![validuser $cromo2] } {
   putserv "NOTICE $nick : ERRO: protech user / invalid user ";return 0
   } else {
sumuser $cromo1 $cromo2
   putserv "NOTICE $nick : Done"
}
}


this is the error:
[21:43] Tcl error [pub:transferir]: invalid command name "sumuser"
and the ideia is to do this:

### sumuser <user1> <user2>
transfers all stats from user2 to user1 and deletes user2
( stats.mod )

but, if i do the sumuser in the party line, we work's fine

(09:26:27pm) (vOdKa^Dj) .sumuser xblue oriety
(09:26:27pm) (Acessivel) Transferred stats from oriety to xblue and deleted oriety

hi have a tcl similar to this one, but whit "resetuser" and works fine
i not inderstand way this "sumuser" is only reconhece in the pary line and not outside, like the " resetsuser " and other's.

ty
_________________
Bruno, vOdKa^Dj @ PTnet
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Aug 15, 2005 6:24 pm    Post subject: Reply with quote

sumuser is dcc command, not Tcl command
Back to top
View user's profile Send private message Visit poster's website
MrAnderson
Voice


Joined: 24 Aug 2004
Posts: 9
Location: Portugal

PostPosted: Mon Aug 15, 2005 6:30 pm    Post subject: Reply with quote

demond wrote:
sumuser is dcc command, not Tcl command


ok, but this code for exemple:

Code:


proc pub:reset {nick uhost hand chan text} {
set addnick [lindex $text 0]
if {![matchattr $nick o} {
   putserv "NOTICE $nick :No access"; return 0
} elseif { ![validuser $addnick]} {
   putserv "NOTICE $nick : ERROR: Invalid user ( $addnick )"; return 0
} else {
resetuser $addnick $chan
   putserv "NOTICE $nick : the stats from $addnick was reset in $chan"
}
}




works fine, and resetuser is not a tcl command ?
_________________
Bruno, vOdKa^Dj @ PTnet
Back to top
View user's profile Send private message MSN Messenger
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Aug 15, 2005 6:57 pm    Post subject: Reply with quote

it obviously is
Back to top
View user's profile Send private message Visit poster's website
MrAnderson
Voice


Joined: 24 Aug 2004
Posts: 9
Location: Portugal

PostPosted: Mon Aug 15, 2005 7:34 pm    Post subject: Reply with quote

ok, tks

but is stange, some commands, like resetuser and other, be a tcl command, and works fine, but sumuser not.
_________________
Bruno, vOdKa^Dj @ PTnet
Back to top
View user's profile Send private message MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Aug 15, 2005 8:08 pm    Post subject: Reply with quote

Show us the proc of the dcc command sumuser then we can help create the proc sumuser to be used as a Tcl command.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Wed Aug 17, 2005 12:38 am    Post subject: Reply with quote

.sumuser can be implemented with [getstats] and [incrstats] (however I don't see Tcl command for deleting user from stats database, at least there's no such thing in stats.mod's README)
Back to top
View user's profile Send private message Visit poster's website
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Aug 17, 2005 10:19 am    Post subject: Reply with quote

if you have some C experience you might be able to copy the dcc command as tcl command.
the C <-> TCL commands are defined in tclstats.c line 174, the dcc command sumuser is in dcccmds.c on line 62.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber