Skip to content

Commit

Permalink
Fixed #162 : store chat tag bug
Browse files Browse the repository at this point in the history
  • Loading branch information
azalty authored and nuclearsilo583 committed Oct 17, 2023
1 parent 91b00c5 commit 470daab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions addons/sourcemod/scripting/store.sp
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@ public void OnConfigsExecuted()
//Jetpack_OnConfigsExecuted();
//Jihad_OnConfigsExecuted();

Store_Cvars_OnConfigsExecuted(); // store/cvars.sp

// Call foward Store_OnConfigsExecuted
Store_Forward_OnConfigsExecuted(); // store/configs.sp

Expand Down
6 changes: 6 additions & 0 deletions addons/sourcemod/scripting/store/cvars.sp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ public void OnSettingChanged(ConVar convar, const char[] oldValue, const char[]
}
}

void Store_Cvars_OnConfigsExecuted()
{
// Needed, because OnSettingChanged isn't called on config execution if the cvar has the default value (as there is no change in the cvar's value)
g_cvarChatTag.GetString(g_sChatPrefix, sizeof(g_sChatPrefix));
}

//////////////////////////////
// CONVARS //
//////////////////////////////
Expand Down
8 changes: 8 additions & 0 deletions addons/sourcemod/scripting/store_combine.sp
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,8 @@ public void OnConfigsExecuted()
//Jetpack_OnConfigsExecuted();
//Jihad_OnConfigsExecuted();

Store_Cvars_OnConfigsExecuted();

// Call foward Store_OnConfigsExecuted
Forward_OnConfigsExecuted();

Expand Down Expand Up @@ -4723,4 +4725,10 @@ void Store_DB_HouseKeeping(Handle db)
SQL_TVoid(db, m_szLogCleaningQuery);
}
}
}

void Store_Cvars_OnConfigsExecuted()
{
// Needed, because OnSettingChanged isn't called on config execution if the cvar has the default value (as there is no change in the cvar's value)
g_cvarChatTag.GetString(g_sChatPrefix, sizeof(g_sChatPrefix));
}

0 comments on commit 470daab

Please sign in to comment.