Permalink
Comparing changes
Open a pull request
- 2 commits
- 3 files changed
- 0 commit comments
- 1 contributor
Unified
Split
Showing
with
12 additions
and 14 deletions.
- +1 −1 src/CheckBasicStyle.lua
- +7 −7 src/LoggerListeners.cpp
- +4 −6 src/RankManager.cpp
| @@ -108,7 +108,7 @@ local g_ViolationPatterns = | ||
| -- Check that all commas have spaces after them and not in front of them: | ||
| {" ,", "Extra space before a \",\""}, | ||
| {",[^%s\"%%]", "Needs a space after a \",\""}, -- Report all except >> "," << needed for splitting and >>,%s<< needed for formatting | ||
| {",[^%s\"%%\']", "Needs a space after a \",\""}, -- Report all except >> "," << needed for splitting and >>,%s<< needed for formatting | ||
| -- Check that opening braces are not at the end of a code line: | ||
| {"[^%s].-{\n?$", "Brace should be on a separate line"}, | ||
| @@ -65,7 +65,7 @@ | ||
| { | ||
| case cLogger::llRegular: | ||
| { | ||
| // Gray on black | ||
| // Gray on black | ||
| Attrib = FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED; | ||
| break; | ||
| } | ||
| @@ -93,7 +93,7 @@ | ||
| virtual void SetDefaultLogColour() override | ||
| { | ||
| { | ||
| SetConsoleTextAttribute(m_Console, m_DefaultConsoleAttrib); | ||
| } | ||
| @@ -119,21 +119,21 @@ | ||
| { | ||
| case cLogger::llRegular: | ||
| { | ||
| // Whatever the console default is | ||
| // Whatever the console default is | ||
| printf("\x1b[0m"); | ||
| break; | ||
| break; | ||
| } | ||
| case cLogger::llInfo: | ||
| { | ||
| // Yellow on black | ||
| // Yellow on black | ||
| printf("\x1b[33;1m"); | ||
| break; | ||
| } | ||
| case cLogger::llWarning: | ||
| { | ||
| // Red on black | ||
| printf("\x1b[31;1m"); | ||
| break; | ||
| break; | ||
| } | ||
| case cLogger::llError: | ||
| { | ||
| @@ -147,7 +147,7 @@ | ||
| virtual void SetDefaultLogColour() override | ||
| { | ||
| // Whatever the console default is | ||
| // Whatever the console default is | ||
| printf("\x1b[0m"); | ||
| } | ||
| }; | ||
| @@ -125,7 +125,7 @@ class cRankManagerIniMigrator | ||
| /** Maps lists of groups to rank names. | ||
| Each group list is either a simple "<Group>" if there's only one group, | ||
| or "<PrimaryGroup>,<FirstSecondaryGroup>,<SecondSecondaryGroup>...", where the secondary groups are | ||
| or "<PrimaryGroup>, <FirstSecondaryGroup>, <SecondSecondaryGroup>...", where the secondary groups are | ||
| lowercased and alpha-sorted. This makes the group lists comparable for equivalence, simply by comparing | ||
| their string names. | ||
| The ranks are named "<Group>" for single-group players, and "AutoMigratedRank_N" for the composite ranks, | ||
| @@ -507,10 +507,8 @@ AStringVector cRankManager::GetPlayerGroups(const AString & a_PlayerUUID) | ||
| // Prepare the DB statement: | ||
| SQLite::Statement stmt(m_DB, | ||
| "SELECT PermGroup.Name FROM PermGroup " | ||
| "LEFT JOIN RankPermGroup " | ||
| "ON PermGroup.PermGroupID = RankPermGroup.PermGroupID " | ||
| "LEFT JOIN PlayerRank " | ||
| "ON PlayerRank.RankID = RankPermGroup.RankID " | ||
| "LEFT JOIN RankPermGroup ON PermGroup.PermGroupID = RankPermGroup.PermGroupID " | ||
| "LEFT JOIN PlayerRank ON PlayerRank.RankID = RankPermGroup.RankID " | ||
| "WHERE PlayerRank.PlayerUUID = ?" | ||
| ); | ||
| stmt.bind(1, a_PlayerUUID); | ||
| @@ -1473,7 +1471,7 @@ void cRankManager::RemovePlayerRank(const AString & a_PlayerUUID) | ||
| stmt.bind(1, a_PlayerUUID); | ||
| stmt.exec(); | ||
| } | ||
| catch(const SQLite::Exception & ex) | ||
| catch (const SQLite::Exception & ex) | ||
| { | ||
| LOGWARNING("%s: Failed to remove rank from player UUID %s: %s", | ||
| __FUNCTION__, a_PlayerUUID.c_str(), ex.what() | ||