diff --git a/main.js b/main.js index 90e2059..00cb489 100644 --- a/main.js +++ b/main.js @@ -544,6 +544,11 @@ client.login("m.login.password", {"user": settings.matrixuser, "password": setti return; } + if (event.getContent().body.toLowerCase().replace(/\s/g, "").startsWith("!")) { + sendMatrixNotice(event.getRoomId(), "I'm sorry, but my programming forbids me from sending text messages that start with `!`."); + return; + } + var matches = room.name.match(/SMS_([1-9][0-9]+)(?:_([1-9][0-9]+))?/g); console.log(event.getRoomId()); if (matches == null || (matches.length != 1 && matches.length != 2)) {