|
|
@ -80,14 +80,14 @@ matrixclient.on('Room.timeline', function(event, room, resettimeline) {
|
|
|
|
|
|
|
|
|
|
|
|
let body = event.getContent().body;
|
|
|
|
let body = event.getContent().body;
|
|
|
|
|
|
|
|
|
|
|
|
let bang = body.match(/^\!([a-zA-Z]*)/);
|
|
|
|
let project = body.match(/^\!([a-zA-Z]*)/);
|
|
|
|
if(bang === null) {
|
|
|
|
if(project === null) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bang = bang[1];
|
|
|
|
project = project[1];
|
|
|
|
|
|
|
|
|
|
|
|
if(commands[bang] !== undefined) {
|
|
|
|
if(commands[project] !== undefined) {
|
|
|
|
let command = commands[bang];
|
|
|
|
let command = commands[project];
|
|
|
|
|
|
|
|
|
|
|
|
let args = body.match(command['regex']);
|
|
|
|
let args = body.match(command['regex']);
|
|
|
|
if(args === null) {
|
|
|
|
if(args === null) {
|
|
|
|