This commit is contained in:
SilicaAndPina 2020-12-27 16:04:38 +13:00
parent de9dfaf362
commit 91fd5820ab
2 changed files with 7 additions and 7 deletions

View file

@ -88,11 +88,11 @@ namespace HISP.Game.Chat
} }
public static bool Mute(string message, string[] args, User user) public static bool Mute(string message, string[] args, User user)
{ {
string mesasge = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1)); string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
if (args.Length <= 0) if (args.Length <= 0)
{ {
message += Messages.MuteHelp; formattedmessage += Messages.MuteHelp;
goto leave; goto leave;
} }
@ -134,13 +134,13 @@ namespace HISP.Game.Chat
user.MuteAll = true; user.MuteAll = true;
} else } else
{ {
message += Messages.MuteHelp; formattedmessage += Messages.MuteHelp;
goto leave; goto leave;
} }
leave:; leave:;
byte[] chatPacket = PacketBuilder.CreateChat(message, PacketBuilder.CHAT_BOTTOM_LEFT); byte[] chatPacket = PacketBuilder.CreateChat(formattedmessage, PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket); user.LoggedinClient.SendPacket(chatPacket);
return true; return true;

View file

@ -1716,7 +1716,7 @@ namespace HISP.Server
{ {
db.Open(); db.Open();
MySqlCommand sqlCommand = db.CreateCommand(); MySqlCommand sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE playerId=@playerId ORDER BY score ASC"; sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE playerId=@playerId ORDER BY score DESC";
sqlCommand.Parameters.AddWithValue("@playerId", playerId); sqlCommand.Parameters.AddWithValue("@playerId", playerId);
sqlCommand.Prepare(); sqlCommand.Prepare();
MySqlDataReader reader = sqlCommand.ExecuteReader(); MySqlDataReader reader = sqlCommand.ExecuteReader();
@ -1747,7 +1747,7 @@ namespace HISP.Server
{ {
db.Open(); db.Open();
MySqlCommand sqlCommand = db.CreateCommand(); MySqlCommand sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE minigame=@gameTitle ORDER BY score ASC LIMIT @limit"; sqlCommand.CommandText = "SELECT * FROM leaderboards WHERE minigame=@gameTitle ORDER BY score DESC LIMIT @limit";
sqlCommand.Parameters.AddWithValue("@gameTitle", gameTitle); sqlCommand.Parameters.AddWithValue("@gameTitle", gameTitle);
sqlCommand.Parameters.AddWithValue("@limit", limit); sqlCommand.Parameters.AddWithValue("@limit", limit);
sqlCommand.Prepare(); sqlCommand.Prepare();
@ -1779,7 +1779,7 @@ namespace HISP.Server
db.Open(); db.Open();
MySqlCommand sqlCommand = db.CreateCommand(); MySqlCommand sqlCommand = db.CreateCommand();
sqlCommand.CommandText = "SELECT DISTINCT score FROM leaderboards WHERE minigame=@gameTitle ORDER BY score ASC"; sqlCommand.CommandText = "SELECT DISTINCT score FROM leaderboards WHERE minigame=@gameTitle ORDER BY score DESC";
sqlCommand.Parameters.AddWithValue("@gameTitle", gameTitle); sqlCommand.Parameters.AddWithValue("@gameTitle", gameTitle);
sqlCommand.Prepare(); sqlCommand.Prepare();
MySqlDataReader reader = sqlCommand.ExecuteReader(); MySqlDataReader reader = sqlCommand.ExecuteReader();