mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Remove distinction between /# and / commands
No need to make the server command syntax more complicated than necessary. If the need ever arise, we'll find some other way to distinguish the client commands. Also, the /# syntax is deprecated and will be made obsolete in time.
This commit is contained in:
parent
7e610aece5
commit
153f07fdfb
2 changed files with 5 additions and 15 deletions
|
@ -3245,12 +3245,14 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||
u64 privs = getPlayerPrivs(player);
|
||||
|
||||
// Parse commands
|
||||
std::wstring commandprefix = L"/#";
|
||||
if(message.substr(0, commandprefix.size()) == commandprefix)
|
||||
if(message[0] == L'/')
|
||||
{
|
||||
line += L"Server: ";
|
||||
|
||||
message = message.substr(commandprefix.size());
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue