Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/plugin.py
diff options
context:
space:
mode:
Diffstat (limited to 'plugin.py')
-rw-r--r--plugin.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugin.py b/plugin.py
index ace7efd..b8a77a2 100644
--- a/plugin.py
+++ b/plugin.py
@@ -35,6 +35,7 @@ import supybot.ircutils as ircutils
import supybot.callbacks as callbacks
import supybot.ircmsgs as ircmsgs
+import re
import time
import meeting
import supybotconfig
@@ -54,6 +55,7 @@ except NameError: meeting_cache = {}
try: recent_meetings
except NameError: recent_meetings = [ ]
+command_RE = re.compile(r'#([\w-]+)[ \t]*$')
class MeetBot(callbacks.Plugin):
"""Add the help for "@plugin help MeetBot" here
@@ -89,8 +91,15 @@ class MeetBot(callbacks.Plugin):
Mkey = (channel,network)
M = meeting_cache.get(Mkey, None)
+ matchobj = command_RE.match(payload)
+ if matchobj is not None:
+ command = matchobj.groups()[0]
+ command = ''.join([i for i in command.lower() if i != '-'])
+ else:
+ command = None
+
# Start meeting if we are requested
- if payload[:13] == '#startmeeting':
+ if command == 'startmeeting':
if M is not None:
irc.error("Can't start another meeting, one is in progress.")
return