Fix passive command regex compiling and send m.notices by default

This commit is contained in:
Tulir Asokan 2018-09-21 16:09:26 +03:00
parent ba6bbead12
commit b805641ea4
4 changed files with 11 additions and 4 deletions

View file

@ -83,7 +83,7 @@ func (pc *ParsedCommand) parseCommandSyntax(command maubot.Command) error {
func (pc *ParsedCommand) parsePassiveCommandSyntax(command maubot.PassiveCommand) error {
pc.MatchAgainst = command.MatchAgainst
var err error
pc.Matches, err = regexp.Compile(fmt.Sprintf("(%s)", command.Matches))
pc.Matches, err = regexp.Compile(command.Matches)
pc.MatchesEvent = command.MatchEvent
return err
}