Raised This Month: $51 Target: $400
 12% 

[Any?] Double Quote Fix


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Plugin ID:
4805
Plugin Version:
18.0220.0
Plugin Category:
Technical/Development
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Provides a temporary fix to the issue with double quotes in the TF2 and CS:GO chat box.
    Old 09-06-2015 , 03:50   [Any?] Double Quote Fix
    Reply With Quote #1

    [Any?] Double Quote Fix
    v. 18.0220.0

    This plugin aims to provide a fix bandaid to the issue that exists in CS:GO, TF2, and probably other games, wherein any chat message which is sent through the chat box (and not through the console) has all double quote characters ( " ) changed to single quote characters ( ' ) by the client. This causes issues when typing commands with arguments enclosed in quotation marks.

    The plugin works as follows:
    1. The plugin first listens for all incoming commands that aren't say or say_team, but were triggered through say or say_team. If such a command is detected, we move on to step 2, then 3.
    2. If sm_doublequotefix_doubles is set appropriately, the plugin will search for any pair of consecutive single quote characters ( '' ) and change them into a single doublequote character ( " ).
    3. If sm_doublequotefix_smartchange is set appropriately, the plugin will attempt to intelligently change any pair of remaining single quotes into double quotes. This will only happen if:
      • Two single quotes are found.
      • The first single quote is either preceded by a space, or is the first character in the argstring.
      • The second single quote is followed by either a space or the null terminator.
      • No double quote is found between the two single quotes.

    Normally, the plugin should allow you to use doublequote marks as normal. However, if your argument, enclosed in quotes, contains an apostrophe, you may need to enclose the argument in FOUR quote characters (of either type) with two on each side.

    The results speak for themselves. Expand the spoiler box below for a demonstration. Notice how the plugin doesn't always get it right.

    Spoiler





    ConVars
    • sm_doublequotefix_update 2 - Controls Updater compatibility
      • 0 : Completely disables Updater integration
      • 1 : Updater will notify you in Updater.log if an update becomes available.
      • 2 : Updater will automatically download any updates. They will be installed on the next server start or map change.
      • 3 : Updater will automatically download and immediately install any updates.

    • sm_doublequotefix_doubles 2 : (0/1/2/3) Should the plugin attempt to change all pairs of consecutive single quotes into double quotes?
      • 0 : Never do this. Completely disable this feature.
      • 1 : No by default, but allow individual players to enable it for themselves with the /settings menu.
      • 2 : Yes by default, but allow individual players to disable it for themselves with the /settings menu.
      • 3 : Always do this.


    • sm_doublequotefix_smartchange 2 : (0/1/2/3) Should the plugin attempt to intelligently change any remaining pairs of single quotes into double quotes?
      • 0 : Never do this. Completely disable this feature.
      • 1 : No by default, but allow individual players to enable it for themselves with the /settings menu.
      • 2 : Yes by default, but allow individual players to disable it for themselves with the /settings menu.
      • 3 : Always do this.

    Changelog
    Spoiler



    Installation:
    To install, simply ensure that your Sourcemod installation is up to date, and place the SMX in your plugins folder.

    Please also consider installing Updater. This will let you automatically keep your plugins up-to-date.
    Compiling:
    The plugin requires custom includes. As such, it does not compile here on the forums. Includes required to compile the plugin are:

    Downloads:
    If you like what you see here, please consider donating~
    __________________

    Last edited by ddhoward; 02-21-2018 at 01:28.
    ddhoward is offline
     



    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 21:48.


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