💾 Archived View for gemini.conman.org › extensions › GLV-1 › handlers › 8-ball.lua captured on 2023-01-29 at 10:14:09.
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
-- ************************************************************************ -- -- A Magic 8-Ball you can ask. -- Copyright 2021 by Sean Conner. All Rights Reserved. -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published by -- the Free Software Foundation, either version 3 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <http://www.gnu.org/licenses/>. -- -- Comments, questions and criticisms can be sent to: sean@conman.org -- -- ************************************************************************ -- luacheck: globals handler -- luacheck: ignore 611 local math = require "math" _ENV = {} local answers = { "It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most likely.", "Outlook good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.", "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful.", } function handler(_,_,_,_,ios) ios:write("20 text/plain\r\n",answers[math.random(#answers)],"\r\n") return 20 end return _ENV