This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot/plugins/pluginsold/fortunes_uc3m.lua
2015-06-16 21:40:12 +02:00

24 lines
390 B
Lua

do
local function get_fortunes_uc3m()
local i = math.random(0,178) -- max 178
local web = "http://www.gul.es/fortunes/f"..i
local b, c, h = http.request(web)
return b
end
local function run(msg, matches)
return get_fortunes_uc3m()
end
return {
description = "Fortunes from Universidad Carlos III",
usage = "!uc3m",
patterns = {
"^!uc3m$"
},
run = run
}
end