mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-10-02 10:01:34 -04:00
Quit/RageQuit/Hacks/CrashServer should not be usable from console/IRC
Also fix LeaveServer to do nothing when used by console/IRC, instead of throwing an exception
This commit is contained in:
parent
2dee3787c8
commit
e3ef369c38
@ -25,6 +25,7 @@ namespace MCGalaxy.Commands.Misc {
|
||||
public override string shortcut { get { return "rq"; } }
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
public override bool MessageBlockRestricted { get { return true; } }
|
||||
public override bool SuperUseable { get { return false; } }
|
||||
|
||||
public override void Use(Player p, string message, CommandData data) {
|
||||
p.Leave("RAGEQUIT!!");
|
||||
@ -40,6 +41,7 @@ namespace MCGalaxy.Commands.Misc {
|
||||
public override string name { get { return "Quit"; } }
|
||||
public override string type { get { return CommandTypes.Other; } }
|
||||
public override bool MessageBlockRestricted { get { return true; } }
|
||||
public override bool SuperUseable { get { return false; } }
|
||||
|
||||
public override void Use(Player p, string message, CommandData data) {
|
||||
string msg = message.Length > 0 ? "Left the game: " + message : "Left the game.";
|
||||
@ -58,6 +60,7 @@ namespace MCGalaxy.Commands.Misc {
|
||||
public override string shortcut { get { return "Crash"; } }
|
||||
public override string type { get { return CommandTypes.Moderation; } }
|
||||
public override bool MessageBlockRestricted { get { return true; } }
|
||||
public override bool SuperUseable { get { return false; } }
|
||||
|
||||
public override void Use(Player p, string message, CommandData data) {
|
||||
if (message.Length > 0) { Help(p); return; }
|
||||
@ -76,6 +79,7 @@ namespace MCGalaxy.Commands.Misc {
|
||||
public override string shortcut { get { return "Hax"; } }
|
||||
public override string type { get { return CommandTypes.Moderation; } }
|
||||
public override bool MessageBlockRestricted { get { return true; } }
|
||||
public override bool SuperUseable { get { return false; } }
|
||||
|
||||
public override void Use(Player p, string message, CommandData data) {
|
||||
if (message.Length > 0) {
|
||||
|
@ -213,7 +213,7 @@ namespace MCGalaxy {
|
||||
|
||||
bool leftServer = false;
|
||||
void LeaveServer(string chatMsg, string discMsg, bool isKick, bool sync = false) {
|
||||
if (leftServer) return;
|
||||
if (leftServer || IsSuper) return;
|
||||
leftServer = true;
|
||||
CriticalTasks.Clear();
|
||||
ZoneIn = null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user