BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Age of Conan Archive => AoC 0.6.x Custom/Unofficial modules => Topic started by: Glarawyn on September 21, 2009, 08:48:46 pm

Title: Vote Core module and Simple Vote for BeBot 0.6
Post by: Glarawyn on September 21, 2009, 08:48:46 pm
I've updated my Vote Core module and Simple Vote (http://bebot.link/0-4-x-customunofficial-modules/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 (http://code.campalot.info/bebot-code/bebot-0-6-2/Vote_Core_1.0.0.zip?attredirects=0&d=1)
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Runemy on September 21, 2009, 10:33:50 pm
Thanks for this one mate!  :)

Having problems downloading the file though.
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Glarawyn on September 21, 2009, 10:43:21 pm
Fixed the link in the original post.  ;D
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Drizzurdeen on October 09, 2009, 05:05:25 pm
kk nice module ... but how i can see the result ???
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Glarawyn 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.
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Drizzurdeen on October 09, 2009, 06:59:36 pm
ah kk ... works fine ... ty
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Runemy 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?

Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Glarawyn 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:


Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Huesos 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
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Draakon 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.
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: shadowrik on January 02, 2010, 02:52:51 am
the download link doesn't work anymore...does anyone have the files?

Thanks
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Glarawyn 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
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: IKShadow on February 18, 2010, 12:34:33 am
For simplevote could bot output: 187 votes result is yes with xx votes.
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Azote on May 29, 2010, 11:49:31 am
Its is no longer avaiable, could you reupload it , thanks
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: louhours on June 01, 2010, 09:00:09 pm
yeah would be nice  :D
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Glarawyn on June 04, 2010, 10:12:24 pm
DynamicDNS didn't update. Fixed that and things should be good to go again.
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Thom on August 18, 2010, 02:21:05 am
I am sorry to say that but Download link doesn't work any more
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Schrottie on August 18, 2010, 12:36:42 pm
Does anyone still have this module and could load it up, please?
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Glarawyn on August 18, 2010, 04:28:51 pm
I moved all my BeBot stuff over to http://code.campalot.info. You can find the module there.

http://code.campalot.info/bebot-code/bebot-0-6-2/Vote_Core_1.0.0.zip?attredirects=0&d=1
Title: Re: Vote Core module and Simple Vote for BeBot 0.6
Post by: Schrottie on August 18, 2010, 06:00:25 pm
thx
SimplePortal 2.3.7 © 2008-2024, SimplePortal