Fixed compilation errors introduced in previous commit
This commit is contained in:
parent
c0b2501f61
commit
0b70dca915
5 changed files with 16 additions and 13 deletions
|
@ -75,7 +75,7 @@ namespace Noikoio.RegexBot.ConfigItem
|
|||
if (section["blacklist"] != null)
|
||||
{
|
||||
if (mode == FilterType.Whitelist)
|
||||
throw new RuleConfig.RuleImportException("Cannot have whitelist AND blacklist defined.");
|
||||
throw new RuleImportException("Cannot have whitelist AND blacklist defined.");
|
||||
mode = FilterType.Blacklist;
|
||||
}
|
||||
if (mode == FilterType.None) list = new EntityList(); // might even be fine to keep it null?
|
||||
|
|
12
ConfigItem/RuleImportException.cs
Normal file
12
ConfigItem/RuleImportException.cs
Normal file
|
@ -0,0 +1,12 @@
|
|||
using System;
|
||||
|
||||
namespace Noikoio.RegexBot.ConfigItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Exception thrown during an attempt to read rule configuration.
|
||||
/// </summary>
|
||||
public class RuleImportException : Exception
|
||||
{
|
||||
public RuleImportException(string message) : base(message) { }
|
||||
}
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Noikoio.RegexBot.ConfigItem;
|
||||
using Noikoio.RegexBot.Feature.RegexResponder;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
@ -165,7 +166,7 @@ namespace Noikoio.RegexBot
|
|||
try
|
||||
{
|
||||
rule = new RuleConfig(newserver, ruleconf);
|
||||
} catch (RuleConfig.RuleImportException ex)
|
||||
} catch (RuleImportException ex)
|
||||
{
|
||||
await SLog("-> Error: " + ex.Message);
|
||||
return false;
|
||||
|
|
|
@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
|||
namespace Noikoio.RegexBot.Feature.RegexResponder
|
||||
{
|
||||
// Contains code for handling each response in a rule.
|
||||
partial class RegexResponder
|
||||
partial class EventProcessor
|
||||
{
|
||||
private delegate Task ResponseProcessor(AsyncLogger l, string cmd, RuleConfig r, SocketMessage m);
|
||||
private readonly ReadOnlyDictionary<string, ResponseProcessor> _commands;
|
||||
|
|
|
@ -147,15 +147,5 @@ namespace Noikoio.RegexBot.Feature.RegexResponder
|
|||
bool? embedmode = ruleconf["MatchEmbeds"]?.Value<bool>();
|
||||
_matchEmbeds = (embedmode.HasValue && embedmode == true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Exception thrown during an attempt to read rule configuration.
|
||||
/// </summary>
|
||||
public class RuleImportException : Exception
|
||||
{
|
||||
public RuleImportException(string message) : base(message) { }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue