mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Reimplement autoproxy escape character
This commit is contained in:
parent
3e297178c7
commit
a83e9306bb
1 changed files with 5 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ namespace PluralKit.Bot
|
|||
{
|
||||
public class ProxyMatcher
|
||||
{
|
||||
private static readonly char AutoproxyEscapeCharacter = '\\';
|
||||
private static readonly Duration LatchExpiryTime = Duration.FromHours(6);
|
||||
|
||||
private readonly IClock _clock;
|
||||
|
|
@ -42,6 +43,10 @@ namespace PluralKit.Bot
|
|||
{
|
||||
match = default;
|
||||
|
||||
// Skip autoproxy match if we hit the escape character
|
||||
if (messageContent.StartsWith(AutoproxyEscapeCharacter))
|
||||
return false;
|
||||
|
||||
// Find the member we should autoproxy (null if none)
|
||||
var member = ctx.AutoproxyMode switch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue