BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: Dabaron on January 26, 2009, 09:02:58 am
-
I've been trying to find a way to use Mail cross bot in a relay setting. I have 5 bots with linked chat/online lists/etc and am looking for linked Mail.
I found a way (well, kind of lame way.. but it works) to get it to work... but the notification that you received mail doesn't work.
Example:
Lets say I have bot1, bot2, bot3, bot4, and bot5. I want to be able to send a mail message in the org bot I'm in... let's say bot1... but the recipient is in a diff org... lets say bot2. By removing prefix on table they can retrieve their message (also had to take out error handling to make sure they are in the members list or I couldn't send them the message... and not sure I like taking this out), but since the bot you are sending from checks to see if they are online and sends the "you've got a mail message" tell they never receive any notification.
Any ideas would be most appreciated.
-
Ok, I have come up with 2 possible solutions... but not sure which would be the better of the two solutions.
Solution 1 (more difficult to code I'm sure):
Put extra settings in for which bots to link mail for. When you add a new mail message it checks member list for each of those bots to see who are valid recipients. Then on successful send it checks for bot that that member is part of and sends a message to that bot to notify them of a new mail message. Then that bot does the checking too see if they are online and delivers to whatever toon they are on (if applicable). Not entirely sure how the heck to code that... but yeah...
Solution 2 (easier but possibilty of spam):
Setup a cron job for every 5 minutes or so to check for unread messages for members of the bot. If there is an unread message send you the message. Downfall would be if they don't check it they would keep getting a message every 5 mins.
Thoughs?
-
Cron sounds like the cleaner solution.