caxanga334 / cvreduxmodified

Modified version of ReFlexPoison's custom votes
GNU General Public License v3.0
15 stars 9 forks source link

Fix Quotes #3

Closed sneak-it closed 6 years ago

sneak-it commented 6 years ago

This commit fixes incorrectly adding quotes to vote results, making {VOTER_ID}, {VOTER_INDEX}, {TARGET_ID}, and {TARGET_INDEX} pretty much unusable.

Currently, as it stands through customvotes, sm_ban #{TARGET_ID} 0 Hacking would result in sm_ban #"9" 0 Hacking, which fails, because the # symbol is required next to the target id. A hacky workaround would be to use {TARGET_NAME}, which could fail if someone has malformed characters, or an identical name as someone else (name stealer cheat).

This solves the issue, and allows for proper commands, such as sm_gag #{TARGET_ID} 20 Gagged for reason. I've left the QuoteString around the Voter & Target SteamID and Name, as I don't see any case for those to not want quotes, and for backwards compatibility since this is a bit of a "breaking" change for those using Voter/Target ID & Index.