mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-22 03:05:16 +00:00
Disallow people to join with default yuzu name
This commit is contained in:
parent
13c873aae0
commit
fc6486a1e0
1 changed files with 17 additions and 1 deletions
|
@ -1,10 +1,14 @@
|
|||
#include "server/Client.hpp"
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include "al/layout/SimpleLayoutAppearWaitEnd.h"
|
||||
#include "al/util.hpp"
|
||||
#include "al/util/LiveActorUtil.h"
|
||||
#include "game/SaveData/SaveDataAccessFunction.h"
|
||||
#include "heap/seadHeapMgr.h"
|
||||
#include "logger.hpp"
|
||||
#include "packets/Packet.h"
|
||||
#include "prim/seadSafeString.h"
|
||||
#include "server/hns/HideAndSeekMode.hpp"
|
||||
|
||||
SEAD_SINGLETON_DISPOSER_IMPL(Client)
|
||||
|
@ -56,6 +60,13 @@ Client::Client() {
|
|||
|
||||
mUsername = playerName.name;
|
||||
|
||||
#if EMU
|
||||
if (al::isEqualString(mUsername, "yuzu"))
|
||||
{
|
||||
mUsername = std::to_string(rand()).c_str();
|
||||
}
|
||||
#endif
|
||||
|
||||
mUserID.print();
|
||||
|
||||
Logger::log("Player Name: %s\n", playerName.name);
|
||||
|
@ -75,6 +86,11 @@ void Client::init(al::LayoutInitInfo const &initInfo, GameDataHolderAccessor hol
|
|||
|
||||
mConnectStatus = new (mHeap) al::SimpleLayoutAppearWaitEnd("", "SaveMessage", initInfo, 0, false);
|
||||
|
||||
// #if EMU
|
||||
|
||||
// #endif
|
||||
|
||||
|
||||
mConnectionWait->setTxtMessage(u"Connecting to Server.");
|
||||
mConnectionWait->setTxtMessageConfirm(u"Failed to Connect!");
|
||||
|
||||
|
|
Loading…
Reference in a new issue