From f7ab0cb2d704101da3b5bf63ef32d4253872fb95 Mon Sep 17 00:00:00 2001 From: div0 Date: Sun, 14 Dec 2008 13:29:18 +0000 Subject: [PATCH] better support ~ kickbans git-svn-id: svn://svn.icculus.org/nexuiz/trunk@5211 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/vote.qc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/data/qcsrc/server/vote.qc b/data/qcsrc/server/vote.qc index 488cd1442..2237b025c 100644 --- a/data/qcsrc/server/vote.qc +++ b/data/qcsrc/server/vote.qc @@ -46,10 +46,16 @@ entity GetKickVoteVictim(string vote, string cmd, entity caller) else GetKickVoteVictim_reason = ""; + reason = ""; if(cmd != "vdo" || GetKickVoteVictim_reason == "") reason = "~"; // by convention, ~ prefixes a "unverified" kickban which will not be networked - else - reason = ""; + + if(substring(GetKickVoteVictim_reason, 0, 1) == "~") + { + reason = "~"; + GetKickVoteVictim_reason = substring(GetKickVoteVictim_reason, 1, strlen(GetKickVoteVictim_reason) - 1); + } + if(caller) reason = strcat(reason, "player ", strdecolorize(caller.netname)); else -- 2.39.2