So, basically it returns "The channel is not live" or "x hours x minutes"?
Code:
on *:sockread:uptime:{
var %uptime
sockread %uptime
tokenize 32 %uptime
if (($1 isnum) && ($2)) || ($1- == The channel is not live) writeini uptime.ini uptime #channelorsomething %uptime
}