equal
deleted
inserted
replaced
1 |
1 |
2 local wtfdbfile = "/home/mikael/.mcabber/lua/mcbot/wtfdb.txt" |
2 local wtfdbfile = "/home/mikael/.mcabber/lua/mcbot/wtfdb.txt" |
3 |
3 |
4 local function wtf (args) |
4 local wtf = { ["desc"] = "Acronym dictionary" } |
|
5 |
|
6 function wtf.cmd (args) |
5 local r = {} |
7 local r = {} |
6 if not args then return nil, "WTH do you want?" end |
8 if not args then return nil, "WTH do you want?" end |
7 args = args:gsub("[%s%?%.%!]+$", ""):upper() |
9 args = args:gsub("[%s%?%.%!]+$", ""):upper() |
8 for line in io.lines(wtfdbfile) do |
10 for line in io.lines(wtfdbfile) do |
9 if line:starts(args.."\t") then |
11 if line:starts(args.."\t") then |