fix small issues
This commit is contained in:
parent
ff9bfc819f
commit
efab25a36e
3 changed files with 32 additions and 18 deletions
|
@ -61,6 +61,7 @@ namespace Bot.CommandSystem
|
|||
if (parameters.type == "chat") sourceLoc = MessageHandler.Destinations.DEST_LOCAL;
|
||||
else if (parameters.type == "group") sourceLoc = MessageHandler.Destinations.DEST_GROUP;
|
||||
else if (parameters.type == "im") sourceLoc = MessageHandler.Destinations.DEST_AGENT;
|
||||
else if (parameters.type == "console") sourceLoc = MessageHandler.Destinations.DEST_CONSOLE_INFO;
|
||||
else sourceLoc = MessageHandler.Destinations.DEST_LOCAL;
|
||||
|
||||
string agentName = parameters.fromName;
|
||||
|
|
|
@ -19,6 +19,9 @@ namespace Bot.NonCommands
|
|||
{
|
||||
if (t.IsClass)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
foreach (NotCommand NC in (NotCommand[])t.GetCustomAttributes(false))
|
||||
{
|
||||
MethodInfo mi = t.GetMethod("handle");
|
||||
|
@ -33,6 +36,10 @@ namespace Bot.NonCommands
|
|||
// _mi.Invoke(Activator.CreateInstance(_mi.DeclaringType), new object[] { });
|
||||
T.Start();
|
||||
}
|
||||
}catch(Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
26
Program.cs
26
Program.cs
|
@ -165,18 +165,18 @@ namespace Bot
|
|||
string fna = null;
|
||||
string lna = null;
|
||||
string pwd = null;
|
||||
if (conf.first == null)
|
||||
if (conf.first == null || conf.first == "")
|
||||
{
|
||||
|
||||
if (args.Length == 0)
|
||||
{
|
||||
|
||||
Log.info(true, "Please enter your avatar's first name: ");
|
||||
Log.info(false, "Please enter your avatar's first name: ");
|
||||
fna = Console.ReadLine();
|
||||
|
||||
Log.info(true, "Please enter the last name: ");
|
||||
Log.info(false, "Please enter the last name: ");
|
||||
lna = Console.ReadLine();
|
||||
Log.info(true, "Now enter your password: ");
|
||||
Log.info(false, "Now enter your password: ");
|
||||
pwd = Console.ReadLine();
|
||||
|
||||
conf.MainProgramDLL = DefaultProgram;
|
||||
|
@ -186,8 +186,8 @@ namespace Bot
|
|||
}
|
||||
else
|
||||
{
|
||||
Log.info(true, "Loading...");
|
||||
Log.info(true, "FirstName: " + args[0]);
|
||||
Log.info(false, "Loading...");
|
||||
Log.info(false, "FirstName: " + args[0]);
|
||||
fna = args[0];
|
||||
lna = args[1];
|
||||
pwd = args[2];
|
||||
|
@ -288,8 +288,14 @@ namespace Bot
|
|||
default:
|
||||
{
|
||||
// Run command!
|
||||
MessageHandler.Destinations src = MessageHandler.Destinations.DEST_CONSOLE_INFO;
|
||||
|
||||
Dictionary<string, string> argsx = new Dictionary<string, string>();
|
||||
argsx.Add("type", "console");
|
||||
argsx.Add("source", "null");
|
||||
argsx.Add("request", consoleCmd);
|
||||
argsx.Add("from", "");
|
||||
argsx.Add("from_sess", "");
|
||||
argsx.Add("fromName", "CONSOLE");
|
||||
passArguments(JsonConvert.SerializeObject(argsx));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -509,10 +515,10 @@ namespace Bot
|
|||
//}
|
||||
}
|
||||
|
||||
prompter.Abort();
|
||||
prompter.Interrupt();
|
||||
client.Network.Logout();
|
||||
}
|
||||
|
||||
while (client.Network.Connected) { }
|
||||
Environment.Exit(0);
|
||||
|
||||
//System.Console.WriteLine("PAUSING. PRESS ANY KEY TO EXIT");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue