PDA

View Full Version : [Filled] Stats Script


freak007
01-18-2004, 11:23 AM
does somebody could be able to script something like that for irc:
[/QUOTE] [STATS] - freak007 started 9 races @ from this 9 races he have won 6 races

or something like that (if someone has a pretimedb) :

[STATS] - freak007 started 9 races @ average 25mins 23secs after pre
[STATS] - within limits: 8 @ average 20mins 29secs after pre, backfills: 1 @ average 4mins 37secs over limits

Thx for help

Cya Freak007

phoenixfr
01-18-2004, 05:37 PM
i bet only harm could do this with iobanana
cause it is the only pretime script around

freak007
01-18-2004, 06:15 PM
and maybe without pretime script ?

only started races and won races stats script ?

Cya Freak007

Mouton
01-19-2004, 01:31 PM
[13:24:55] [L] 200-someguy started 0 race(s) - raced 2 release(s) - avg. position: #2 - 1 races won
[13:24:55] [L] 200-me started 1 race(s) - raced 2 release(s) - avg. position: #3 - 1 races won
[13:24:55] [L] 200-you started 0 races
[13:24:55] [L] 200-girly started 3 race(s) - raced 25 release(s) - avg. position: #2 - 7 races won
[13:24:55] [L] 200-MrCat started 0 race(s) - raced 1 release(s) - avg. position: #5 - 0 races won

Getting there...

freak007
01-19-2004, 01:51 PM
Yeah Mouton something like that do you allready code that ?

Would be cool if you do so !!!

Thx Freak007

Mouton
01-19-2004, 10:51 PM
Done. ioSFV (hey _tuff! ;)) v1
Need ioBanana as zipscript to work.
Little mod would be needed to handle other zipscripts, but i won't do it :)
Feel free to and post result.


[22:50:02] [L] site ustats someguy
[22:50:04] [L] 200-== [someguy] Races Stats ==========================
[22:50:04] [L] 200-Started: 11 races
[22:50:04] [L] 200-Pretime: 0 hours 7 mins after pre (avg.)
[22:50:04] [L] 200-Completed: 43 races
[22:50:04] [L] 200-Racer Position: #3 (avg.)
[22:50:04] [L] 200-Races Won: 10
[22:50:04] [L] 200-==================================================
[22:50:04] [L] 200 Command successful.


SITE USTATS all
will give all stats for all users on site
Takes about 5 secs to parse a 7MB ioFTPD.log file i tested on.

http://www.ioftpd.com/scripts/script.php?id=46

Razor
01-20-2004, 09:25 AM
any chance the archived / splitted logs by ioBanana can get convered back to 1 big?

:p

else this script wont work :D

or maybe let the script search trough all the ioftpd.logs :P

Mouton
01-20-2004, 09:52 AM
Works well enough for me.
You're free to make any modifications to it u might want so it works well for u too.

rAWfOX
01-20-2004, 12:43 PM
anyone who knows what to add in iobanana.tcl to get this to announce in channel? :D

Razor
01-21-2004, 11:08 AM
add this to iobanana.tcl

bind pub - [set ioss(cmdpre)]ustats ustatsalias

proc comparealias {nick uhost hand chan args} { ioBanana $nick $chan "ustats [lindex $args 0]" }



works for me..

rAWfOX
01-21-2004, 11:26 AM
Originally posted by Razor
add this to iobanana.tcl

bind pub - [set ioss(cmdpre)]ustats ustatsalias

proc comparealias {nick uhost hand chan args} { ioBanana $nick $chan "ustats [lindex $args 0]" }



works for me..


bind pub - [set ioss(cmdpre)]ustats ustatsalias

proc ustatsalias {nick uhost hand chan args} { ioBanana $nick $chan "ustats [lindex $args 0]" }



works better :D

freak007
01-21-2004, 01:18 PM
is someone able to modify moutons script to work with newdir and iozs !

Thx for help

Greets freak007

Razor
01-21-2004, 04:30 PM
ah sorry rAWfOX

indeed :P

freak007: Not That Hard, just look what ioZs logs in ioFTPD.log.. and compare with what ioB logs. Then change it in the .itcl :-)

peterchen
04-06-2004, 03:41 PM
really nice thing but i allways get an error message:

site ustats all
550 Command failed.

o_O


i added ustats = TCL ..\scripts\ioSFV.itcl into ioFTPD.ini and put this file into the scripts dir but it doesnt work ;(

please help
mfg

Mouton
04-06-2004, 04:53 PM
(haha.. each time i see my file name, i find it funny!)

see ioFTPD\logs\SystemError.log

peterchen
04-07-2004, 12:14 AM
04-06-2004 22:29:56 "..\scripts\ioSFV.itcl" terminated abnormally
--------------------------- ErrorInfo ----------------------------
can't read "users": no such variable
while executing
"lsearch $users $username"
(procedure "iosfv" line 64)
invoked from within
"iosfv"

(file "..\scripts\ioSFV.itcl" line 226)

Mouton
04-07-2004, 06:43 AM
It's because u have a pretime or complete-b1 line before a newdir line in your log file...

change the start of the function:

proc iosfv {} {
global iosfv args user
set users ""

Simply add that last line...
Should fix it.

peterchen
04-07-2004, 06:57 AM
proc iosfv {} {
global iosfv args user
set users ""

if {![info exists args]} {
set finduser $user
} elseif {[info exists args] && $args!="all"} {
set finduser $args
}

but ive got the same problem ;(

Mouton
04-07-2004, 04:49 PM
I doubt u get the same error. In fact, i'm sure u don't.
U defined the users variable, so i can't give u a can'T find users variable error.

inside
02-04-2005, 09:30 AM
Test for the script :


site ustats inside
200-== [inside] Races Stats ===============================
200-Started: 47 races
200-Completed: 47 races
200-Racer Position: #1 (avg.)
200-Races Won: 47
200-================================================== ========
200 Command successful.
site ustats all
200-== [Users] Races Stats ===============================
200-inside started 47 race(s) - raced 47 release(s) - avg. position: #1 - 47 races won
200-================================================== ====
200 Command successful.


PS :

ioFTPD.ini :
ustats = TCL ..\scripts\whatever\ioSFV.itcl

Commande FTP :

SITE USTATS
SITE USTATS <username> or SITE USTATS inside
SITE USTATS all

iam
02-17-2005, 09:17 PM
Any chance to see this nice script for another ZS ?

maX1mus_2
03-14-2005, 10:49 AM
Originally posted by iam
Any chance to see this nice script for another ZS ? Agree, would be nice if someone could make it ioZS compatible :|

iam
03-14-2005, 10:21 PM
and php_psio :)

zOrP
04-13-2006, 09:51 PM
where can i get this...??

and what does iobanana log to ioftpd.log ?

so i know what to look after. :)