change regex to match new format of admin create command

This commit is contained in:
Henry Hiles 2026-07-02 12:05:07 -04:00
commit 647483991e
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -77,7 +77,7 @@ void main(List<String> argsRaw) async {
case EventTypes.Message: case EventTypes.Message:
if (!event.senderId.startsWith("@${settings.adminName}:")) break; if (!event.senderId.startsWith("@${settings.adminName}:")) break;
final results = RegExp( final results = RegExp(
r"@(?<username>[a-zA-Z0-9._-]+):[^\s]+.*?password:\s+`(?<password>[^`]+)`", r"@(?<username>[a-zA-Z0-9._-]+):[^\s]+.*?password\s+`(?<password>[^`]+)`",
).firstMatch(event.body); ).firstMatch(event.body);
if (results == null) return; if (results == null) return;