aboutsummaryrefslogtreecommitdiffstats
path: root/src/jake2/server
diff options
context:
space:
mode:
authorRene Stoeckel <[email protected]>2005-12-16 21:17:51 +0000
committerRene Stoeckel <[email protected]>2005-12-16 21:17:51 +0000
commit219716897f191ccba136b8b2489ff3a9f3c35a2e (patch)
tree7def86361b3236aadad34696b5df26a77a3a27ef /src/jake2/server
parent2a95cf79a7276f081c670c79d01dd15101742a49 (diff)
bugfixes in remote command execution
Diffstat (limited to 'src/jake2/server')
-rw-r--r--src/jake2/server/SV_MAIN.java15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/jake2/server/SV_MAIN.java b/src/jake2/server/SV_MAIN.java
index 679ab73..f11a231 100644
--- a/src/jake2/server/SV_MAIN.java
+++ b/src/jake2/server/SV_MAIN.java
@@ -19,7 +19,7 @@
*/
// Created on 13.01.2004 by RST.
-// $Id: SV_MAIN.java,v 1.11 2005-07-01 14:20:55 hzi Exp $
+// $Id: SV_MAIN.java,v 1.12 2005-12-16 21:17:51 salomo Exp $
package jake2.server;
import jake2.Defines;
@@ -436,20 +436,17 @@ public class SV_MAIN {
return 1;
}
- /*
- * =============== SVC_RemoteCommand
- *
+ /**
* A client issued an rcon command. Shift down the remaining args Redirect
- * all printfs ===============
+ * all printfs fromt hte server to the client.
*/
public static void SVC_RemoteCommand() {
int i;
- //char remaining[1024];
String remaining;
i = Rcon_Validate();
- String msg = new String(Globals.net_message.data, 4, -1);
+ String msg = Lib.CtoJava(Globals.net_message.data, 4, 1024);
if (i == 0)
Com.Printf("Bad rcon from " + NET.AdrToString(Globals.net_from)
@@ -460,8 +457,8 @@ public class SV_MAIN {
Com.BeginRedirect(Defines.RD_PACKET, SV_SEND.sv_outputbuf,
Defines.SV_OUTPUTBUF_LENGTH, new Com.RD_Flusher() {
- public void rd_flush(int target, byte[] buffer) {
- SV_SEND.SV_FlushRedirect(target, buffer);
+ public void rd_flush(int target, StringBuffer buffer) {
+ SV_SEND.SV_FlushRedirect(target, buffer.toString().getBytes());
}
});