Raised This Month: $101 Target: $400
 25% 

[TF2] Basic Votekick Immunity


Post New Thread Reply   
 
Thread Tools Display Modes
Author
psychonic

BAFFLED
Join Date: May 2008
Plugin ID:
2431
Plugin Version:
1.2
Plugin Category:
Server Management
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Causes TF2 player kick votes to obey SM immunity levels
    Old 07-08-2011 , 20:50   [TF2] Basic Votekick Immunity
    Reply With Quote #1

    Not much description needed beyond what's in post header.

    Plugin stops people from calling kick votes in TF2 that target someone that they cannot via SM. ie. normal players cannot target admins. Admins cannot target admins of higher immunity. etc.

    Enable sv_vote_issue_kick_allowed with immunity!
    Enable sv_vote_issue_kick_allowed with impunity!
    Attached Files
    File Type: sp Get Plugin or Get Source (tf_kickvote_immunity.sp - 2000 views - 2.9 KB)

    Last edited by psychonic; 05-12-2013 at 13:42.
    psychonic is offline
    FlaminSarge
    Veteran Member
    Join Date: Jul 2010
    Old 07-08-2011 , 20:54   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #2

    Hi.
    __________________
    Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

    All plugins: Randomizer/GiveWeapon, ModelManager, etc.
    Post in plugin threads with questions.
    Steam is for playing games.
    You will be fed to javalia otherwise.
    Psyduck likes replays.
    FlaminSarge is offline
    DarthNinja
    SourceMod Plugin Approver
    Join Date: Mar 2009
    Location: PreThinkHook()
    Old 07-08-2011 , 21:39   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #3

    <insert psyduck here>
    __________________
    DarthNinja is offline
    FlyveHest
    Member
    Join Date: Nov 2010
    Location: Denmark
    Old 07-09-2011 , 04:25   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #4

    This is precisely what the doctor ordered, thanks
    FlyveHest is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 07-19-2011 , 21:20   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #5

    Request:

    Please update this to send the CallVoteFailed usermessage back to the player with arguments 12 for the first byte (reason, 12 is Can't Kick the Server Admin as discovered by me earlier today and now documented here) and... -1 for the short (time), as it's only used for reason 2.
    __________________
    Am I back? Well, we'll see.

    Last edited by Powerlord; 07-19-2011 at 21:31.
    Powerlord is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 07-19-2011 , 21:21   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #6

    Quote:
    Originally Posted by Powerlord View Post
    Request:

    Please update this to send the CallVoteFailed usermessage back to the player with arguments -1/255 for the first byte (team) and 12 for the second byte (reason, 12 is Can't Kick the Server Admin).
    What is the benefit?
    psychonic is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 07-20-2011 , 13:13  
    Reply With Quote #7

    Quote:
    Originally Posted by psychonic View Post
    What is the benefit?
    It comes out in the user's own language.

    As Asherkin pointed out in another thread, this corresponds to the #GameUI_vote_failed_cannot_kick_admin in-game translation string.

    -- MERGE --

    Specifically, the code would look something like this (Note I was looking at the wrong usermessage earlier, which is why the arguments here are byte and short):
    PHP Code:
    new Handle:bf StartMessageOne("CallVoteFailed"clientUSERMSG_RELIABLE);
    BfWriteByte(bf12);
    BfWriteShort(bf, -1);
    EndMessage(); 
    The second argument is the time when the first argument is 2, otherwise it's ignored. However, all of Valve's internal functions set it to -1 when it's not used.

    -- MERGE --

    And here is what it would look like in game, in English.

    -- MERGE --

    I haven't tested it, but in theory this should work.

    Changelog:
    • Updated version to 1.0a (I don't like changing major or minor version numbers in other peoples' plugins.)
    • Modified it to send the CallVoteFailed usermessage with fail reason 12 rather than a PrintToChat message.
    • Changed the spelling of psychonic's name to remove an extra n (it was spelled psychoninc in 1.0)
    The SourceMod docs aren't clear if I needed to CloseHandle the BitBuffer handle or not, so I did just in case. If you get errors about invalid handles, it didn't, and this is why you're getting errors. Tell me and I'll fix it.
    Attached Files
    File Type: sp Get Plugin or Get Source (tf_kickvote_immunity.sp - 554 views - 2.9 KB)
    __________________
    Am I back? Well, we'll see.

    Last edited by asherkin; 07-20-2011 at 13:30.
    Powerlord is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 07-20-2011 , 13:36   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #8

    Quote:
    Originally Posted by Powerlord View Post
    The SourceMod docs aren't clear if I needed to CloseHandle the BitBuffer handle or not, so I did just in case.
    It will probably error when trying to close as there's nothing mentioned about them needing to be closed and,
    Quote:
    Closeable: Only if explicitly stated
    http://wiki.alliedmods.net/Handles_(...ng)#BitBuffers

    I'll likely add it as optional. The wording of the message is likely a bit too specific for the taste of some. "the server admin" in my mind implies that it is a single person running the server. The individual may not even have any admin power at all, let alone being "the admin". They may just have a reserve slot or be a donator.

    If people are concerned about the hardcoded message in the plugin not being translatable, I can add a translation file.
    psychonic is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 07-20-2011 , 16:17   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #9

    Quote:
    Originally Posted by psychonic View Post
    It will probably error when trying to close as there's nothing mentioned about them needing to be closed and,


    http://wiki.alliedmods.net/Handles_(SourceMod_Scripting)#BitBuffers

    I'll likely add it as optional. The wording of the message is likely a bit too specific for the taste of some. "the server admin" in my mind implies that it is a single person running the server. The individual may not even have any admin power at all, let alone being "the admin". They may just have a reserve slot or be a donator.
    One thing I didn't do was see if setting the short to a client index or userid would cause it to display something differently.
    __________________
    Am I back? Well, we'll see.
    Powerlord is offline
    Rd1981
    Senior Member
    Join Date: Apr 2011
    Old 02-26-2012 , 00:29   Re: [TF2] Basic Votekick Immunity
    Reply With Quote #10

    Is there a certain flag this plugin follows because donators can still be kicked havent tried on admins yet.
    Rd1981 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:12.


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