mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-10 15:57:53 +00:00
feat: implement system name etc. commands
This commit is contained in:
parent
87f6fe9d75
commit
ac52b5c257
10 changed files with 155 additions and 103 deletions
|
|
@ -149,10 +149,11 @@ public class Context
|
|||
public LookupContext DirectLookupContextFor(SystemId systemId)
|
||||
=> System?.Id == systemId ? LookupContext.ByOwner : LookupContext.ByNonOwner;
|
||||
|
||||
public LookupContext LookupContextFor(SystemId systemId)
|
||||
public LookupContext LookupContextFor(SystemId systemId, bool? _hasPrivateOverride = null, bool? _hasPublicOverride = null)
|
||||
{
|
||||
var hasPrivateOverride = Parameters.HasFlag("private", "priv");
|
||||
var hasPublicOverride = Parameters.HasFlag("public", "pub");
|
||||
// TODO(yusdacra): these should be passed as a parameter to this method all the way from command tree
|
||||
bool hasPrivateOverride = _hasPrivateOverride ?? Parameters.HasFlag("private", "priv");
|
||||
bool hasPublicOverride = _hasPublicOverride ?? Parameters.HasFlag("public", "pub");
|
||||
|
||||
if (hasPrivateOverride && hasPublicOverride)
|
||||
throw new PKError("Cannot match both public and private flags at the same time.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue