mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 23:31:24 +01:00
add alternate !admin prefix for admin commands
This is supported on conduwuit, and I liked it because it's faster for me to type than tab-completing the bot user, and because it makes it a little easier to copy-paste admin commands.
This commit is contained in:
parent
a909e2079b
commit
0b5a07d192
1 changed files with 3 additions and 1 deletions
|
|
@ -522,7 +522,9 @@ impl Service {
|
||||||
.starts_with(&format!("{admin_bot}: "))
|
.starts_with(&format!("{admin_bot}: "))
|
||||||
|| body.starts_with(&format!("{admin_bot} "))
|
|| body.starts_with(&format!("{admin_bot} "))
|
||||||
|| body == format!("{admin_bot}:")
|
|| body == format!("{admin_bot}:")
|
||||||
|| body == admin_bot.as_str();
|
|| body == admin_bot.as_str()
|
||||||
|
|| body.starts_with("!admin ")
|
||||||
|
|| body == "!admin";
|
||||||
|
|
||||||
// This will evaluate to false if the emergency password
|
// This will evaluate to false if the emergency password
|
||||||
// is set up so that the administrator can execute commands
|
// is set up so that the administrator can execute commands
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue