24 end |
24 end |
25 |
25 |
26 bot.stream:query_version(who, function (reply) |
26 bot.stream:query_version(who, function (reply) |
27 if not reply.error then |
27 if not reply.error then |
28 local saywho = (who == command.sender.jid and "You are") or (param and param.." is" or "I am"); |
28 local saywho = (who == command.sender.jid and "You are") or (param and param.." is" or "I am"); |
29 command:reply(saywho.." running "..(reply.name or "something") |
29 local isrunning = saywho.." running "..(reply.name or "something"); |
30 .." version "..(reply.version or "unknown") |
30 if reply.version then |
31 .." on "..(reply.platform or "an unknown platform")); |
31 isrunning = isrunning .." version "..reply.version; |
|
32 end |
|
33 if reply.platform then |
|
34 isrunning = isrunning .." on "..reply.platform; |
|
35 end |
|
36 command:reply(isrunning); |
32 else |
37 else |
33 local type, condition, text = reply.type, reply.condition, reply.text; |
38 local type, condition, text = reply.type, reply.condition, reply.text; |
34 local r = "There was an error requesting "..param.."'s version"; |
39 local r = "There was an error requesting "..param.."'s version"; |
35 local friendly_error = friendly_errors[condition]; |
40 local friendly_error = friendly_errors[condition]; |
36 if friendly_error then |
41 if friendly_error then |