r5201 - trunk/data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Dec 12 16:24:24 EST 2008
Author: div0
Date: 2008-12-12 16:24:24 -0500 (Fri, 12 Dec 2008)
New Revision: 5201
Modified:
trunk/data/qcsrc/server/vote.qc
Log:
stupid workaround, escape the kick reason... but WHY?!?
Modified: trunk/data/qcsrc/server/vote.qc
===================================================================
--- trunk/data/qcsrc/server/vote.qc 2008-12-12 21:11:44 UTC (rev 5200)
+++ trunk/data/qcsrc/server/vote.qc 2008-12-12 21:24:24 UTC (rev 5201)
@@ -48,24 +48,14 @@
else
reason = "";
if(caller)
- {
- s = strdecolorize(caller.netname);
- if(cvar_value_issafe(s))
- reason = strcat(reason, "player ", s);
- else
- reason = strcat(reason, "player ", uri_escape(s));
- }
+ reason = strcat(reason, "player ", strdecolorize(caller.netname));
else
reason = strcat(reason, "console vote");
if(GetKickVoteVictim_reason != "")
- {
- s = strdecolorize(GetKickVoteVictim_reason);
- if(cvar_value_issafe(s))
- reason = strcat(reason, ": ", s);
- else
- reason = strcat(reason, ": ", uri_escape(s));
- }
+ reason = strcat(reason, ": ", strdecolorize(GetKickVoteVictim_reason));
+ reason = uri_escape(reason); // workaround until we know what to do about the weird extended characters
+
n = stof(ns);
if(ns == ftos(n)) if(n >= 1) if(n <= maxclients)
{
@@ -75,11 +65,11 @@
GetKickVoteVictim_newcommand = strcat(argv(0), " # ", ns);
if(argv(0) == "kickban")
{
- GetKickVoteVictim_newcommand = strcat("sv_cmd ", GetKickVoteVictim_newcommand, " ", cvar_string("g_ban_default_bantime"), " ", cvar_string("g_ban_default_masksize"), " \"", reason, "\"");
+ GetKickVoteVictim_newcommand = strcat(GetKickVoteVictim_newcommand, " ", cvar_string("g_ban_default_bantime"), " ", cvar_string("g_ban_default_masksize"), " ", reason);
}
else if(argv(0) == "kick")
{
- GetKickVoteVictim_newcommand = strcat(GetKickVoteVictim_newcommand, " \"", reason, "\"");
+ GetKickVoteVictim_newcommand = strcat(GetKickVoteVictim_newcommand, " ", reason);
}
return e;
}
More information about the nexuiz-commits
mailing list