-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved removing: multiply pathes + exclude pathes
- Loading branch information
1 parent
d898d42
commit 08254d9
Showing
5 changed files
with
174 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace NyaFs.Processor.Scripting.Configs | ||
{ | ||
class ErrorConfig : ScriptArgsConfig | ||
{ | ||
private string Message = ""; | ||
|
||
public ErrorConfig() : base(-1, null) | ||
{ | ||
|
||
} | ||
|
||
public ErrorConfig(string Message) : base(-1, null) | ||
{ | ||
this.Message = Message; | ||
} | ||
|
||
public override bool IsMyConfig(string[] Args) => true; | ||
|
||
public override bool CheckArgs(string[] Args) | ||
{ | ||
var M = Message + ""; | ||
|
||
for(int i = 1; i < Args.Length; i++) | ||
{ | ||
M = M.Replace($"%{i}%", Args[i]); | ||
} | ||
|
||
Log.Error(0, M); | ||
return false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters