Fix duplicate join messages as well as updating the keys while in use.

This makes the tell module single threaded, but performance shouldn't
suffer terribly. If it does, might have to roll back the changes and
consider managing the double JOINS and thread saftey manually.
master
Reese Moore 2011-04-18 14:57:07 -04:00
parent 60b4bd875b
commit 9747b00e9d
1 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,7 @@ def f_remind(phenny, input):
dumpReminders(phenny.tell_filename, phenny.reminders) # @@ tell
f_remind.rule = ('$nick', ['tell', 'ask'], r'(\S+) (.*)')
f_remind.thread = False
def getReminders(phenny, channel, key, tellee):
lines = []
@ -146,6 +147,7 @@ def message(phenny, input):
dumpReminders(phenny.tell_filename, phenny.reminders) # @@ tell
message.rule = r'(.*)'
message.priority = 'low'
message.thread = False
def messageAlert(phenny, input):
if (input.nick.lower() in phenny.reminders.keys()):
@ -153,6 +155,7 @@ def messageAlert(phenny, input):
messageAlert.event = 'JOIN'
messageAlert.rule = r'.*'
messageAlert.priority = 'low'
messageAlert.thread = False
if __name__ == '__main__':
print __doc__.strip()