|
|
|
@ -406,7 +406,7 @@ request.loop = function() |
|
|
|
|
rand = os.clock() |
|
|
|
|
} |
|
|
|
|
request.send = {} |
|
|
|
|
local url = string.format("http://mafia.deadpoo.net/%s", encodeJson(request_table)) |
|
|
|
|
local url = string.format("http://mafia.deadpoo.net/%s", urlencode(encodeJson(request_table))) |
|
|
|
|
local result, text = pcall(openURL, url, os.tmpname(), true) |
|
|
|
|
if result then |
|
|
|
|
local result = pcall(request.handler, text) |
|
|
|
@ -788,7 +788,13 @@ function getNicknamesOnline() |
|
|
|
|
end |
|
|
|
|
return result |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
function urlencode(str) |
|
|
|
|
str = string.gsub (str, "([^0-9a-zA-Z !'()*._~-])", -- locale independent |
|
|
|
|
function (c) return string.format ("%%%02X", string.byte(c)) end) |
|
|
|
|
str = string.gsub (str, " ", "+") |
|
|
|
|
return str |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-->> UPDATE MODULE |
|
|
|
|
function openURL(url, fpath, message_off) |
|
|
|
|
local text = "" |
|
|
|
|