BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => 0.4.x Custom/Unofficial Modules => Topic started by: Temar on July 23, 2007, 01:55:50 pm
-
This is Improved AFK Module
New Features
- Does Check to see if your after some 1 else whois afk, when coming back from afk at same time
- Now Tells you How Long the Person has been AFK
- Now has alias Function were you can add an alias use this Module (http://bebot.link/index.php/topic,868.msg6539/topicseen.html#new), and if that alias gets spoken the afk msg will apear for example my character is chris05 i added alias chris now when some 1 says chris while im afk they get the afk message
- When an Alias is used this module will Check all the alts attached to the char that has the alias set
- Now Removes a User from AFK if they Log off
- Messaged that Trigger AFK response will now be saved and displayed upon user return
Changes
- 27/07/07 - Fixed the Remove user from AFK when logoff
- 27/07/07 - Added Lots of Cache and reduced alot of unnessessary checking
- 27/07/07 - Move get Alt list as only need to get only but it was doing it for every afkalias
- 27/07/07 - Fixed where addslashes was being added but not removed(deleted it cuz not needed for cache)
- 31/07/07 - Removed Useless Line, Change get alias list to get directly and not function
- 31/07/07 - Added Setting so you can turn of Use of Alias
- 11/08/07 - Fixed bug were buddy wasnt being called
- 14/08/07 - prefix no longer Req
- 29/08/07 - Message saving and displaying
Notes
You can use This AFK Module with out Alias.php, you shouldnt have any problems
-
This is Patch File for AFK.php incase the Bebot team add to SVN
Edit - Updated Patch (11/08/07)
-
Some comments:
- You are doing one mysql query each time someone says anything in private group of org chat. That's bad, mysql queries are one of the more cost-intensive commands (cpu wise). Which is why we reduced them as much as possible by caching and optimization for 0.4
- The msg_check() function is pretty excessive for being called everytime any chat happens. Some optimization would be much better, if you need to do some bookkeeping like going over alts do it in the handler for the !afk command itself.
- The alias module looks quite a bit like the shortcuts (http://bebot.link/wiki/shortcuts) module (http://svn.shadow-realm.org/index.py/BeBot/trunk/core/ShortCuts.php?revision=723&view=markup). Perhaps you can use that instead? It's already in the bot after all.
-
You are doing one mysql query each time someone says anything in private group of org chat. That's bad, mysql queries are one of the more cost-intensive commands (cpu wise). Which is why we reduced them as much as possible by caching and optimization for 0.4
Ill Do some Caching later today
The msg_check() function is pretty excessive for being called everytime any chat happens. Some optimization would be much better, if you need to do some bookkeeping like going over alts do it in the handler for the !afk command itself.
Ill see what i can do :D
The alias module looks quite a bit like the shortcuts module. Perhaps you can use that instead? It's already in the bot after all.
Never looked at that module its for commands only isnt it , but there maybe improveing that module instead of new module might be better
-
ah i see it a shortcut that can be used with anything
well i cant just use it as i dont want the afk module checking other shortcut just the names of members
what you thing would be the best way to acomplish this alreadythere?
-
1 thing i can do which would be good for large org with alot of members and will prob have alot of alias's
is to get and cache ONLY the the alias's relivant to the users that are AFK
-
And i will also add a If no 1 is AFK dont Check the msg
-
ah i see it a shortcut that can be used with anything
well i cant just use it as i dont want the afk module checking other shortcut just the names of members
what you thing would be the best way to acomplish this alreadythere?
I guess I should add class names to the shortcuts, so you can just query character aliases and no other shortcuts.
-
Made Lots of Changes
you also Need an update of Alias.php for the Added Cache
-
Added Option to Turn of Use of Alias
Incase you want this for the Time AFK and not alias :D
-
Fixed Bug
-
Added message saving so when like some 1 saying ur name a gets user is afk (message)
what ever they said to trigger it is saved
and when u come back if there is any messages they are shown