equal
deleted
inserted
replaced
33 require "cmds.xmpp" |
33 require "cmds.xmpp" |
34 |
34 |
35 function process (line, botdata, muc) |
35 function process (line, botdata, muc) |
36 local n |
36 local n |
37 line = trim(line) |
37 line = trim(line) |
38 line, n = line:gsub("^"..botdata.nickname.."[,: ]%s+", "") |
38 line, n = line:gsub("^"..botdata.nickname.."[,:]?%s+", "") |
39 if muc and n ~= 1 then return nil, nil end |
39 if muc and n ~= 1 then return nil, nil end |
40 |
40 |
41 local cmd, arg |
41 local cmd, arg |
42 cmd = line:match("^(%w+)%s*[!]*$") |
42 cmd = line:match("^(%w+)%s*[!]*$") |
43 if not cmd then |
43 if not cmd then |