mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-22 12:05:51 -04:00
Fix /clones from console
This commit is contained in:
parent
87bdd2cb32
commit
1cd23d6c12
@ -30,7 +30,8 @@ namespace MCGalaxy.Commands.Info {
|
||||
}
|
||||
|
||||
public override void Use(Player p, string message, CommandData data) {
|
||||
if (message.Length == 0 && p != null) {
|
||||
if (message.Length == 0) {
|
||||
if (p.IsSuper) { SuperRequiresArgs(p, "IP address"); return; }
|
||||
message = p.ip;
|
||||
} else {
|
||||
message = ModActionCmd.FindIP(p, message, "find alts of", "clones");
|
||||
|
@ -39,7 +39,7 @@ namespace MCGalaxy.Commands.Moderation {
|
||||
IPAddress ip;
|
||||
if (!IPAddress.TryParse(args[0], out ip)) { p.Message("\"{0}\" is not a valid IP.", args[0]); return; }
|
||||
if (IPAddress.IsLoopback(ip)) { p.Message("You cannot IP ban the server."); return; }
|
||||
if (p != null && p.ip == args[0]) { p.Message("You cannot IP ban yourself."); return; }
|
||||
if (p.ip == args[0]) { p.Message("You cannot IP ban yourself."); return; }
|
||||
if (Server.bannedIP.Contains(args[0])) { p.Message("{0} is already IP banned.", args[0]); return; }
|
||||
// Check if IP is shared by any other higher ranked accounts
|
||||
if (!CheckIP(p, args[0])) return;
|
||||
|
@ -36,7 +36,7 @@ namespace MCGalaxy.Commands.Moderation {
|
||||
|
||||
IPAddress ip;
|
||||
if (!IPAddress.TryParse(args[0], out ip)) { p.Message("\"{0}\" is not a valid IP.", args[0]); return; }
|
||||
if (p != null && p.ip == args[0]) { p.Message("You cannot un-IP ban yourself."); return; }
|
||||
if (p.ip == args[0]) { p.Message("You cannot un-IP ban yourself."); return; }
|
||||
if (!Server.bannedIP.Contains(args[0])) { p.Message(args[0] + " is not a banned IP."); return; }
|
||||
|
||||
string reason = args.Length > 1 ? args[1] : "";
|
||||
|
@ -239,7 +239,7 @@ namespace MCGalaxy.Games {
|
||||
Command.Find("Take").Use(Player.Console, p.name + " 10 Auto fine for pillaring");
|
||||
p.Message(" %WThe next time you pillar, you will be &4kicked!");
|
||||
} else {
|
||||
ModAction action = new ModAction(p.name, null, ModActionType.Kicked, "Auto kick for pillaring");
|
||||
ModAction action = new ModAction(p.name, Player.Console, ModActionType.Kicked, "Auto kick for pillaring");
|
||||
OnModActionEvent.Call(action);
|
||||
p.Kick("No pillaring allowed!");
|
||||
}
|
||||
|
@ -56,7 +56,7 @@ namespace MCGalaxy.Tasks {
|
||||
internal static void FreezeCalcNextRun() { CalcNextRun(freezeTask, Server.frozen); }
|
||||
|
||||
static void FreezeCallback(string[] args) {
|
||||
ModAction action = new ModAction(args[0], null, ModActionType.Unfrozen, "auto unfreeze");
|
||||
ModAction action = new ModAction(args[0], Player.Console, ModActionType.Unfrozen, "auto unfreeze");
|
||||
OnModActionEvent.Call(action);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user