summaryrefslogtreecommitdiff
path: root/abot.py
diff options
context:
space:
mode:
authorjomo <github@jomo.tv>2014-07-10 00:52:32 +0200
committerjomo <github@jomo.tv>2014-07-10 00:52:32 +0200
commit2248007358bc70ef8748d06aa3c485e399d595a1 (patch)
tree3b053d9fba19eedaf9e7701847dd3050452c8459 /abot.py
parent43e40153117e73a7915183ba556de36740cdbf34 (diff)
more questions
Diffstat (limited to 'abot.py')
-rw-r--r--abot.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/abot.py b/abot.py
index 3d8af58..2d2daff 100644
--- a/abot.py
+++ b/abot.py
@@ -1,16 +1,20 @@
from helpers import *
from re import compile as reg_compile
-rank_regex = "visitor|member|builder|trusted|helper|mod|admin"
+rank_regex = "visitor|member|builder|trusted|helper|mod|admin|owner|rank"
faq_regex = [
- # Asking for ranks or WE
- "how.+ (get|be(come)?|).+ (%s|WorldEdit|WE|W.E.)" % rank_regex,
- # Asking why p clear won't work
- "why.+ can.+( /?p clear| clear.+plot)"
+ # ranks
+ "(how.+ (get|be(come)?|)|who is).+ (%s)" % rank_regex,
+ # WE
+ "((can|how|why).+ (have|haz|use|doesn|can'?t)).+ WorldEdit|WE|W.E.)"
+ # clearing plot
+ "(why|how).+ can.+( /?p clear| clear.+plot)",
+ # add someone to a plot
+ "how.+ add.+ plot"
]
-faq_regex = [reg_compile(reg) for reg in faq_regex]
+faq_regex = [reg_compile(reg.lower()) for reg in faq_regex]
@hook.event("player.AsyncPlayerChatEvent", "low")
def onChat(event):
@@ -22,4 +26,5 @@ def onChat(event):
msg(sender, "&aIt looks like you aksed a question that is likely answered in our FAQ.")
msg(sender, "&aPlease take a look at the &4&l/faq&a command and read through the pages.")
event.setCancelled(True)
+ log("(Answerbot) hiding message from %s: '%s'" % (sender.getName(), message))
break \ No newline at end of file