administration.lua: Added antiflood flag.

bible.lua: Some better error handling.
hearthstone.lua: Corrected help message.
utilities.lua: Added string:index() to succeed get_word().
This commit is contained in:
topkecleon
2016-03-31 07:53:12 -04:00
parent 3063df56c9
commit b643154df8
5 changed files with 174 additions and 29 deletions

View File

@@ -19,6 +19,16 @@ get_word = function(s, i)
return t[i] or false
end
-- Like get_word(), but better.
-- Returns the actual index.
function string:index()
local t = {}
for w in s:gmatch('%g+') do
table.insert(t, w)
end
return t
end
-- Returns the string after the first space.