]> git.decadent.org.uk Git - ion3.git/blobdiff - mod_query/mod_query.lua
Add 20081002-1.
[ion3.git] / mod_query / mod_query.lua
index d3ef7a06b031952a40a250cfb9a1286976526d30..a9524809b4948dc9afe010f4bdd4fde6b34cdf2e 100644 (file)
@@ -910,7 +910,7 @@ function mod_query.get_hostnicks(mplex)
                 patterns=pat
             elseif string.find(substr, "^[nN][aA][mM][eE]")
                 and patterns then
-                for s in string.gfind(patterns, "%S+") do
+                for s in string.gmatch(patterns, "%S+") do
                     if not string.find(s, "[*?]") then
                         table.insert(mod_query.hostnicks, s)
                     end
@@ -1027,6 +1027,7 @@ function mod_query.do_handle_lua(mplex, env, code)
     local print_res
     local function collect_print(...)
         local tmp=""
+        local arg={...}
         local l=#arg
         for i=1,l do
             tmp=tmp..tostring(arg[i])..(i==l and "\n" or "\t")
@@ -1068,7 +1069,7 @@ function mod_query.do_complete_lua(env, str)
     
     -- Descend into tables
     if tocomp and string.len(tocomp)>=1 then
-        for t in string.gfind(tocomp, "([^.:]*)[.:]") do
+        for t in string.gmatch(tocomp, "([^.:]*)[.:]") do
             metas=false
             if string.len(t)==0 then
                 comptab=env;