Defines for server command context flags
parent
153f07fdfb
commit
d2c0b4905a
|
@ -3267,8 +3267,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
||||||
privs);
|
privs);
|
||||||
|
|
||||||
line += processServerCommand(ctx);
|
line += processServerCommand(ctx);
|
||||||
send_to_sender = ctx->flags & 1;
|
send_to_sender = ctx->flags & SEND_TO_SENDER;
|
||||||
send_to_others = ctx->flags & 2;
|
send_to_others = ctx->flags & SEND_TO_OTHERS;
|
||||||
delete ctx;
|
delete ctx;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,7 +130,7 @@ void cmd_shutdown(std::wostringstream &os,
|
||||||
ctx->server->requestShutdown();
|
ctx->server->requestShutdown();
|
||||||
|
|
||||||
os<<L"*** Server shutting down (operator request)";
|
os<<L"*** Server shutting down (operator request)";
|
||||||
ctx->flags |= 2;
|
ctx->flags |= SEND_TO_OTHERS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void cmd_setting(std::wostringstream &os,
|
void cmd_setting(std::wostringstream &os,
|
||||||
|
@ -232,7 +232,7 @@ std::wstring processServerCommand(ServerCommandContext *ctx)
|
||||||
{
|
{
|
||||||
|
|
||||||
std::wostringstream os(std::ios_base::binary);
|
std::wostringstream os(std::ios_base::binary);
|
||||||
ctx->flags = 1; // Default, unless we change it.
|
ctx->flags = SEND_TO_SENDER; // Default, unless we change it.
|
||||||
|
|
||||||
u64 privs = ctx->privs;
|
u64 privs = ctx->privs;
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
|
|
||||||
|
#define SEND_TO_SENDER (1<<0)
|
||||||
|
#define SEND_TO_OTHERS (1<<1)
|
||||||
|
|
||||||
struct ServerCommandContext
|
struct ServerCommandContext
|
||||||
{
|
{
|
||||||
|
|
||||||
std::vector<std::wstring> parms;
|
std::vector<std::wstring> parms;
|
||||||
std::wstring paramstring;
|
std::wstring paramstring;
|
||||||
Server* server;
|
Server* server;
|
||||||
|
|
Loading…
Reference in New Issue