summaryrefslogtreecommitdiffstats
path: root/modules/tell.py
diff options
context:
space:
mode:
authorSean B. Palmer <sean@miscoranda.com>2013-03-15 15:28:03 +0000
committerSean B. Palmer <sean@miscoranda.com>2013-03-15 15:28:03 +0000
commita546977f70f9b8c4acac632972cd26a2dd8d7676 (patch)
treeccdb1156c342d0f861e177df2b425d32a0ca3119 /modules/tell.py
parent7752b56cc2f8325883bad052ad31bf2e7feb706e (diff)
downloadbot-a546977f70f9b8c4acac632972cd26a2dd8d7676.tar.gz
bot-a546977f70f9b8c4acac632972cd26a2dd8d7676.tar.bz2
bot-a546977f70f9b8c4acac632972cd26a2dd8d7676.zip
A new scheduling command and some improvements to gc
Diffstat (limited to 'modules/tell.py')
-rwxr-xr-xmodules/tell.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/tell.py b/modules/tell.py
index d3ee609..a82fad1 100755
--- a/modules/tell.py
+++ b/modules/tell.py
@@ -131,9 +131,13 @@ def message(phenny, input):
for remkey in remkeys:
if not remkey.endswith('*') or remkey.endswith(':'):
if tellee.lower() == remkey:
+ phenny.sending.acquire()
reminders.extend(getReminders(phenny, channel, remkey, tellee))
- elif tellee.lower().startswith(remkey.rstrip('*:')):
+ phenny.sending.release()
+ elif tellee.lower().strip("0123456789_-[]`") == remkey.rstrip('*:'):
+ phenny.sending.acquire()
reminders.extend(getReminders(phenny, channel, remkey, tellee))
+ phenny.sending.release()
for line in reminders[:maximum]:
phenny.say(line)
@@ -144,7 +148,9 @@ def message(phenny, input):
phenny.msg(tellee, line)
if len(phenny.reminders.keys()) != remkeys:
+ phenny.sending.acquire()
dumpReminders(phenny.tell_filename, phenny.reminders) # @@ tell
+ phenny.sending.release()
message.rule = r'(.*)'
message.priority = 'low'