25 bot.stream:query_uptime(who, function (reply) |
25 bot.stream:query_uptime(who, function (reply) |
26 if not reply.error then |
26 if not reply.error then |
27 command:reply(reply_prefix..convert_time(reply.seconds)); |
27 command:reply(reply_prefix..convert_time(reply.seconds)); |
28 else |
28 else |
29 local type, condition, text = reply.type, reply.condition, reply.text; |
29 local type, condition, text = reply.type, reply.condition, reply.text; |
30 local r = "There was an error requesting "..param.."'s version"; |
30 local r = "There was an error requesting "..param.."'s uptime"; |
31 if condition == "service-unavailable" then |
31 if condition == "service-unavailable" then |
32 r = param.." doesn't reply to uptime/last activity requests"; |
32 r = param.." doesn't reply to uptime/last activity requests"; |
33 elseif condition == "feature-not-implemented" then |
33 elseif condition == "feature-not-implemented" then |
34 r = param.." doesn't support feature requests"; |
34 r = param.." doesn't support feature requests"; |
35 elseif condition == "remote-server-not-found" then |
35 elseif condition == "remote-server-not-found" then |