Compare commits

...

4 Commits

Author SHA1 Message Date
rtldg
d05e52dbaf
Merge feeb1f4df1 into 7d3913bc3e 2025-09-30 23:33:39 +00:00
mourningsickness
7d3913bc3e
add !worldrecord/!wr aliases (!serverrecord/!sr) (#1257) 2025-09-30 23:33:03 +00:00
rtldg
1993c22112 changelog moment 2025-09-30 23:32:24 +00:00
rtldg
feeb1f4df1 wip... 2025-02-19 00:22:10 +00:00
3 changed files with 27 additions and 9 deletions

View File

@ -3,9 +3,11 @@ Note: Dates are UTC+0.
# v3.?.? - ? - 2025-0?-? - rtldg
# v3.?.? - ? - 2025-??-? - rtldg
what will go here? hmm i wonder... maybe vscript pull request? maybe updating tf2 gamedata because i forgot? who knows...
thank pixel for finding that the 0.5s on-ground start-timer thing wasn't working
# v3.5.1 - small things - 2025-06-24 - rtldg

View File

@ -21,12 +21,12 @@
enum
{
Migration_RemoveWorkshopMaptiers, // 0
Migration_RemoveWorkshopMapzones,
Migration_RemoveWorkshopPlayertimes,
Migration_LastLoginIndex,
Migration_RemoveCountry,
Migration_ConvertIPAddresses, // 5
Migration_RemoveWorkshopMaptiers, // 0 // safe with newly-created tables
Migration_RemoveWorkshopMapzones, // safe with newly-created tables
Migration_RemoveWorkshopPlayertimes, // safe with newly-created tables
Migration_LastLoginIndex, // safe with newly-created tables
Migration_RemoveCountry, // safe with newly-created tables -- doesn't work on sqlite
Migration_ConvertIPAddresses, // 5 //
Migration_ConvertSteamIDsUsers,
Migration_ConvertSteamIDsPlayertimes,
Migration_ConvertSteamIDsChat,
@ -380,8 +380,11 @@ void ApplyMigration(int migration)
void ApplyMigration_LastLoginIndex()
{
char sQuery[128];
FormatEx(sQuery, 128, "ALTER TABLE `%susers` ADD INDEX `lastlogin` (`lastlogin`);", gS_SQLPrefix);
char sQuery[512];
if (gI_Driver == Driver_sqlite)
FormatEx(sQuery, 512, "CREATE INDEX IF NOT EXISTS lastlogin ON `%susers` (lastlogin);", gS_SQLPrefix);
else
FormatEx(sQuery, 512, "ALTER TABLE `%susers` ADD INDEX `lastlogin` (`lastlogin`);", gS_SQLPrefix);
QueryLog(gH_SQL, SQL_TableMigrationSingleQuery_Callback, sQuery, Migration_LastLoginIndex, DBPrio_High);
}

View File

@ -187,10 +187,15 @@ public void OnPluginStart()
// player commands
RegConsoleCmd("sm_wr", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_wr [map]");
RegConsoleCmd("sm_worldrecord", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_worldrecord [map]");
RegConsoleCmd("sm_sr", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_sr [map]");
RegConsoleCmd("sm_serverrecord", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_serverrecord [map]");
RegConsoleCmd("sm_bwr", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_bwr [map] [bonus number]");
RegConsoleCmd("sm_bworldrecord", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_bworldrecord [map] [bonus number]");
RegConsoleCmd("sm_bonusworldrecord", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_bonusworldrecord [map] [bonus number]");
RegConsoleCmd("sm_bsr", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_bsr [map] [bonus number]");
RegConsoleCmd("sm_bserverrecord", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_bserverrecord [map] [bonus number]");
RegConsoleCmd("sm_bonusserverrecord", Command_WorldRecord, "View the leaderboard of a map. Usage: sm_bonusserverrecord [map] [bonus number]");
RegConsoleCmd("sm_recent", Command_RecentRecords, "View the recent #1 times set.");
RegConsoleCmd("sm_recentrecords", Command_RecentRecords, "View the recent #1 times set.");
@ -438,9 +443,17 @@ void RegisterWRCommands(int style)
gSM_StyleCommands.SetValue(sCommand, style);
RegConsoleCmd(sCommand, Command_WorldRecord_Style, sDescription);
FormatEx(sCommand, sizeof(sCommand), "sm_sr%s", sStyleCommands[x]);
gSM_StyleCommands.SetValue(sCommand, style);
RegConsoleCmd(sCommand, Command_WorldRecord_Style, sDescription);
FormatEx(sCommand, sizeof(sCommand), "sm_bwr%s", sStyleCommands[x]);
gSM_StyleCommands.SetValue(sCommand, style);
RegConsoleCmd(sCommand, Command_WorldRecord_Style, sDescription);
FormatEx(sCommand, sizeof(sCommand), "sm_bsr%s", sStyleCommands[x]);
gSM_StyleCommands.SetValue(sCommand, style);
RegConsoleCmd(sCommand, Command_WorldRecord_Style, sDescription);
}
}