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();
|
extraTimer.Stop();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Group nobody = Group.findPerm(LevelPermission.Nobody);
|
if (group.commands.Contains("inbox") && Database.TableExists("Inbox" + name) ) {
|
||||||
if (!nobody.commands.Contains("inbox") && !nobody.commands.Contains("send")
|
|
||||||
&& Database.TableExists("Inbox" + name) ) {
|
|
||||||
//safe against SQL injections because no user input is given here
|
//safe against SQL injections because no user input is given here
|
||||||
DataTable Inbox = Database.Fill("SELECT * FROM `Inbox" + name + "`");
|
using (DataTable Inbox = Database.Fill("SELECT * FROM `Inbox" + name + "`")) {
|
||||||
|
if (Inbox.Rows.Count > 0)
|
||||||
SendMessage("&cYou have &f" + Inbox.Rows.Count + " &cmessages in /inbox");
|
SendMessage("You have &a" + Inbox.Rows.Count + " %Smessages in /inbox");
|
||||||
Inbox.Dispose();
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user