Fix command prefix usage
authorMikael Berthe <mikael@lilotux.net>
Sat, 17 Apr 2010 18:55:32 +0200
changeset 28 510849236c58
parent 27 a166e9ab8065
child 29 b3da9ca12427
Fix command prefix usage
mcabbot.lua
--- a/mcabbot.lua	Sat Apr 17 15:44:09 2010 +0200
+++ b/mcabbot.lua	Sat Apr 17 18:55:32 2010 +0200
@@ -33,8 +33,11 @@
         muc = true
     end
     if muc == true then
-        if h.delayed == ""  and h.attention and h.attention == "true" then
-            if h.resource and h.resource ~= mcabbot.nickname then
+        if h.delayed == "" then
+            if mcabbot.cmdprefix and message:starts(mcabbot.cmdprefix) then
+                perso = true
+            elseif h.attention and h.attention == "true" and
+                   h.resource and h.resource ~= mcabbot.nickname then
                 perso = true
             end
         end