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 

statspublic problem !

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
xbox-kult
Voice


Joined: 16 Aug 2007
Posts: 11

PostPosted: Thu Aug 16, 2007 4:34 pm    Post subject: statspublic problem ! Reply with quote

Hallo / Hello,

habe ein Problem bei dem script statspublic.tcl alles soweit eingericht und auch die die befehle per +cmd zugelassen.

Wenn ich jetzt ein befehl testen möchte bekomme ich folgenes in der Partyline:

[22:04] Tcl error [stats_stat]: invalid command name "*pub:!stat"

habe ich irgendwas vergessen oder was könnte der fehler sein !

THX und MFG

Hallo / Hello,

a problem with script statspublic.tcl everything has so far in court and also those instructs by +cmd certified.

If I an instruction to now test would like get I folgenes in the party LINE:

[22:04] Tcl error [stats_stat]: invalid command name "*pub:!stat"

I forgot something or which the error could be!

THX und MFG
Back to top
View user's profile Send private message
xbox-kult
Voice


Joined: 16 Aug 2007
Posts: 11

PostPosted: Thu Aug 16, 2007 5:15 pm    Post subject: Reply with quote

Hallo,

ok habe das stats-puplic datei mal einen ferund gesendet und er sagt das script kann so garnicht richtig laufen / bzw läuft es so garnicht ausser das nur fehler kommen schade dadurch das mein egg ja schon installiert ist kann ich ja nachträglich keine mod einbauen...

.....oder geht da doch noch was ?

evnetuell kann sich ja nochmal jemand das stats-puplic.tcl anschauen und funktionstüchtig machen weil so würde ich das script gut finden.

täusche ich mich was die benutzbarkeit angeht würde ich mich über die korrekte installations aneitung freuene bzw was geändert oder zugefügt werden muss

MFG
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Fri Aug 17, 2007 1:01 am    Post subject: Reply with quote

sorry, I don't speak german, but it seems that the procedure stats_stat is erroring, so why don't you copy/paste that proc here so we can see it
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
xbox-kult
Voice


Joined: 16 Aug 2007
Posts: 11

PostPosted: Fri Aug 17, 2007 9:20 am    Post subject: Reply with quote

OK ! Wink


Hello,

ok has stats puplic file times one ferund sent and it says script can run correctly/and/or does not run in such a way it so not except only error comes unfortunate by it the mine egg is already installed can I later none mod insert…

…. or goes there nevertheless still which?

evnetuell again someone can stats puplic.tcl look at itself and make functional because I in such a way to find script good.

I deceive which the usability concern myself became I me over the correct installation aneitung freuene and/or which must be changed or caused

MFG

Code:
#################### stats-public.tcl ############################
## Ein schönes TCL was dazu dient um das Stats.mod über
## Channelbefehle zu steuern.
##
## Diese Befehle stehen allen Moderatoren und Operatoren
## zu verfügung.
##
## Settings:
## Statistik Befehle
## ein: !stats +cmd <top10|ttop10|top20|ttop20|stat|tstat|place|tplace|all>
## aus: !stats -cmd <top10|ttop10|top20|ttop20|stat|tstat|place|tplace|all>
##
## User ausschließen von der Channel-Statistik
## ein: !stats +user <nick>
## aus: !stats -user <nick>
##
## User zurücksetzen (resetuser)
## reset: !stats reset <nick>
##
##
## viel spaß damit
## ©2002-2003 by  BlackDeath
################### stats-public.tcl ##############################

catch "unbind pub - !top10 *pub:!top10"
catch "unbind pub - !ttop10 *pub:!ttop10"
catch "unbind pub - !top20 *pub:!top20"
catch "unbind pub - !ttop20 *pub:!ttop20"
catch "unbind pub - !stat *pub:!stat"
catch "unbind pub - !tstat *pub:!tstat"
catch "unbind pub - !place *pub:!place"
catch "unbind pub - !tplace *pub:!tplace"
catch "unbind pub - !wordstats *pub:!wordstats"
catch "unbind pub - !topwords *pub:!topwords"



bind pub - !top10 stats_top10
bind pub - !ttop10 stats_ttop10
bind pub - !top20 stats_top20
bind pub - !ttop20 stats_ttop20
bind pub - !stat stats_stat
bind pub - !tstat stats_tstat
bind pub - !place stats_place
bind pub - !tplace stats_tplace
bind pub - !wordstats stats_wordstats
bind pub - !topwords stats_topwords



