Skip to content

Commit

Permalink
src/bridge/AdminRoomHandler.ts: don't require commands be uppercase
Browse files Browse the repository at this point in the history
when using `!cmd`

IRC commands can be lowercase.

Signed-off-by: Ferass El Hafidi <vitali64pmemail@protonmail.com>
  • Loading branch information
Ferass El Hafidi committed Aug 6, 2024
1 parent 5586765 commit 7956631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bridge/AdminRoomHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export class AdminRoomHandler {
const keyword = args[0];

// keyword could be a failed server or a malformed command
if (!keyword.match(/^[A-Z]+$/)) {
if (!keyword.match(/^[A-Za-z]+$/)) {
// if not a domain OR is only word (which implies command)
if (!keyword.match(/^[a-z0-9:\.-]+$/) || args.length === 1) {
throw new Error(`Malformed command: ${keyword}`);
Expand Down

0 comments on commit 7956631

Please sign in to comment.