2014-06-18 13:32:17 +02:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
|
|
namespace MinecraftClient.Commands
|
|
|
|
|
|
{
|
|
|
|
|
|
public class Reco : Command
|
|
|
|
|
|
{
|
|
|
|
|
|
public override string CMDName { get { return "reco"; } }
|
2014-06-19 19:24:03 +02:00
|
|
|
|
public override string CMDDesc { get { return "reco [account]: restart and reconnect to the server."; } }
|
2014-06-18 13:32:17 +02:00
|
|
|
|
|
2020-06-20 15:01:16 +02:00
|
|
|
|
public override string Run(McClient handler, string command, Dictionary<string, object> localVars)
|
2014-06-18 13:32:17 +02:00
|
|
|
|
{
|
2014-06-19 19:24:03 +02:00
|
|
|
|
string[] args = getArgs(command);
|
|
|
|
|
|
if (args.Length > 0)
|
|
|
|
|
|
{
|
2015-06-20 22:58:18 +02:00
|
|
|
|
if (!Settings.SetAccount(args[0]))
|
2014-06-19 19:24:03 +02:00
|
|
|
|
{
|
|
|
|
|
|
return "Unknown account '" + args[0] + "'.";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2014-06-18 13:32:17 +02:00
|
|
|
|
Program.Restart();
|
|
|
|
|
|
return "";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|