proc stats_top10 {nick uhost hand chan rest} {
if {[stats_cmd "top10" $chan]} {
*pub:!top10 $nick $uhost $hand $chan $rest
}
}

proc stats_ttop10 {nick uhost hand chan rest} {
if {[stats_cmd "ttop10" $chan]} {
*pub:!ttop10 $nick $uhost $hand $chan $rest
}
}

proc stats_top20 {nick uhost hand chan rest} {
if {[stats_cmd "top20" $chan]} {
*pub:!top20 $nick $uhost $hand $chan $rest
}
}

proc stats_ttop20 {nick uhost hand chan rest} {
if {[stats_cmd "ttop20" $chan]} {
*pub:!ttop20 $nick $uhost $hand $chan $rest
}
}

proc stats_stat {nick uhost hand chan rest} {
if {[stats_cmd "stat" $chan]} {
*pub:!stat $nick $uhost $hand $chan $rest
}
}

proc stats_tstat {nick uhost hand chan rest} {
if {[stats_cmd "tstat" $chan]} {
*pub:!tstat $nick $uhost $hand $chan $rest
}
}

proc stats_place {nick uhost hand chan rest} {
if {[stats_cmd "place" $chan]} {
*pub:!place $nick $uhost $hand $chan $rest
}
}

proc stats_tplace {nick uhost hand chan rest} {
if {[stats_cmd "tplace" $chan]} {
*pub:!tplace $nick $uhost $hand $chan $rest
}
}

proc stats_wordstats {nick uhost hand chan rest} {
if {[stats_cmd "wordstats" $chan]} {
*pub:!wordstats $nick $uhost $hand $chan $rest
}
}

proc stats_topwords {nick uhost hand chan rest} {
if {[stats_cmd "topwords" $chan]} {
*pub:!topwords $nick $uhost $hand $chan $rest
}
}

set stats_commands {top10 ttop10 top20 ttop20 stat tstat place tplace wordstats topwords}

proc stats_cmd {cmd chan} {
global stats_cmd
stats_cmd_load $chan
set cmd [string tolower $cmd]
if {[info exists stats_cmd($chan,$cmd)]} {
return $stats_cmd($chan,$cmd)
} else {
return true
}
}

proc stats_cmd_load {chan} {
global stats_cmd
global stats_commands
if {[info exists stats_cmd($chan,-loaded-)]} { return }
set filename [string tolower $chan]
set filename "statscom.cmd"
catch {
set f [open $filename r]
while {[gets $f line] >= 0} {
set switch [string range $line 0 0]
set cmd [string tolower [string range $line 1 end]]
set idx [lsearch $stats_commands $cmd]
if {$idx >= 0} {
switch -- $switch {
"+" {set stats_cmd($chan,$cmd) true}
"-" {set stats_cmd($chan,$cmd) false}
}
}
}
close $f
} resp
set stats_cmd($chan,-loaded-) ""
}

proc stats_cmd_save {chan} {
global stats_cmd
global stats_commands
set filename [string tolower $chan]
set filename "statscom.cmd"
catch {
set f [open $filename w]
foreach cmd [split $stats_commands] {
set cmd [string tolower $cmd]
set opt "+"
if {[info exists stats_cmd($chan,$cmd)]} {
if {$stats_cmd($chan,$cmd)} {
set opt "+"
} else {
set opt "-"
}
}
puts $f "${opt}${cmd}"
}
close $f
}
}

bind pub - !stats stats_switch
bind bot - "stats-user" stats_bot_user

proc stats_schattr {nick user opt} {
if {$opt} {
set opt "+list"
set opt_str "ein"
} else {
set opt "-list"
set opt_str "aus"
}

catch {
set dcclist [dcclist TELNET]
set dcc [lindex $dcclist 0]
set xtra [lindex $dcc 4]
set port [lindex $xtra 1]
set idx [connect localhost $port]
set hdl [idx2hand $idx]
catch { *dcc:schattr $hdl $idx "$user $opt" } result
after 1
killdcc $idx
if {$result != "0"} {
return $result
}
} result
if {$result == ""} {
puthelp "NOTICE $nick :Anzeigen der Statistiken für Benutzer $user in allen Räumen ${opt_str}geschaltet"
putlog "modpub.tcl: $nick changes $user to $opt"
} else {
puthelp "NOTICE $nick :Fehler beim Umschalten des Statistiken: $result"
}
return
}


proc stats_switch_cmd {nick chan cmd opt} {
global stats_cmd
global stats_commands
stats_cmd_load $chan
if {$opt} {
set opt_str "ein"
} else {
set opt_str "aus"
}
if {[string tolower $cmd] == "all"} {
foreach cmd [split $stats_commands] {
set cmd [string tolower $cmd ]
set stats_cmd($chan,$cmd) $opt
}

puthelp "NOTICE $nick :Alle Befehle im Raum $chan ${opt_str}geschaltet"
stats_cmd_save $chan
return
}

set cmd [string tolower $cmd]
set idx [lsearch $stats_commands $cmd]
if {$idx == -1} {
puthelp "NOTICE $nick :Falscher Befehl \"$cmd\""
return
}

set stats_cmd($chan,$cmd) $opt
puthelp "NOTICE $nick :Der Befehl \"$cmd\" im Raum $chan ${opt_str}geschaltet"
stats_cmd_save $chan
return
}



proc stats_bot_user {from command arg} {
# what are the parameters
set cmd [split $arg]
set nick [lindex $cmd 0]
set user [lindex $cmd 1]
set opt [lindex $cmd 2]
# do the work
stats_schattr $nick $user $opt
}

proc stats_switch_user {nick user opt} {
# inform other bots
# do it yourselt, too
stats_schattr $nick $user $opt
return 0
}



proc stats_reset_user {nick chan opt} {
resetuser $opt $chan
puthelp "NOTICE $nick :Statistiken des Benutzers $opt wurden im Raum $chan zurückgesetzt"
}



proc stats_switch {nick uhost hand chan rest} {
if {![isvoice $nick $chan] && ![isop $nick $chan]} {
puthelp "NOTICE $nick :Dieser Befehl ist nur für Moderatoren"
return 0
}

set lrest [split $rest]
set cmd [lindex $lrest 0]
set arg [lindex $lrest 1]
switch -exact -- $cmd {
+cmd { stats_switch_cmd $nick $chan $arg true }
-cmd { stats_switch_cmd $nick $chan $arg false }
reset { stats_reset_user $nick $chan $arg }
+user { stats_switch_user $nick $arg true }
-user { stats_switch_user $nick $arg false }
}
}

putlog "stats-public.tcl by BlackDeath loaded..."


The script download on here !
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Aug 17, 2007 9:32 am    Post subject: Reply with quote

Oh dear, an online language translator used here. Laughing
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Fri Aug 17, 2007 9:35 am    Post subject: Reply with quote

It would seem this script depends on some other stats-script, and simply operates as a public interface. The reason it fails, is most likely that you hav'nt loaded the script/module it depends on (and no, I do not know which script/module that would be, or where you can get it).
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Fri Aug 17, 2007 10:10 am    Post subject: Reply with quote

Quote:
Adds public commands that display statistics from stats.mod. Script is in German.

I took a "punt" and searched the Tcl Archives. Laughing

xbox-kult: laden stats.mod
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
xbox-kult
Voice


Joined: 16 Aug 2007
Posts: 11

PostPosted: Fri Aug 17, 2007 1:31 pm    Post subject: Reply with quote

Hello,

thx for a dl link Wink i know this mod....


Can I install additional mod with my eggdrop ?

I have a moment statistic.tcl on channel with my eggdrop. The statistic.tcl I rewrote into German and the expenditure differently arranged as with stats.mod; -)

Now I would like only the time bring with script statistic.tcl which it under the names to the down load give here

sliding keyboard shelf in the moment !

<xbox-kult> windows64bit hat geschrieben: 37 Wörter mit 170 Buchstaben in 28 Zeilen und 0 smilie
----------------------
hat geschrieben = written
Wörter = words
Buchstaben = letters
Zeilen = lines
smilie = smilies
-----------------------
I can install the mod when the eggdrop just exists ?

THX and MFG

sorry my english is not so good Wink but give my best with sprachtools and to own words
Back to top
View user's profile Send private message
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Sat Aug 18, 2007 12:01 am    Post subject: Reply with quote

xbox-kult wrote:
Can I install additional mod with my eggdrop ?

The answer to this is yes, install the module, carefully and correctly, and don't forget to recompile your eggdrop.
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
Fahad
Op


Joined: 29 Aug 2016
Posts: 127

PostPosted: Thu Sep 22, 2016 12:12 am    Post subject: stats-public error Reply with quote

( Tcl error [stats_top10]: invalid command name "*pub:!top10" )
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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