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. Thiscausesissueswhen 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