|
Joined: Jan 2004
Posts: 509
Fjord artisan
|
Fjord artisan
Joined: Jan 2004
Posts: 509 |
Okay thanks all for your support. Why don't you just use the updated hash table version? You're going to have a LOT of variables if you don't. Oh I'm using them both. Although, I wouldn't say there's a lot of variables. You're only having as many variables as channels you join.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Those get me all the time
on *:join:#:{
if (!$hget(PeakStats)) {
hmake PeakStats 100
if ($isfile($scriptdir\PeakStats.hsh)) { hload PeakStats $scriptdir\PeakStats.hsh }
}
var %chan.net = $+( $chan ,., $network)
if ($nick(#,0) >= $hget(PeakStats,%chan.net) || !$hget(PeakStats,%chan.net)) {
hadd PeakStats %chan.net $nick(#,0) $ctime
hsave PeakStats $scriptdir\PeakStats.hsh
}
}
on *:text:!peak:#:{
var %peak.stat = $hget(PeakStats,$+( $chan ,., $network ))
msg $chan On $date($gettok(%peak.stat,2,32),mmm dd yyyy) $+ , there were $gettok(%peak.stat,1,32) users in $chan $+ !
}
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2006
Posts: 464
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 464 |
Uhm, I still have some problems with this script. Shouldnt this line: if ($nick(#,0) >= $hget(PeakStats,%chan.net) || !$hget(PeakStats,%chan.net)) { Be: if ($nick(#,0) >= $gettok($hget(PeakStats,%chan.net) ,1,32) || !$hget(PeakStats,%chan.net)) {
|
|
|
|
Joined: Nov 2006
Posts: 1,559
Hoopy frood
|
Hoopy frood
Joined: Nov 2006
Posts: 1,559 |
That would be more exact. But if comparison is generous: //var %x = 5 test | if (3 < %x) { echo -a $v1 < $v2 } or //var %x = 6apples | if (3 < %x) { echo -a $v1 < $v2 }
Last edited by Horstl; 11/07/07 10:12 PM.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
What problems?
Yes, you can change it to that. It should work both ways, but you are right, that it will be more correct with checking the token.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2006
Posts: 464
Fjord artisan
|
Fjord artisan
Joined: Apr 2006
Posts: 464 |
=21:35:15= * Nickname1 (address1) has joined #peak-chan =21:35:15= <@Bot> New channel peak for channel: #peak-chan =21:35:15= <@Bot> Last peak was on 10 July 2007, there were 41 users!
=21:35:19= * Nickname2 (address2) has joined #peak-chan =21:35:19= <@Bot> New channel peak for channel: #peak-chan =21:35:19= <@Bot> Last peak was on 11 July 2007, there were 5 users!
On the 10th of July, we managed to set a peak of 41 users. The next day, we started with 3 users. When the 4th joined, it showed the peak from yesterday, and when the 5th joined it had overwritten the old peak!
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Sounds like it's either not saving or not loading your table. Check the folder where you have the script stored and see if you see a PeakStats.hsh file there.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|