mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 03:55:18 -04:00
Fix not showing number of messages in /inbox (if you have any messages) after extra timer at login has elapsed. (Thanks JplaysClassic)
This commit is contained in:
parent
9f204057a5
commit
b583e80d27
@ -57,14 +57,12 @@ namespace MCGalaxy {
|
||||
extraTimer.Stop();
|
||||
|
||||
try {
|
||||
Group nobody = Group.findPerm(LevelPermission.Nobody);
|
||||
if (!nobody.commands.Contains("inbox") && !nobody.commands.Contains("send")
|
||||
&& Database.TableExists("Inbox" + name) ) {
|
||||
if (group.commands.Contains("inbox") && Database.TableExists("Inbox" + name) ) {
|
||||
//safe against SQL injections because no user input is given here
|
||||
DataTable Inbox = Database.Fill("SELECT * FROM `Inbox" + name + "`");
|
||||
|
||||
SendMessage("&cYou have &f" + Inbox.Rows.Count + " &cmessages in /inbox");
|
||||
Inbox.Dispose();
|
||||
using (DataTable Inbox = Database.Fill("SELECT * FROM `Inbox" + name + "`")) {
|
||||
if (Inbox.Rows.Count > 0)
|
||||
SendMessage("You have &a" + Inbox.Rows.Count + " %Smessages in /inbox");
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user