[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:
- 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.
- 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 ( " ).
- 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
!rename @me "Derek test"
Derek : !rename @me 'Derek test'
* Derek changed name to Derek test
!rename @me ''derek is testing''
Derek test : !rename @me ''derek is testing''
* Derek test changed name to derek is testing
!rename @me "Derek's a super cool guy"
derek is testing : !rename @me 'Derek's a super cool guy'
* derek is testing changed name to Derek's a super cool guy
!rename @me "I have a ' mark in my name now"
Derek's a super cool guy : !rename @me 'I have a ' mark in my name now'
* Derek's a super cool guy changed name to I have a
!rename @me ''I have a ' mark in my name now''
I have a : !rename @me ''I have a ' mark in my name now''
* I have a changed name to I have a ' mark in my name now
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
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~
__________________