mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 18:25:10 +00:00
[MOD/ADD] Use glob-like system for admins.
This commit is contained in:
parent
0fc0fdd6f4
commit
95aaa0dbc9
10 changed files with 154 additions and 13 deletions
|
|
@ -96,12 +96,12 @@ ParseeBotHandler(ParseeData *data, HashMap *event)
|
|||
}
|
||||
|
||||
/* TODO: Make an improvment. This is the bare minimum */
|
||||
if (!StrEquals(sender, data->config->matrix_admin))
|
||||
if (!ParseeIsAdmin(data, sender))
|
||||
{
|
||||
Free(ASSend(
|
||||
data->config, id, profile,
|
||||
"m.room.message",
|
||||
MatrixCreateNotice("You are not the admin")
|
||||
MatrixCreateNotice("You are not authorised to do this.")
|
||||
));
|
||||
Free(profile);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue