mIRC Home    About    Download    Register    News    Help

Print Thread
#124408 06/07/05 11:10 AM
Joined: Dec 2002
Posts: 173
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 173
For some reason this script doesn't seem to update the times in the aliases, can anyone see the problem?

;##############################################
;
; Events
;
;##############################################

on *:disconnect:{
if $record.server.uptime == $uptime(server) { alias record.server.uptime $chr(123) return $uptime(Server) $chr(125) | halt }
if $uptime(server) > $record.server.uptime { alias record.server.uptime $chr(123) return $uptime(Server) $chr(125) | halt }
}

on *:exit:{
if $record.mIRC.uptime == $uptime(mIRC) { alias record.mIRC.uptime $chr(123) return $uptime(mIRC) $chr(125) | goto recorduptime | halt }
if $uptime(mIRC,1) > $record.mIRC.uptime { alias record.mIRC.uptime $chr(123) return $uptime(mIRC) $chr(125) | goto recorduptime | halt }
:recorduptime
if $record.system.uptime == $uptime(system) { alias record.system.uptime $chr(123) return $uptime(system) $chr(125) | halt }
if $uptime(system) > $record.system.uptime { alias record.system.uptime $chr(123) return $uptime(system) $chr(125) | halt }
}

on *:load:{
alias record.system.uptime $chr(123) return $uptime(system) $chr(125)
alias record.mIRC.uptime $chr(123) return $uptime(mIRC) $chr(125)
alias record.server.uptime $chr(123) return $calc($ticks - $start.ticks) $chr(125)
}

on *:unload:{
alias record.system.uptime
alias record.mIRC.uptime
alias record.server.uptime
}

;##############################################
;
; Menu
;
;##############################################

menu channel {
Uptimes
.Record
..Echo:{
echo -a 0,7 Record System Uptime: $duration($calc($record.system.uptime / 1000),1) 
echo -a 0,7 Record mIRC Uptime: $duration($calc($record.mIRC.uptime / 1000),1)
echo -a 0,7 Record Server Uptime: $duration($calc($record.server.uptime / 1000),1)
}
..Say:{
say 0,4 Record System Uptime: $duration($calc($record.system.uptime / 1000),1) 
say 0,4 Record mIRC Uptime: $duration($calc($record.mIRC.uptime / 1000),1) 
say 0,4 Record Server Uptime: $duration($calc($record.server.uptime / 1000),1) 
}
.Current
..Echo:{
echo -a 0,7 Current System Uptime: $uptime(system,1) 
echo -a 0,7 Current mIRC Uptime: $uptime(mIRC,1) 
echo -a 0,7 Current Server Uptime: $uptime(server,1) 
}
..Say:{
say 0,4 Current System Uptime: $uptime(system,1) 
say 0,4 Current mIRC Uptime: $uptime(mIRC,1) 
say 0,4 Current Server Uptime: $uptime(server,1) 
}
}

D
DaveC
DaveC
D
be more specific, is the times stuck at one thing, or are they changing, but not accumulating?

Joined: Dec 2002
Posts: 173
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 173
Sorry thought someone might of ran it to find the problem, it sticks at the same time on record.mIRC.uptime and record.system.uptime and record.server.uptime doesn't even record anything, not sure how to fix them, or if writing into aliases is better then writing the records into a text file.

Joined: Dec 2002
Posts: 173
K
Kev_Uk Offline OP
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2002
Posts: 173
Doesn't matter found another script to use that works ok, thanks for the help anyway smile


Link Copied to Clipboard