mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2003
Posts: 257
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
How would I echo the timestamp in a channel for the On Text event only every minute instead of all the time? I'd rather user my alias for timestamp that i made already with it:

stamp return $asctime(hh:nn11t)

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Try something basically like the following;

On joining a channel, start a timer that sets a value to 1 every 60 seconds.

On me:*:Join:#:{
.timer $+ $chan 0 60 hadd -m showts $chan 1
}

When you part, simply stop the timer for that channel.

On me:*:Part:#:{
.timer $+ $chan off
}

When someone types into the channel if a given variable, which is set every 60 seconds is 1 then echo the timestamp and delete the variable so it can only ever happen once in 60 seconds, if not, dont do anything.

On *:text:*:#:{
if ($hget(showts,$chan)) {
echo $chan $stamp $+(<,$nick,>) $1-
.hdel showts $chan
haltdef
}
}

Dont forget your $stamp alias either.

Eamonn.

Joined: Nov 2003
Posts: 257
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
Thanks for the example, i can't seem to get it to work though. Is there any other ways.


Link Copied to Clipboard