/brutalshutdown

/brutalshutdown

Postby joppiesaus » 05 Oct 2013, 10:58

Simple command! Shutdowns the server on a brutal way! Causes socket errors and stuff. Not really recomended. Only if you have some realllyyy trouble with stuff and shut it down brutally. You could do this if you have some bad ops on your server who griefed everything, brutalshutdown and your world may be saved. I tested this.

WARNING: YOU SHOULD NOT USE THIS COMMAND FOR A NORMAL SHUT-DOWN.
It comes with no warranty everything will be normal afterwards; Read Dzienny's comment. Use it only for an emergency.
Code: Select all
using System;

// By: joppiesaus
namespace MCDzienny
{
   public class CmdBrutalshutdown : Command
   {
      public override string name { get { return "brutalshutdown"; } }
      public override string shortcut { get { return "bsd"; } }
      public override string type { get { return "other"; } }
      public override bool museumUsable { get { return false; } }
      public override LevelPermission defaultRank { get { return LevelPermission.Admin; } }

      public override void Use(Player p, string message)
      {
            Environment.Exit(0); // Insert exit code here, google it. 10 = unknown error, 2 = bad username, it is old win32 stuff.
            // You don't have to edit it. Exit code zero will "normal shutdown". xD
      }

      public override void Help(Player p)
      {
         Player.SendMessage(p, "/brutalshutdown - Shutsdown the server immediatly. Not recommended for normal use.");
      }
   }
}


Uses:
  • Someone is opped and is immediatly exploiting it
  • Map is being heavealy griefed
  • Anything that's need to be saved but you don't want to save.(someone has got really much money after he joined the server and earned it than, brutalshutdown and it's gone.)
joppiesaus
 
Posts: 379
Joined: 20 Aug 2012, 07:28
Location: in a obsedian house, with glass in it so i can see the lava!

Re: /brutalshutdown

Postby dzienny » 05 Oct 2013, 11:05

Side effect of this command is that the progress of online players won't be updated, ie a gained experience, money, etc. So, as joppiesaus mentioned - it's not recommended to use it :)
User avatar
dzienny
Administrator
 
Posts: 1181
Joined: 23 Jan 2011, 14:27


Return to Custom Commands

Who is online

Users browsing this forum: No registered users and 6 guests