fix triggering custom commands
This commit is contained in:
parent
68a71f5e0d
commit
bb49f42549
1 changed files with 9 additions and 4 deletions
|
|
@ -344,13 +344,13 @@ namespace SecondBotEvents.Services
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
string lowerName = C.command.ToLower();
|
string lowerName = C.command.ToLower();
|
||||||
if(commandnameLowerToReal.ContainsKey(lowerName) == false)
|
if(commandnameLowerToReal.ContainsKey(lowerName) == true)
|
||||||
{
|
{
|
||||||
return new KeyValuePair<bool, string>(false, "Unknown command");
|
C.command = commandnameLowerToReal[lowerName];
|
||||||
}
|
}
|
||||||
C.command = commandnameLowerToReal[lowerName];
|
else if(master.CustomCommandsService.HasCommand(C.command) == true)
|
||||||
if(master.CustomCommandsService.HasCommand(C.command) == true)
|
|
||||||
{
|
{
|
||||||
if(inCustomCommand == true)
|
if(inCustomCommand == true)
|
||||||
{
|
{
|
||||||
|
|
@ -358,6 +358,11 @@ namespace SecondBotEvents.Services
|
||||||
}
|
}
|
||||||
return master.CustomCommandsService.RunCommand(C, source);
|
return master.CustomCommandsService.RunCommand(C, source);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new KeyValuePair<bool, string>(false, "Unknown command");
|
||||||
|
}
|
||||||
|
|
||||||
KeyValuePair<bool,string> reply = RunBaseCommand(C, source);
|
KeyValuePair<bool,string> reply = RunBaseCommand(C, source);
|
||||||
if (C.replyTarget != null)
|
if (C.replyTarget != null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue