collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18365
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: AFK.php  (Read 10374 times)

0 Members and 1 Guest are viewing this topic.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
AFK.php
« 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, 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
« Last Edit: August 30, 2007, 12:51:09 am by Temar »

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #1 on: July 23, 2007, 02:03:09 pm »
This is Patch File for AFK.php incase the Bebot team add to SVN

Edit - Updated Patch (11/08/07)
« Last Edit: August 12, 2007, 12:21:32 am by Temar »

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: AFK.php
« Reply #2 on: July 23, 2007, 02:18:36 pm »
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 module. Perhaps you can use that instead? It's already in the bot after all.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #3 on: July 23, 2007, 02:27:16 pm »
Quote
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
Quote
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
Quote
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

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #4 on: July 23, 2007, 02:35:59 pm »
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?

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #5 on: July 23, 2007, 02:38:36 pm »
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

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #6 on: July 23, 2007, 02:44:07 pm »
And i will also add a If no 1 is AFK dont Check the msg

Offline Alreadythere

  • BeBot Maintainer
  • BeBot Hero
  • ******
  • Posts: 1288
  • Karma: +0/-0
Re: AFK.php
« Reply #7 on: July 24, 2007, 10:47:16 am »
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.

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #8 on: July 27, 2007, 04:00:21 pm »
Made Lots of Changes
you also Need an update of Alias.php for the Added Cache

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #9 on: July 31, 2007, 05:42:53 pm »
Added Option to Turn of Use of Alias
Incase you want this for the Time AFK and not alias :D

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #10 on: August 12, 2007, 12:22:36 am »
Fixed Bug

Offline Temar

  • Contributor
  • *******
  • Posts: 1140
  • Karma: +0/-0
    • AoFiles
Re: AFK.php
« Reply #11 on: August 30, 2007, 12:52:46 am »
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

 

* Recent Posts
0.8.x updates for AO by bitnykk
[June 23, 2024, 03:19:47 pm ]


0.8.x updates for AoC by bitnykk
[June 23, 2024, 03:19:44 pm ]


[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm ]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am ]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm ]

* Who's Online
  • Dot Guests: 310
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal