diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Commands/cs_account.cpp | 25 | ||||
-rw-r--r-- | src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp | 1 | ||||
-rw-r--r-- | src/server/worldserver/worldserver.conf.dist | 18 |
3 files changed, 23 insertions, 21 deletions
diff --git a/src/server/scripts/Commands/cs_account.cpp b/src/server/scripts/Commands/cs_account.cpp index 467b74f4954..40bfd46e19f 100644 --- a/src/server/scripts/Commands/cs_account.cpp +++ b/src/server/scripts/Commands/cs_account.cpp @@ -114,18 +114,19 @@ public: if (!*args) return false; - char* email; + std::string email; ///- %Parse the command line arguments char* accountName = strtok((char*)args, " "); char* password = strtok(NULL, " "); - if (!(email = strtok(NULL, " '"))) - email = ""; + char* possibleEmail = strtok(NULL, " ' "); + if (possibleEmail) + email = possibleEmail; if (!accountName || !password) return false; - AccountOpResult result = sAccountMgr->CreateAccount(std::string(accountName), std::string(password), std::string(email)); + AccountOpResult result = sAccountMgr->CreateAccount(std::string(accountName), std::string(password), email); switch (result) { case AOR_OK: @@ -135,7 +136,7 @@ public: TC_LOG_INFO(LOG_FILTER_CHARACTER, "Account: %d (IP: %s) Character:[%s] (GUID: %u) created Account %s (Email: '%s')", handler->GetSession()->GetAccountId(), handler->GetSession()->GetRemoteAddress().c_str(), handler->GetSession()->GetPlayer()->GetName().c_str(), handler->GetSession()->GetPlayer()->GetGUIDLow(), - accountName, email); + accountName, email.c_str()); } break; case AOR_NAME_TOO_LONG: @@ -546,7 +547,7 @@ public: PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_GET_EMAIL_BY_ID); stmt->setUInt32(0, accountId); PreparedQueryResult result = LoginDatabase.Query(stmt); - + if (result) { emailoutput = (*result)[0].GetString(); @@ -797,19 +798,19 @@ public: { if (!*args) return false; - + ///- Get the command line arguments char* account = strtok((char*)args, " "); char* email = strtok(NULL, " "); char* emailConfirmation = strtok(NULL, " "); - + if (!account || !email || !emailConfirmation) { handler->SendSysMessage(LANG_CMD_SYNTAX); handler->SetSentErrorMessage(true); return false; } - + std::string accountName = account; if (!AccountMgr::normalizeString(accountName)) { @@ -817,7 +818,7 @@ public: handler->SetSentErrorMessage(true); return false; } - + uint32 targetAccountId = AccountMgr::GetId(accountName); if (!targetAccountId) { @@ -825,12 +826,12 @@ public: handler->SetSentErrorMessage(true); return false; } - + /// can set email only for target with less security /// This also restricts setting handler's own email. if (handler->HasLowerSecurityAccount(NULL, targetAccountId, true)) return false; - + if (strcmp(email, emailConfirmation) != 0) { handler->SendSysMessage(LANG_NEW_EMAILS_NOT_MATCH); diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp index f207df9aff3..6b0f5dfd9e9 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/instance_halls_of_stone.cpp @@ -19,6 +19,7 @@ #include "InstanceScript.h" #include "WorldSession.h" #include "halls_of_stone.h" +#include <Player.h> DoorData const doorData[] = { diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist index 018cd309805..dbf2a808230 100644 --- a/src/server/worldserver/worldserver.conf.dist +++ b/src/server/worldserver/worldserver.conf.dist @@ -28,6 +28,7 @@ # CHARACTER DELETE OPTIONS # CUSTOM SERVER OPTIONS # LOGGING SYSTEM SETTINGS +# PACKET SPOOF PROTECTION SETTINGS # ################################################################################################### @@ -1106,7 +1107,6 @@ AllowTickets = 1 DungeonFinder.OptionsMask = 1 - # # DBC.EnforceItemAttributes # Description: Disallow overriding item attributes stored in DBC files with values from the @@ -1133,10 +1133,10 @@ RBAC.DefaultGroups = "" # # Account.PasswordChangeSecurity -# Description: Controls how secure you want the password changes to be. -# Default: 2 - RBAC (RBAC en- or disables Email confirmation per group) +# Description: Controls how secure the password changes are. +# Default: 0 - None (Old and new password) # 1 - Email (Email confirmation necessary) -# 0 - None (Just Old and new password comparision. Default.) +# 2 - RBAC (RBAC enable or disables email confirmation per group) Account.PasswordChangeSecurity = 0 @@ -2806,14 +2806,14 @@ Log.Async.Enable = 0 ################################################################################################### # -# Packet Spoof Protection Settings +# PACKET SPOOF PROTECTION SETTINGS # # These settings determine which action to take when harmful packet spoofing is detected. # # PacketSpoof.Policy # Description: Determines the course of action when packet spoofing is detected. -# Values: 0 - Log only (LOG_FILTER_NETWORKIO) -# 1 - Log + kick +# Default: 1 - Log + kick +# 0 - Log only (LOG_FILTER_NETWORKIO) # 2 - Log + kick + ban PacketSpoof.Policy = 1 @@ -2821,9 +2821,9 @@ PacketSpoof.Policy = 1 # # PacketSpoof.BanMode # Description: If PacketSpoof.Policy equals 2, this will determine the ban mode. -# Values: 0 - Ban Account -# 2 - Ban IP # Note: Banning by character not supported for logical reasons. +# Default: 0 - Ban Account +# 2 - Ban IP # PacketSpoof.BanMode = 0 |