2
Donate to the B3 fund!

"even a small donation helps!"
Donate with PayPal!
Most of the plugins here are made by B3 users and the authors may not visit frequently. If you need support for plugins or if questions remain unanswered, you will have to contact the author directly. Read the full Support Disclaimer here

NOTE: Do not attach plugins to your forumtopics! Attachements are periodically removed by maintenance tasks. Upload your plugins to our Downloads section instead!

Author Topic: Voting Plugin (by danger89)  (Read 38482 times)

Offline danger89

  • Full Member
  • ***
  • Posts: 129
    • JoinMyServer - Game Servers
Re: Voting Plugin (by danger89)
« Reply #60 on: October 23, 2011, 12:13:23 AM »
If everything is in spec (proper readme and all), you can upload this to the download center and it won't be deleted with maintenance (which happens often).

Yes I have everything in spec. Too bad most things are deleted from the forum. I can repack everything. Is it possible to have my own download section in the 3rd party plugins (I got 5 plugins now)?

I can repack the following plugins for CoD4 (or similar games):
  • Anti-Noob Plugin v7
  • Stats Info Plugin v0.0.4
  • Vote Plugin v2.2
  • IP2Location Plugin v0.1.1
  • (NEW!) IP Ban Plugin v1.0

Thanks MordyT !

Kind regards,
Melroy van den Berg (Alias danger89)
« Last Edit: October 23, 2011, 12:14:55 AM by danger89 »
JoinMyServer.com
Call of Duty 4 Game Servers

Offline MordyT

  • Moderator
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Re: Voting Plugin (by danger89)
« Reply #61 on: October 24, 2011, 06:05:39 PM »
Keep in mind I am not saying the following for sure, just what I have seen. The admins here can answer better.

I think only a author can upload his plugins.
That being said, I don't think you get your own section (no one does).
Just upload them, they will get approved, and then you can edit your post and enjoy.

A admin may give you own forum section though (that does happen).
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline noobcake42

  • Newbie
  • *
  • Posts: 2
Re: Voting Plugin (by danger89)
« Reply #62 on: December 11, 2011, 11:28:27 PM »
got this error at the end of a votekick, it did 'kick' the person but there was no tempban

Code: [Select]
ERROR	Error executing crontab <bound method VotingPlugin.end_vote of <b3.plugins.voting.VotingPlugin instance at 0x9939eac>>: expected string or buffer
[('/home/cod/b3/b3/cron.py', 233, 'run', 'c.run()'), ('/home/cod/b3/b3/cron.py', 60, 'run', 'self.command()'), ('/home/cod/b3/b3/plugins/voting.py', 285, 'end_vote', 'self._currentVote.end_vote_yes(self._yes,  self._no)'), ('/home/cod/b3/b3/plugins/voting.py', 384, 'end_vote_yes', 'self._victim.kick("Voted out",  self._caller)'), ('/home/cod/b3/b3/clients.py', 475, 'kick', 'ban.save(self.console)'), ('/home/cod/b3/b3/clients.py', 754, 'save', 'return console.storage.setClientPenalty(self)'), ('/home/cod/b3/b3/storage.py', 520, 'setClientPenalty', "if penalty.keyword and not re.match(r'^[a-z0-9]$', penalty.keyword, re.I):"), ('/usr/lib/python2.6/re.py', 137, 'match', 'return _compile(pattern, flags).match(string)')]

any help?

Offline zyczu

  • Newbie
  • *
  • Posts: 6
Re: Voting Plugin (by danger89)
« Reply #63 on: January 31, 2012, 03:30:01 PM »
Your plugin is great however i'd love to see !votenextmap so players can call a vote to change map, and if it pass, the choosen map will be next, it won't be changed right now.

Offline ThexKezza

  • Jr. Member
  • **
  • Posts: 13
Re: Voting Plugin (by danger89)
« Reply #64 on: April 21, 2012, 04:27:17 AM »
Like the !votenextmap idea nice! just saying is the DL link broken? I cant seem to download the file after going to the 2shared website and clicking the download button =/

Offline MordyT

  • Moderator
  • Hero Member
  • *
  • Posts: 3644
  • Over $300 Donated to B3!
    • MordyT
Help will be given to those with a b3.log

If drop off the map it is due to RL becoming busy :)

System: Python 2.7.3 - Deb 7 - B3 Source Code - 128MB RAM box (rented at $5 a year) - remote MySQL - Remote Web Services

Offline Duca

  • Newbie
  • *
  • Posts: 6
Re: Voting Plugin (by danger89)
« Reply #66 on: May 16, 2012, 10:01:18 PM »
hi, I premise that rather they are prevented with these things, I make excuses myself already from hour if others it had already written but, I would have of the questions: What I would have to replace in order makes that in the votekick votemap, the persons who must vote they must be like minimum 8? And for that if they are not 8 the voting fails? What I must replace in order to make that the time of voting is of 30 second ones? What I must replace in order to make that between a message and an other of the voting there are 2 second ones?

