mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 2 1 2
Re: !peak script? [Re: Riamus2] #180386 08/07/07 06:37 PM
Joined: Jan 2004
Posts: 509
L
LostShadow Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Jan 2004
Posts: 509
Okay thanks all for your support.

Originally Posted By: Riamus2
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.

Re: !peak script? [Re: OrionsBelt] #180387 08/07/07 06:38 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Those get me all the time smile

Code:
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
Re: !peak script? [Re: Riamus2] #180598 11/07/07 09:42 PM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
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)) {

confused

Re: !peak script? [Re: OrionsBelt] #180599 11/07/07 10:06 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
That would be more exact.
But if comparison is generous:
Code:
//var %x = 5 test | if (3 < %x) { echo -a $v1 < $v2 }

or
Code:
//var %x = 6apples | if (3 < %x) { echo -a $v1 < $v2 }

Last edited by Horstl; 11/07/07 10:12 PM.
Re: !peak script? [Re: OrionsBelt] #180609 12/07/07 12:14 AM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
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
Re: !peak script? [Re: Riamus2] #180619 12/07/07 05:35 AM
Joined: Apr 2006
Posts: 464
O
OrionsBelt Offline
Fjord artisan
Offline
Fjord artisan
O
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!

Re: !peak script? [Re: OrionsBelt] #180637 12/07/07 03:27 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
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
Page 2 of 2 1 2