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: Vote Core module and Simple Vote for BeBot 0.6  (Read 15750 times)

0 Members and 3 Guests are viewing this topic.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Vote Core module and Simple Vote for BeBot 0.6
« on: September 21, 2009, 08:48:46 pm »
I've updated my Vote Core module and Simple Vote modules for BeBot 0.6.

About the module:
This is a core module to deal with holding an election/poll/vote on BeBot 0.6. Votes are not maintained on a bot restart, so it is designed to be a short (seconds or minutes) poll. Results of the vote are recorded to the database for future reference. Currently there is nothing coded for displaying the historical information logged to the database.

The Vote_Core.php module will help you in creating your own modules that use voting.

I've included SimpleVote.php which is what I used to test things. SimpleVote lets you create a simple yes/no vote.

Commands provided by Vote_Core.php:
/tell yourbot !vote <voteid> <option>

Commands provided by SimpleVote.php:
/tell yourbot !simplevote Enter a yes/no question here.

Installation:
Extract VoteCore_1.0.0.zip to your custom directory.

Download:
Vote_Core_1.0.0.zip
« Last Edit: August 18, 2010, 04:30:52 pm by Glarawyn »

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #1 on: September 21, 2009, 10:33:50 pm »
Thanks for this one mate!  :)

Having problems downloading the file though.
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #2 on: September 21, 2009, 10:43:21 pm »
Fixed the link in the original post.  ;D

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #3 on: October 09, 2009, 05:05:25 pm »
kk nice module ... but how i can see the result ???

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #4 on: October 09, 2009, 05:40:23 pm »
kk nice module ... but how i can see the result ???

The included Simple Vote module will display the results automatically at the end of the vote.

Offline Drizzurdeen

  • BeBot Apprentice
  • ***
  • Posts: 193
  • Karma: +0/-0
    • Obsidian-Cult
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #5 on: October 09, 2009, 06:59:36 pm »
ah kk ... works fine ... ty

Offline Runemy

  • BeBot Apprentice
  • ***
  • Posts: 97
  • Karma: +0/-0
    • Exalted [Age of Conan guild - Aquilonia EU]
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #6 on: October 10, 2009, 07:34:00 pm »
Re: Simplevote
Is it possible to get feedback on how many voted yes vs no in the result?

Edit: Just looked through the code and is it so that the module actually only records enough votes in order to get a majority? As in if there's 20 available members to use the poll and the module collects 11 Yes, it will announce the result even though only a bit more that 50% did vote?

« Last Edit: October 10, 2009, 07:42:26 pm by Runemy »
Wood of Exalted
Age of Conan
Aquilonia - EU

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #7 on: October 12, 2009, 09:45:00 pm »
Re: Simplevote
Is it possible to get feedback on how many voted yes vs no in the result?

Edit: Just looked through the code and is it so that the module actually only records enough votes in order to get a majority? As in if there's 20 available members to use the poll and the module collects 11 Yes, it will announce the result even though only a bit more that 50% did vote?

SimpleVote only creates new votes using VoteCore. All votes are registered through he core module. The information you are looking for is recorded in the database. Results are recorded in the database.

The missing piece is displaying history of the votes, which should be added to vote core...

The vote history table has the following columns:
  • voteid: Timestamp the vote was started.
  • topic: The question posed to voters.
  • options: Options posed to voters. (Each option is separated by a semicolon)
  • tally: The tally for each option. Again semicolon separated.
  • total_votes: Total numver of cotes registered.
  • winner: which option won the vote.



Offline Huesos

  • BeBot User
  • **
  • Posts: 45
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #8 on: November 17, 2009, 09:14:41 am »
The vote_core.php errors  on bot restart in line 331. The bot won't restart  with it
« Last Edit: November 17, 2009, 09:17:13 am by Huesos »

Offline Draakon

  • BeBot Rookie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #9 on: November 18, 2009, 12:41:55 am »
First thanks for developing this module! I find it very useful.

In my case there aren't any errors, but it seems to give incorrect results. One member voted YES and two NO, but the bot gave YES as result.

Bot output:
Code: [Select]
Botname [GROUP] [MSG] [Guild Name] Seshafi: !simplevote Rename guild to "Followers of Seshafi"
Botname [GROUP] [MSG] [Guild Name] Botname: Vote in progress: [link]Rename guild to "Followers of Seshafi"[/link]
Botname [TELL] [INC] AAA: !vote 1258494850 0
Botname [TELL] [OUT] -> AAA: Your vote for option 0 in vote number 1258494850 was registered successfully.
Botname [TELL] [INC] Seshafi: !vote 1258494850 1
Botname [TELL] [OUT] -> Seshafi: Your vote for option 1 in vote number 1258494850 was registered successfully.
Botname [GROUP] [MSG] [Guild Name] Botname: Vote in progress: [link]Rename guild to "Followers of Seshafi"[/link]
Botname [TELL] [INC] BBB: !vote 1258494850 0
Botname [TELL] [OUT] -> BBB: Your vote for option 0 in vote number 1258494850 was registered successfully.
Botname [GROUP] [MSG] [Guild Name] Botname: Vote in progress: [link]Rename guild to "Followers of Seshafi"[/link]
Botname [GROUP] [MSG] [Guild Name] Botname: Vote in progress: [link]Rename guild to "Followers of Seshafi"[/link]
Botname [GROUP] [MSG] [Guild Name] Botname: Vote in progress: [link]Rename guild to "Followers of Seshafi"[/link]
Botname [GROUP] [MSG] [Guild Name] Botname: Vote in progress: [link]Rename guild to "Followers of Seshafi"[/link]
Botname [GROUP] [MSG] [Guild Name] Botname: Vote number 1258494850 [Rename guild to "Followers of Seshafi"] Result: Yes!

MySQL table _vote_history after voting is done:
Code: [Select]
INSERT INTO `Botname_vote_history` (`voteid`, `topic`, `options`, `tally`, `total_votes`, `winner`) VALUES
(1258494850, 'Rename guild to "Followers of Seshafi"', '0:No;1:Yes;', '1:1;', 3, 1);

As you can see, it hasn't recorded votes for 0 (only 1:1;), tho' it has increased votes count (3).

Any help much appreciated.
« Last Edit: November 18, 2009, 12:43:51 am by Draakon »

Offline shadowrik

  • BeBot Rookie
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #10 on: January 02, 2010, 02:52:51 am »
the download link doesn't work anymore...does anyone have the files?

Thanks

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #11 on: January 02, 2010, 05:12:44 am »
Had a few hiccups (weather, transportation, holidays) moving my server to a new hosting facility. Server is up now in my basement crawlspace, and at least some of the DNS records have rolled over. You should be able to grab files now.  :D

Offline IKShadow

  • BeBot User
  • **
  • Posts: 35
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #12 on: February 18, 2010, 12:34:33 am »
For simplevote could bot output: 187 votes result is yes with xx votes.

Offline Azote

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #13 on: May 29, 2010, 11:49:31 am »
Its is no longer avaiable, could you reupload it , thanks

Offline louhours

  • BeBot Rookie
  • *
  • Posts: 9
  • Karma: +0/-0
Re: Vote Core module and Simple Vote for BeBot 0.6
« Reply #14 on: June 01, 2010, 09:00:09 pm »
yeah would be nice  :D

 

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