This is the setup I have now
Code: [Select]
<configuration plugin="votekick">
<settings name="settings">
<set name="min_level_vote">0</set>
<set name="vote_times">2</set>
<!-- number of times it shows an announcement -->
<set name="vote_interval_announcements">1</set>
<!-- time in minutes between each announcement -->
<set name="vote_interval_failed">2</set>
<!-- time in minutes after a failed vote and re-vote -->
<set name="vote_minvotes">1</set>
<!-- minimum necessary votes in order to pass a vote -->
</settings>
<settings name="votekick">
<set name="min_level_kick">0</set>
<set name="tempban_percent">75</set>
<!-- minimum necessary percentage that voted in order to pass the vote -->
<set name="tempban_duration">2</set>
<!-- tempban duration in minutes -->
</settings>
<settings name="votemap">
<set name="min_level_map">0</set>
<set name="mapfile">@b3/conf/maplist.txt</set>
</settings>
<settings name="votegametype">
<set name="min_level_gametype">100</set>
<set name="gametypefile">@b3/conf/gametypelist.txt</set>
</settings>
<settings name="votemaprotate">
<set name="min_level_maprotate">0</set>
</settings>
<settings name="votemapgametype">
<set name="min_level_mapgametype">100</set>
</settings>
</configuration>

Offline setman

  • Sr. Member
  • ****
  • Posts: 208
Re: Voting Plugin (by danger89)
« Reply #67 on: June 16, 2012, 06:07:17 PM »
I keep getting this error, it is the last plugin to load.....


120616 09:48:23   BOT       'Loading Plugin #11 voting [C:\\BigBrotherBot-rust\\conf\\voting.xml]'
120616 09:48:23   INFO   'voting is not a built-in plugin (No module named voting)'
120616 09:48:23   INFO   'trying external plugin directory : C:\\BigBrotherBot-rust\\extplugins'
120616 09:48:23   BOT       'VotingPlugin: Loading config C:\\BigBrotherBot-rust\\conf\\voting.xml for VotingPlugin'
120616 09:48:23   CRITICAL   'VotingPlugin: Could not find config file C:\\BigBrotherBot-rust\\conf\\voting.xml'
Traceback (most recent call last):
  File "b3\plugin.pyo", line 93, in loadConfig
  File "b3\config.pyo", line 281, in load
  File "b3\config.pyo", line 187, in load
ConfigFileNotFound: 'C:\\BigBrotherBot-rust\\conf\\voting.xml'

Offline Beber888

  • B3 Contrib/Support
  • Sr. Member
  • *
  • Posts: 179
Re: Voting Plugin (by danger89)
« Reply #68 on: June 18, 2012, 10:15:57 AM »
You have to put py file in /explugins and xml file in /explugins/conf/.
And in you b3.xml you have to set

Quote
<plugin name="voting" config="@b3/extplugins/conf/voting.xml"/>
Python, Php, UrT SourceCode

Offline clack

  • Full Member
  • ***
  • Posts: 64
Re: Voting Plugin (by danger89)
« Reply #69 on: July 02, 2012, 09:33:06 PM »
hi...  ;)
i will add map restart to my voting .....  :-\ :-\
what i do ??  ??? ???
please help me  :) :)

Offline clack

  • Full Member
  • ***
  • Posts: 64
Re: Voting Plugin (by danger89)
« Reply #70 on: July 11, 2012, 10:29:10 AM »
hi...  ;)
when i will vote for a map must type == exampel :::   !votemap mp_rust
how i change it to : !vote map rust    ??? ???
please help  :)

Offline danger89

  • Full Member
  • ***
  • Posts: 129
    • JoinMyServer - Game Servers
Re: Voting Plugin (by danger89)
« Reply #71 on: July 26, 2012, 12:01:33 AM »
I fixed the attachment!  ;D  I said it before the forum should create backups of the attachments before updating there forum.

@clack
Update:
That is not possible at the moment (never will be I guess). You can use !maplist to see the map list. mp_ prefix could be game dependent. Same with the !map command.
« Last Edit: August 04, 2012, 04:29:31 PM by danger89 »
JoinMyServer.com
Call of Duty 4 Game Servers

Offline ruggio95

  • Jr. Member
  • **
  • Posts: 14
Re: Voting Plugin (by danger89)
« Reply #72 on: August 04, 2012, 12:29:38 AM »
I've a problem: Sometime when someone try to do a vote, b3 say: "Error: a vote is already in progress", but there's no vote in progress.

Offline danger89

  • Full Member
  • ***
  • Posts: 129
    • JoinMyServer - Game Servers
Re: Voting Plugin (by danger89)
« Reply #73 on: August 04, 2012, 01:35:31 AM »
I've a problem: Sometime when someone try to do a vote, b3 say: "Error: a vote is already in progress", but there's no vote in progress.

has something to do with following local variable (which is in your case True, bust should be False obviously):
Code: python [Select]
self._in_progress


Uhm you sure you use the latest version? I don't see any bug in the code so far regarding your problem.

If you use the latest version, it can take just a little while before you can do another poll after the previous one. This is because it's working with crontabs.

Edit:
You can always share the b3.log file with us, please set in the b3.xml the log level on 9 just for debugging.
« Last Edit: August 04, 2012, 01:44:09 AM by danger89 »
JoinMyServer.com
Call of Duty 4 Game Servers

Offline ruggio95

  • Jr. Member
  • **
  • Posts: 14
Re: Voting Plugin (by danger89)
« Reply #74 on: August 12, 2012, 01:41:26 PM »
Again, it say a vote is already in progress, but there's no vote! I need to restart B3 every time.

 


Rate this page +1 at Google Search

anything