From 4a679ba1be08e9302970cd7dc11fcc70e7fc4c91 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 28 Mar 2016 19:40:15 +0200 Subject: Core/Commands: Prevent creating accounts containing '@' character with .account create command --- src/server/scripts/Commands/cs_account.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 0edb5714934..b195d864222 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -121,6 +121,13 @@ public: if (!accountName || !password) return false; + if (strchr(accountName, '@')) + { + handler->PSendSysMessage(LANG_ACCOUNT_USE_BNET_COMMANDS); + handler->SetSentErrorMessage(true); + return false; + } + switch (sAccountMgr->CreateAccount(std::string(accountName), std::string(password), email)) { case AccountOpResult::AOR_OK: -- cgit v1.2.3