mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 07:13:58 -05:00
Give comfirmation message to Banner
Add Unban by database ID ( supplements GUID ) Fixed Wisdom response Added database ID to whoami response Added first time setup for users with no config file default configs updated
This commit is contained in:
@ -6,19 +6,31 @@ namespace IW4MAdmin
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static String IP;
|
||||
static int Port;
|
||||
static String RCON;
|
||||
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
Console.WriteLine("=====================================================");
|
||||
Console.WriteLine(" IW4M ADMIN v");
|
||||
Console.WriteLine(" by RaidMax ");
|
||||
Console.WriteLine("=====================================================");
|
||||
|
||||
file Config = new file("config\\servers.cfg");
|
||||
String[] SV_CONF = Config.getParameters(3);
|
||||
double Version = 0.1;
|
||||
|
||||
if (SV_CONF == null || SV_CONF.Length != 3)
|
||||
{
|
||||
setupConfig();
|
||||
SV_CONF = new file("config\\servers.cfg").getParameters(3);
|
||||
}
|
||||
|
||||
|
||||
if (Config.getSize() > 0 && SV_CONF != null)
|
||||
{
|
||||
Console.WriteLine("=====================================================");
|
||||
Console.WriteLine(" IW4M ADMIN v" + Version);
|
||||
Console.WriteLine(" by RaidMax ");
|
||||
Console.WriteLine("=====================================================");
|
||||
Console.WriteLine("Starting admin on port " + SV_CONF[1]);
|
||||
|
||||
Server IW4M;
|
||||
@ -32,5 +44,19 @@ namespace IW4MAdmin
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void setupConfig()
|
||||
{
|
||||
Console.WriteLine("Hey there, it looks like you haven't set up a server yet. Let's get started!");
|
||||
Console.Write("Please enter the IP: ");
|
||||
IP = Console.ReadLine();
|
||||
Console.Write("Please enter the Port: ");
|
||||
Port = Convert.ToInt32(Console.ReadLine());
|
||||
Console.Write("Please enter the RCON password: ");
|
||||
RCON = Console.ReadLine();
|
||||
file Config = new file("config\\servers.cfg", true);
|
||||
Config.Write(IP + ":" + Port + ":" + RCON);
|
||||
Console.WriteLine("Great! Let's go ahead and start 'er up.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user