X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fcommand%2Fcmd.qc;h=b6a821539c66226f72c4ad523f3a0287986e5c99;hp=3be9fe0ddee779fcbc652f5a1d3bf563bee52836;hb=ff169c9d675521c4e05efe123024cf9703fd4984;hpb=60daabe099ac61a7e64be0aa5065a185d78f2e64 diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 3be9fe0dd..b6a821539 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -617,8 +617,10 @@ void ClientCommand_voice(entity caller, float request, float argc, string comman sprint(caller, sprintf("Invalid voice. Use one of: %s\n", allvoicesamples)); return; } - if (argc >= 3) VoiceMessage(caller, e, substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2))); - else VoiceMessage(caller, e, ""); + string msg = ""; + if (argc >= 3) + msg = substring(command, argv_start_index(2), argv_end_index(-1) - argv_start_index(2)); + VoiceMessage(caller, e, msg); return; }