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: Wishlist module  (Read 30148 times)

0 Members and 5 Guests are viewing this topic.

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Wishlist module
« on: April 07, 2010, 02:51:06 pm »
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: [Select]
!wishlist
!wishlist add TEXT
Other commands should be accessible from clicks in UI.

Configuration:
Code: [Select]
!settings wishlist
and
Code: [Select]
!wishadmin rules TEXT
Again other commands should be acessed from the UI.
« Last Edit: April 12, 2010, 10:04:35 am by Tutomech »

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Wishlist module
« Reply #1 on: April 07, 2010, 02:54:00 pm »
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
« Last Edit: April 12, 2010, 10:33:39 am by Tutomech »

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Wishlist module
« Reply #2 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.
BeBot Founder and Fixer Kingpin

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Wishlist module
« Reply #3 on: April 09, 2010, 10:39:45 am »
I've been pondering on doing something similar myself. Will check this out later when I get some time.

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: [Select]
$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;";

Any tips/suggestions are welcome.
Tuto

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: Wishlist module
« Reply #4 on: April 10, 2010, 08:35:13 pm »
hmmmm nice one ...
but would it bee possibel to tell the wish-creator over the gui of the mod ?

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Wishlist module
« Reply #5 on: April 11, 2010, 11:44:16 am »
hmmmm nice one ...
but would it bee possibel to tell the wish-creator over the gui of the mod ?

A tell command from the wishlist was planned at the start, but i do not know how useful would that be.
Adding it is no problem at all, since I already know who is online and on which alt.

I almost have a version 1.2, but it needs 1 more bug fix. I ll add a tell command too.

My noob question is, how do i see number of lines updated in PHP?
I do NOT want to add additional query to check creator name.
Code: [Select]

   $sql = "UPDATE ".$this -> dataname." SET `status` = '0', `statname` = '$name', `stattime` = '$time' WHERE `creator`='$name' and `id` = $id";
   $result = $this -> bot -> db -> query($sql);
« Last Edit: April 11, 2010, 12:42:49 pm by Tutomech »

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Wishlist module
« Reply #6 on: April 12, 2010, 09:59:00 am »
Released version 1.2a.

Check 2nd post for details and download.
tuto

Offline Barbapappan

  • BeBot Rookie
  • *
  • Posts: 4
  • Karma: +0/-0
Re: Wishlist module
« Reply #7 on: October 29, 2010, 01:09:14 pm »
I threw this module into our AO org bot. But some wishes show up as duplicates. The request ID's are the same on the duplicate entries. When I click Filled on one of them, both is marked as Filled. Any ideas why they pop up two times?

Offline Tsamoonia

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
    • The Great Ones
Re: Wishlist module
« Reply #8 on: October 30, 2010, 12:31:09 am »
can someone explain what this is?  wishlist?  what is it all about?

Offline Tsamoonia

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
    • The Great Ones
Re: Wishlist module
« Reply #9 on: November 04, 2010, 06:25:25 pm »
i cant seem to get this module to work.  is it still be worked on or is there something i am missing?

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Wishlist module
« Reply #10 on: November 05, 2010, 12:36:50 pm »
I threw this module into our AO org bot. But some wishes show up as duplicates. The request ID's are the same on the duplicate entries. When I click Filled on one of them, both is marked as Filled. Any ideas why they pop up two times?

You are probably sharing one wishlist between 2 bots.
If both bots have the same person in their online list, their entries get duplicated by db query.
A quick and dirty fix is to delete the duplicate online entry in online table.

Sorry but i was not able to find enough time to fix the issue. Might fix it in not so near future.

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Wishlist module
« Reply #11 on: November 05, 2010, 12:38:19 pm »
can someone explain what this is?  wishlist?  what is it all about?

Please do read the introduction posts of this thread.

Offline Tutomech

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Wishlist module
« Reply #12 on: November 05, 2010, 12:43:54 pm »
i cant seem to get this module to work.  is it still be worked on or is there something i am missing?

You did not provide enough information for me to give you any helpful answer.

The module is in use in DOC so i consider it a "beta" version.

Offline elrojo

  • BeBot Rookie
  • *
  • Posts: 5
  • Karma: +0/-0
Re: Wishlist module
« Reply #13 on: November 20, 2010, 10:59:34 am »
nice idea for a module.  Since i'm new to all of this, is there any chance that you might be able to post the commands possible etc?

Offline Tsamoonia

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
    • The Great Ones
Re: Wishlist module
« Reply #14 on: November 21, 2010, 11:22:26 pm »
Sorry tut.  Yeah i read about it.  i like the idea but i cant seem to get it to work.  No wishes are being added that people are trying to add... when i say its not working... the module is there and we can use teh commands and it respond appropriately but nothing shows up on the list.. nothing is saving.  in the settings i was not sure about this...

Quote
otherbot: XXXXXX
Description: Name of the bot that is hosting data (has to be in same database).
/tell XXXXX !set wishlist otherbot <new value>

Should i have my bot in here or is there a different bot that i need to have listed as the host?

I may try and delete it and reinstall it to the bot... any ideas as to what the issue is

 

* 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: 393
  • 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