aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2016-03-28 19:40:15 +0200
committerShauren <shauren.trinity@gmail.com>2016-03-28 19:40:15 +0200
commit4a679ba1be08e9302970cd7dc11fcc70e7fc4c91 (patch)
treed5b2d8290c08e0d43e37e8988d14934757ee56d4 /src/server/scripts
parent335a1e495cc250ca7b738df003b8cad2903aae6c (diff)
Core/Commands: Prevent creating accounts containing '@' character with .account create command
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_account.cpp7
1 files changed, 7 insertions, 0 deletions
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: