CodyNF
01-27-2002, 06:48 AM
I'm adding a #lock command so you can lock your worldserver without using telnet. Here is the code, it should work fine, the thing I need help with is sending a packet to tell the world server to lock. In the world server its stored in net.world_locked. So I suppose I would need to send a packet with "net.world_locked = true/false" , but I'm not good with packets. Can anyone help me out?
/* else if ((strcasecmp(sep.arg[0], "#lock") == 0 && admin >= 200) {
if (sep.arg[1][0] == '1') {
net.world_locked = true;
client->Message(0, "World locked.");
}
else if (sep.arg[1][0] == '0') {
net.world_locked = false;
client->Message(0, "World unlocked.");
}
else
Message(0, "Usage: #lock [1/0]");
}*/
/* else if ((strcasecmp(sep.arg[0], "#lock") == 0 && admin >= 200) {
if (sep.arg[1][0] == '1') {
net.world_locked = true;
client->Message(0, "World locked.");
}
else if (sep.arg[1][0] == '0') {
net.world_locked = false;
client->Message(0, "World unlocked.");
}
else
Message(0, "Usage: #lock [1/0]");
}*/