Central Forums Helpbot
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]   Go Down
Print
Topic: !vote  (Read 11420 times)
« on: August 18, 2009, 04:48:53 AM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


We have need of an anonymous election and balloting that cannot be handled by the /org vote command (yeah, I know not very democratic).  Anyhow, I wrote a election plug-in for vhabot.

Basic usage is:

!vote
!vote start [quorum] [percentage to win|majority|supermajority|unanimous] [description of what people are voting for]
!vote stop
!vote abort
!vote yes
!vote no
!vote abstain

ll_Vote.cs

Basic features include:

*The plugin currently only lets you specify "yes" "no" or "abstain". (Could be easily extended, but that's all we needed for now)
*The ability to specify a quorum (minimum number of votes before this is considered a valid election).
*The ability to specify how large of an outcome a person needs to win by (or majority=51, supermajority=67, unanimous=100)
*Everything (except for the posting of election results) is conducted via pm/tell to insure anonymity
*Only one vote per player (because bot maintains alts, the user will have to remove alts before he can cheat on this vote - and people can catch cheaters removing alts)

« Last Edit: August 18, 2009, 05:21:59 AM by Llie »
Logged
« Reply #1 on: August 18, 2009, 07:35:12 AM »
Novice

View Profile
****

Epeen: 3
Posts: 481


Llie: Try catching me on IRC or ingame (RK1). We should talk. Wink

Good job on the vote plugin, could become a very useful addition. Thanks.

As per usual, will go through and fix up whatever is needed and add to the official release. Smiley
----------------------------------------------------------
Sex is like hacking. You get in, you get out, and you hope you didn't leave something behind that can be traced back to you.
----------------------------------------------------------
Naturalistic - RK 1 220 Doctor

Campalot Coder and Superadmin
Logged
« Reply #2 on: December 07, 2009, 04:38:55 PM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


Suggested change to my vote plugin (which Mit is rewriting so that the vote can survive bot reboots).  Anyhow, I think there's a problem with the way the final tabulation of votes works when people cast "abstain" ballots.

The code currently reads:
Code:
int require = ( this._yes + this._no + this._abs)*(this._percentage / 100 );


Which means, "out of everyone who voted, the minimum result needs to be based on all the people who vote" which means if anyone abstains from a vote, it is impossible to obtain a "unanimous" result.

The code should probably be changed to:
Code:
int require = ( this._yes + this._no)*(this._percentage / 100 );

Then the vote "results will only be based on everyone who voted yes or no". Abstain votes only count towards achieving a quorum. I think the latter was my original intention. If you are ambivalent about the result, then you cast your abstain vote, to help meet quorum, but you don't affect the percentage required one way or another of the yes/no votes.
Logged
« Reply #3 on: December 18, 2009, 11:44:21 PM »
Novice

View Profile
****

Epeen: 3
Posts: 481


Added to SVN plus the fix on abstain.

May add in a custom pick of what channels the output goes to while ingame. Currently, any changes are purely hardcoded...
----------------------------------------------------------
Sex is like hacking. You get in, you get out, and you hope you didn't leave something behind that can be traced back to you.
----------------------------------------------------------
Naturalistic - RK 1 220 Doctor

Campalot Coder and Superadmin
Logged
« Reply #4 on: December 22, 2009, 06:59:50 AM »
Rookie

View Profile
**

Epeen: 0
Posts: 55


Was there a final list of commands and explanations?
Or is the original post above still the correct explanation of the reworked and installed vote system commands and use?

Retired President: RKA United -Hog-
Logged
« Reply #5 on: December 23, 2009, 06:08:10 AM »
VhaBot Developers
Full Member

View Profile
***

Epeen: 5
Posts: 204


Well, the one I wrote works as documented, but Veremit is rewriting it so that it saves results into a database so that voting survives bot reboots.  One of the drawbacks my plugin suffered in use on our org bot was that the bot would need to restarted or it would disconnect, or FC would reboot their servers.  Anyhow, voting on the same election got interrupted multiple times.  It was annoying.  If your voting will only last a couple hours, you're probably good with the plugin as is, but if it is going to go on for several days or weeks, you're likely to get your election interrupted before you achieve quorum.
Logged
« Reply #6 on: April 29, 2010, 11:51:14 PM »
Rookie

View Profile
**

Epeen: 0
Posts: 55


The result is only posting to private channel
It should also post to org channel

thanks
Retired President: RKA United -Hog-
Logged
« Reply #7 on: April 30, 2010, 01:18:41 AM »
Apprentice coder
VhaBot Developers
Novice

View Profile
***

Epeen: 4
Posts: 446


I believe the only version 'out there' is PrivateGroup only .. it won't post in OrgChat. This is intentional, there was no desire in the original version to have any activity in orgchat.
Logged
Pages: [1]   Go Up
Print
Jump to: