Skip to content

Commit 14a493b

Browse files
committed
Get rid of debug and clear vectors before load
1 parent 84375a7 commit 14a493b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/GmCommands.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ GMCommands* GMCommands::instance()
1414

1515
void GMCommands::LoadAccountIds()
1616
{
17+
accountIDs.clear();
18+
1719
std::string accountIds = sConfigMgr->GetOption<std::string>("GmCommandsModule.AccountIds", "");
1820
for (auto& itr : Acore::Tokenize(accountIds, ',', false))
1921
{
@@ -24,6 +26,8 @@ void GMCommands::LoadAccountIds()
2426

2527
void GMCommands::LoadAllowedCommands()
2628
{
29+
allowedCommands.clear();
30+
2731
std::string allowedCommandsList = sConfigMgr->GetOption<std::string>("GmCommandsModule.AllowedCommands", "");
2832
for (auto& itr : Acore::Tokenize(allowedCommandsList, ',', false))
2933
{
@@ -34,10 +38,6 @@ void GMCommands::LoadAllowedCommands()
3438

3539
bool GMCommands::IsAccountAllowed(uint32 accountId) const
3640
{
37-
for (auto& itr : accountIDs)
38-
{
39-
LOG_ERROR("sql.sql", "AccountId {}", itr);
40-
}
4141
return std::find(accountIDs.begin(), accountIDs.end(), accountId) != accountIDs.end();
4242
}
4343

0 commit comments

Comments
 (0)