stealthbot/StealthBot

Explicit flag operators not being stripped from /add command

Closed this issue · 0 comments

Doing something like /add Bob -B to remove just the B flag from Bob fails with "The specified flags are invalid." This also causes any wrapper commands such as /safeadd, /safedel, /shitadd, etc to fail.

This is caused because the Database.CheckOperation() function is supposed to modify the input string but it is passed ByVal instead of ByRef.

For a workaround, if the user has no flags or only the flag you want to remove, you can use the /add command equivalents:

/shitadd Bob -> /add Bob B
/shitdel Bob -> /rem Bob
/safeadd Bob -> /add Bob S
/safedel Bob -> /rem Bob

If the user has multiple flags you'll have to remove the user entirely and add them back with the new flags (minus the one you want to remove). Protip: use the /whois Bob command first!