mirror of
https://github.com/minetest/minetest.git
synced 2024-11-10 01:33:46 +01:00
Fix to to too two times
This commit is contained in:
parent
d7d8aa1039
commit
dec8c43de3
@ -1845,7 +1845,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (current_playername.length() > PLAYERNAME_SIZE-1) {
|
if (current_playername.length() > PLAYERNAME_SIZE-1) {
|
||||||
error_message = wgettext("Player name to long.");
|
error_message = wgettext("Player name too long.");
|
||||||
playername = current_playername.substr(0,PLAYERNAME_SIZE-1);
|
playername = current_playername.substr(0,PLAYERNAME_SIZE-1);
|
||||||
g_settings->set("name", playername);
|
g_settings->set("name", playername);
|
||||||
continue;
|
continue;
|
||||||
|
@ -1459,7 +1459,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id)
|
|||||||
if (playername_length == PLAYERNAME_SIZE) {
|
if (playername_length == PLAYERNAME_SIZE) {
|
||||||
actionstream<<"Server: Player with name exceeding max length "
|
actionstream<<"Server: Player with name exceeding max length "
|
||||||
<<"tried to connect from "<<addr_s<<std::endl;
|
<<"tried to connect from "<<addr_s<<std::endl;
|
||||||
DenyAccess(peer_id, L"Name to long");
|
DenyAccess(peer_id, L"Name too long");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user