mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-06 21:25:42 +12:00
fix bugs
This commit is contained in:
parent
de9dfaf362
commit
91fd5820ab
2 changed files with 7 additions and 7 deletions
|
@ -88,11 +88,11 @@ namespace HISP.Game.Chat
|
|||
}
|
||||
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)
|
||||
{
|
||||
message += Messages.MuteHelp;
|
||||
formattedmessage += Messages.MuteHelp;
|
||||
goto leave;
|
||||
}
|
||||
|
||||
|
@ -134,13 +134,13 @@ namespace HISP.Game.Chat
|
|||
user.MuteAll = true;
|
||||
} else
|
||||
{
|
||||
message += Messages.MuteHelp;
|
||||
formattedmessage += Messages.MuteHelp;
|
||||
goto leave;
|
||||
}
|
||||
|
||||
leave:;
|
||||
|
||||
byte[] chatPacket = PacketBuilder.CreateChat(message, PacketBuilder.CHAT_BOTTOM_LEFT);
|
||||
byte[] chatPacket = PacketBuilder.CreateChat(formattedmessage, PacketBuilder.CHAT_BOTTOM_LEFT);
|
||||
user.LoggedinClient.SendPacket(chatPacket);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -1716,7 +1716,7 @@ namespace HISP.Server
|
|||
{
|
||||
db.Open();
|
||||
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.Prepare();
|
||||
MySqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
|
@ -1747,7 +1747,7 @@ namespace HISP.Server
|
|||
{
|
||||
db.Open();
|
||||
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("@limit", limit);
|
||||
sqlCommand.Prepare();
|
||||
|
@ -1779,7 +1779,7 @@ namespace HISP.Server
|
|||
|
||||
db.Open();
|
||||
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.Prepare();
|
||||
MySqlDataReader reader = sqlCommand.ExecuteReader();
|
||||
|
|
Loading…
Add table
Reference in a new issue