Monthly Target: $400 Donations: $131
 32% 

[L4D2] Vote Manager 3


Post New Thread Reply   
 
Thread Tools Display Modes
Author
McFlurry
Veteran Member
Join Date: Mar 2010
Location: RemoveEdict(0);
Plugin ID:
2617
Plugin Version:
1.3.5
Plugin Category:
Server Management
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    158 
    Plugin Description:
    A rewritten vote manager like madcap's original version
    Old 10-24-2011 , 23:16   [L4D2] Vote Manager 3
    Reply With Quote #1

    Vote Manager 3
    Credit for the original plugin goes to madcap
    Features:

    • Different types of Cooldown(timeout) are available.
    • All vote types are supported.
    • All original features of L4D Vote Manager 2 by madcap are kept
    • New method of comparing access flag strings with a client's flag string(someone correct me if there's an easier way)
    • Translations are now used.*cough*looking for translators*cough*
    • Logs to its own file and/or console.(log file for this plugin is in logs/votemanager.txt
    • Complies with SM 1.3.0+ coding standards.
    Why?
    Simple. The reason this one was made is because valve broke the events for voting back in 2010. This crippled madcap's original plugin because now it couldn't tell when votes ended/passed/failed. This version hooks into usermessages valve implemented some time ago. This is a completely working rewrite.

    Commands:
    • sm_veto and sm_pass
    • sm_customvote <team or use 0 for all teams> <custom issue> <optional command to run>

    Setting up admin_overrides.cfg:
    Version 1.1 now uses admin overrides instead of access cvars, add this block of code to your admin_overrides.cfg in sourcemod\configs\
    Place the code in between the brackets. Please update your .cfg after updating to 1.2
    Added kick_immunity override on version 1.2.2
    PHP Code:
        "veto"    "c"
        "pass"    "c"
        "cooldown_immunity"    "b"
        "notify" "b"
        "returntolobby"    ""
        "restartgame"    ""
        "changedifficulty"    ""
        "changemission"    ""
        "changechapter"    ""
        "changealltalk"    ""
        "restartgame"    ""
        "kick"    ""
        "kick_immunity"    "c"
        "custom"    "b" 
    Now you can edit the flag values to what you want.

    Cvars:
    auto created config by the name of l4d2_votemanager

    PHP Code:
    // This file was auto-generated by SourceMod (v1.4.0-dev)
    // ConVars for plugin "l4d2_vote_manager3 1.2.smx"


    // Clients can call votes after this many seconds
    // -
    // Default: "15.0"
    l4d2_votemanager_cooldown "15.0"

    // 0=cooldown is shared 1=cooldown is independant
    // -
    // Default: "1"
    l4d2_votemanager_cooldown_mode "1"

    // 1=Log vote info to files 2=Log vote info to server; add the values together if you want
    // -
    // Default: "3"
    l4d2_votemanager_log "3"

    // Respect admin immunity levels in kick votes(only when admin kicking admin)
    // -
    // Default: "1"
    l4d2_votemanager_respect_immunity "1"

    // Tanks have immunity against kick votes
    // -
    // Default: "1"
    l4d2_votemanager_tank_immunity "1" 
    To Do:
    • Implement custom votes(no idea if they will even work)
    • Translations for console logging?
    Changelog:

    1.0 - Initial release

    1.1 - Fixed a few things, now uses command overrides for access instead of cvars.

    1.2 - Changed ClientHasAccess stock to change the string that gets passed through to all lower case to prevent bypassing CheckCommandAccess, please change your admin_overrides.cfg to comply with this*look above*

    1.2.2 - Made some changes to veto/pass commands, VoteFail and VotePass usermessages are no longer intercepted and are now just read. added "kick immunity" override(look above). People with kick_immunity flags can only be vote kicked by other players with the kick_immunity flags. Added true as the 4th variable for CheckCommandAccess. Update your phrases as well.
    Please notify me if you still have problems with veto/pass or wrong players being kicked after a kick vote passes.

    1.2.3 - Fixed dumbest mistake ever, which automatically disallowed all pass/veto commands.

    1.2.4 - Fixed kick votes not switching VOTE_STATUS to VOTE_POLLING(thanks ilyaadminman)

    1.2.5 - Fixed issues regarding strings. Kick votes now clear vote strings if they are intercepted preventing a bug with future kick votes.

    1.2.6 - Fixed tank kick checking not checking team, which would lead to false positives.

    1.2.7 - Fixed "callvote kick" bug/exploit

    1.3.0 - Added sm_customvote to call custom votes, "custom" access flag is needed to call custom votes. Veto and Pass will now not run if a vote will not successfully veto or pass. Example admin_overrides is now included with plugin.

    1.3.1 - Fixed strings not getting set to lower case which caused admin_overrides problems. Added third parameter to sm_customvote that is for an optional command. Ex: sm_customvote 0 "Slay Everyone" "sm_slay @all" when the vote passes "sm_slay @all" will run from the client who started the vote, it will not override any access flags.
    Added German translations, thanks to Dont Fear The Reaper
    Please update your translations as they have changed.

    1.3.2 - Fixed spectator bug reported by ilyaadminman

    1.3.3 - Fixed GetClientByName formatting and checking wrong strings
    (12/9/11) Re-uploaded to fix warnings with translations

    1.3.4 - Fixed veto passing votes by mistake.

    1.3.5 - Translations fixed to actually work. ilyaadminman's has improved his Russian translations.

    Beta:
    The current beta can be found HERE.
    Betas:
    1.3.0 rc1(status: done): sm_customvote was added. Uses "custom" admin override. Please give some feedback.

    1.3.0 rc2(status: done): All team custom votes have been fixed. An example admin_overrides.cfg is now packaged with the plugin.

    Credits:
    Visual77: Helped me iron out some bad bugs. He deserves bacon.
    Dont Fear The Reaper: Contributed German translations.

    ilyaadminman: Contributed Russian translations.

    Attached Files
    File Type: zip votemanager3.zip (11.2 KB, 3824 views)
    __________________

    Last edited by McFlurry; 12-22-2011 at 12:50.
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    WolfGang
    BANNED
    Join Date: Oct 2010
    Old 10-24-2011 , 23:42   Re: [L4D2] Vote Manager 3
    Reply With Quote #2

    Could you add an announce to chat to print if the player votes Yes or No, like ViRaGisTe modify the plugin.

    http://forums.alliedmods.net/showpos...&postcount=575

    EDIT: Found #include <l4d2_stocks> which doesn't exist yet, correct #include <l4d_stocks>

    Last edited by WolfGang; 10-25-2011 at 00:14.
    WolfGang is offline
    Visual77
    Veteran Member
    Join Date: Jan 2009
    Old 10-25-2011 , 05:36   Re: [L4D2] Vote Manager 3
    Reply With Quote #3

    it compiles without the l4d_stocks being included.
    is it with or is it without? if it would be with there would be errors upon compile and there were none.

    edit: works but i think logging should include steamids like votemanager2 did

    Last edited by Visual77; 10-25-2011 at 09:32.
    Visual77 is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 10-25-2011 , 09:35   Re: [L4D2] Vote Manager 3
    Reply With Quote #4

    Ah, I left that include file in the source didn't I? Well I'll try to re-upload it in a second. I just left the compiled version in there for people that didn't want to compile it.
    l4d2_stocks is my custom stocks file. I was using to create fake clients to test some of the features.
    __________________

    Last edited by McFlurry; 10-25-2011 at 09:37.
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    Electr000999
    Senior Member
    Join Date: Aug 2011
    Location: Russia, Perm
    Old 10-25-2011 , 11:17   Re: [L4D2] Vote Manager 3
    Reply With Quote #5

    Messages on voting not displayed in a chat-box(
    logging file ok
    Code:
    [10/25/11 19:34:04] Electro started a RestartGame vote!
    [10/25/11 19:34:04] Called vote has passed!
    [10/25/11 19:34:14] Electro started a ChangeChapter vote with option c3m4_plantation!
    [10/25/11 19:34:14] Called vote has passed!
    [10/25/11 19:37:46] Electro started a RestartGame vote!
    [10/25/11 19:37:46] Called vote has passed!
    [10/25/11 19:38:22] Electro started a RestartGame vote!
    [10/25/11 19:38:22] Called vote has passed!
    [10/25/11 19:40:59] Electro started a RestartGame vote!
    [10/25/11 19:41:01] Called vote has passed!
    [10/25/11 19:45:42] Electro started a RestartGame vote!
    [10/25/11 19:45:46] Called vote has failed!
    [10/25/11 19:49:31] Wann^Anomia started a RestartGame vote!
    [10/25/11 19:49:46] Called vote has passed!
    [10/25/11 19:58:31] Electro started a RestartGame vote!
    [10/25/11 19:58:38] Called vote has failed!
    [10/25/11 20:00:32] Electro started a RestartGame vote!
    [10/25/11 20:00:36] Called vote has failed!
    [10/25/11 20:00:44] Electro started a ChangeChapter vote with option c3m4_plantation!
    no errors in the log errors
    Electr000999 is offline
    Send a message via Skype™ to Electr000999
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 10-25-2011 , 11:24   Re: [L4D2] Vote Manager 3
    Reply With Quote #6

    Quote:
    Originally Posted by McFlurry View Post
    New method of comparing access flag strings with a client's flag string(someone correct me if there's an easier way)
    CheckCommandAccess is the proper way to handle that.

    If it's tied to a "feature" rather than an actual command, just make up a command name and set the override_only var to true. The command name is what would be used in admin_overrides or for group overrides.

    This would effectively eliminate the access cvars, let you keep the same defaults, and let people change using the existing admin api as well as allowing/respecting overrides.

    Last edited by psychonic; 10-25-2011 at 11:24.
    psychonic is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 10-25-2011 , 13:08   Re: [L4D2] Vote Manager 3
    Reply With Quote #7

    @Electr00099 you wont be notified of voting actions in chat if you don't have the flags specified in l4d2_votemanager_notify_flags "b"
    if you don't have the b flag you wont be notified in chat. Also the person that calls the vote is not notified of voting actions. As a side note only the vote and its parameters are printed, the pass/fail status of the vote is not printed.

    @Psychonic then my plugin would just use SM's admin_overrides.cfg as where to find access values, right?
    __________________
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 10-25-2011 , 13:10   Re: [L4D2] Vote Manager 3
    Reply With Quote #8

    Quote:
    Originally Posted by McFlurry View Post
    @Psychonic then my plugin would just use SM's admin_overrides.cfg as where to find access values, right?
    You would provide a default in the CheckCommandAccess function, and then yes, if users wanted to override, they would just need to know the "command" name to use in the admin_overrides file, which could just be documented on the first post in place of the cvars.
    psychonic is offline
    McFlurry
    Veteran Member
    Join Date: Mar 2010
    Location: RemoveEdict(0);
    Old 10-25-2011 , 13:19   Re: [L4D2] Vote Manager 3
    Reply With Quote #9

    Ok, seems simple enough. I'll update the plugin later today after I get out of school.
    __________________
    McFlurry is offline
    Send a message via Skype™ to McFlurry
    Powerlord
    Oh Ross.
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 10-25-2011 , 16:37   Re: [L4D2] Vote Manager 3
    Reply With Quote #10

    When you say "Broke events" was that when Valve switched over to a mix of events and user messages?

    I'm only asking because I'm trying to implement L4D and L4D2 support in the BuiltinVotes extension.

    (Incidentally, custom votes are one of the features of said extension)
    __________________
    So long and thanks for all the fish.

    Last edited by Powerlord; 10-25-2011 at 16:41.
    Powerlord is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 01:42.


    Powered by vBulletin®
    Copyright ©2000 - 2017, vBulletin Solutions, Inc.
    Theme made by Freecode