Archive > AO 0.6.x Custom/Unofficial modules

Wishlist module

(1/5) > >>

Tutomech:
Module for tracking wishes of org members.

Contributors:
Originaly developed by Helkarakse (RK2)
Upgraded to version 1.1a by Tutomech (RK2)
Upgraded to version 1.2a by Tutomech (RK2)

Commands:

--- Code: ---!wishlist
!wishlist add TEXT

--- End code ---
Other commands should be accessible from clicks in UI.

Configuration:

--- Code: ---!settings wishlist

--- End code ---
and

--- Code: ---!wishadmin rules TEXT

--- End code ---
Again other commands should be acessed from the UI.

Tutomech:
Version 1.2a (2010-04-12)
Upgraded to version 1.2a by Tutomech (RK2)

Change log:
Bugfixes:
- Undo command shows every time
- Command to delete other person wish does report an error now
New features:
- added a MIA status to wishes for people who did not log in in a long time
- added a tell command to persons names
- added a setting for access level of !wishadmin

TODO:
- Database table names to be changed to bebot naming convention.


Check attachments in this post for the new version.
Tuto

------------------------------------------------------------------------------------
Version 1.1a ( 2010-04-07 )
Originaly developed by Helkarakse (RK2)
Upgraded to version 1.1a by Tutomech (RK2)
Change log:
- Removed access level check for creating list of unhanled wishes.
- Added access level check to command handler
- Added online indicators to names
- Changed timed limit from displaying filled wishes to a fixed number
- Fixed display ordering of unhandled wishes.
- Added option to use otherbot data trough otherbot setting
- Fixed the bug where users could not add Miy's armor to wishes (' injection)

Known issues:
- Undo command shows only if command is invoked by an admin
- Command to delete other person wish does not report an error (database does not allow it to be deleted)

TODO:
- Database table names to be configured properly.
- Add a setting for access levels of !wishlist and !wishadmin
- Fix known issues
- Removing wishes of people who did not log in in a long time.

NOTES:
Module is in alpha stage. It might do some unexpected deeds with untested configurations.
To contact me write to [email protected] or post on forums in http://bebot.link

Khalem:
I've been pondering on doing something similar myself. Will check this out later when I get some time.

Tutomech:

--- Quote from: Khalem on April 09, 2010, 12:15:37 am ---I've been pondering on doing something similar myself. Will check this out later when I get some time.

--- End quote ---

Thank you for kind words.

I consider myself a good coder. I do most of work in C++ and Java. So my PHP code is probably sub pair. But that is not the biggest concern atm.

Issue at hand 1:
I do not know how to handle database table names in BeBot. For a simple install there is no problem at all, but alliance  of bots (farm cities and stuff) and data sharing between bots is not done according to BeBot standards.

Issue at hand 2:
Someday i have to check how to check result of a DB update query so i can report an error if an user tries to delete other persons wish.

After i resolve issue 2, i can publish version 1.2.
The biggest improvement is wishlist ageing (by checking last status change in online DB).

Issue at hand 3:
But since online table is used by multiple bots i can get wrong/duplicate entries for online status of a person. It works in my org install, but there might be an issues there joining tables. current SQL looks like this:

--- Code: --- $sql = "select " . // FIXME ugly dependancy
       "distinct(" . $this -> dataname . ".id), " .
       $this -> dataname . ".creator, " .
       $this -> dataname . ".timestamp, " .
       $this -> dataname . ".request, " .
       "online.status_gc_changetime " .
       "from " . $this -> dataname . " left join online on " . $this -> dataname . ".creator=online.nickname " .
       "where " . $this -> dataname . ".status=1 order by " . $this -> dataname . ".timestamp, online.status_gc_changetime;";

--- End code ---

Any tips/suggestions are welcome.
Tuto

Drizzurdeen:
hmmmm nice one ...
but would it bee possibel to tell the wish-creator over the gui of the mod ?

Navigation

[0] Message Index

[#] Next page

Go to full version