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.

stats script, WAP

Old posts that have not been replied to for several years.
Locked
User avatar
AbuAli
Voice
Posts: 35
Joined: Sat Jun 12, 2004 2:49 am

stats script, WAP

Post by AbuAli »

hello, i have a ideia,
i need a code, like ChanStats but simples,
make a html, on /home/login/pulic_html
on the html, only the name of the channel and the number of the users on the channel and the nicknames who is online on the moment,

EX: make this html, live,

#Channel 3 users
nick1
nick2
nick2


this services have on ChanStats, but its complicate, so can any one help me ? to make a WAP IRC ChanStats, i will give to him the credit of the tcl lol

thx,
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

Code: Select all

set sfile "/home/user/public_html/stats.html"
set schan "#channel"

bind time - "?5*" stime
proc stime {mi ho da mo yr} {
 webstats $::schan
} 

proc webstats c {
 set f [open $::sfile w]
 puts $f "<html><body><head>"
 puts $f "<title>channel stats for $c</title></head>"
 puts $f "$c [llength [chanlist $c]] users ([strftime "%H:%M, %m/%d/%Y"])<br>"
 foreach u [lsort -dict [chanlist $c]] {
  puts $f "$u<br>"
 }
 puts "</body></html>"
 close $f
 putlog "Updated html stats for $c" 
}
It'll generate a new page every 5min.
User avatar
AbuAli
Voice
Posts: 35
Joined: Sat Jun 12, 2004 2:49 am

thx

Post by AbuAli »

yeah gb, thats what i want :P a WAP IRC STATS

but i have a problem, i set the time to 1 min

Code: Select all

bind time - "?1*" stime 
but the code dont generate 1 in 1 min the html,
he generate the html 10 in 10 min,
why?
dont have logic, if i change the time, why dont work!!

and if i can make the ops start with @ and the voice start with + and the halfop start with % and stay on the top of the list, like mirc nick list

thx
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Code: Select all

"?5 *"
this is a crontab type time bind its set to go off at

05
15
25
35
45
55 minutes past every hour

?5 make sense? and the * means do this every hour.

to execute every minute change "?5 *" to "* *"

HTH
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

the body tag should normaly be opend after the head tag is closed, or has WAP html total diffrent specifications?
btw. don't forget [split ] before using strings with list functions.

PS:
^DooM^ wrote:to execute every minute change "?5 *" to "* *"
simply 1 * is enough :).
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...
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

De Kus wrote: PS:
^DooM^ wrote:to execute every minute change "?5 *" to "* *"
simply 1 * is enough :).
wouldn't "1 *" execute the proc once every hour at 1 minute past?
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
AbuAli
Voice
Posts: 35
Joined: Sat Jun 12, 2004 2:49 am

humm

Post by AbuAli »

hello,
now witch one i use ?

Code: Select all

"* *"
or

Code: Select all

"1 *"

and about how can i make the ops start with @ and the voice start with + and the halfop start with % and stay on the top of the list, like mirc nick list

thx
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

I agree with ^Doom^ about "1 *", I think this will trigger the proc only once every hour (I didn't test, so I might be wrong). On the other hand,

Code: Select all

bind time - "*" stime
should trigger the proc every minute.
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

^DooM^ wrote:wouldn't "1 *" execute the proc once every hour at 1 minute past?
I meant 1 "*", not *1 *" (last one would never be true because [string match "1 *" "01 xx xx xx xxxx"] == 0).
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...
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Ahh my bad sorry De Kus :lol: and your right "1 *" would never be executed as you say it would have to be "01 *" to work at one minute past every hour and "*1 *" would execute every 10 minutes :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
Locked