// Parse commands
if(message[0] == L'/')
{
- line += L"Server: ";
-
size_t strip_size = 1;
if (message[1] == L'#') // support old-style commans
++strip_size;
message = message.substr(strip_size);
-
+
WStrfnd f1(message);
f1.next(L" "); // Skip over /#whatever
std::wstring paramstring = f1.next(L"");
player,
privs);
- line += processServerCommand(ctx);
+ std::wstring reply(processServerCommand(ctx));
send_to_sender = ctx->flags & SEND_TO_SENDER;
send_to_others = ctx->flags & SEND_TO_OTHERS;
+
+ if (ctx->flags & SEND_NO_PREFIX)
+ line += reply;
+ else
+ line += L"Server: " + reply;
+
delete ctx;
}
#define SEND_TO_SENDER (1<<0)
#define SEND_TO_OTHERS (1<<1)
+#define SEND_NO_PREFIX (1<<2)
struct ServerCommandContext
{