table.insert(messages, {name=messageName, enabled=messageInfo.enabled, match=Translate.useRegex and messageInfo.match or Translate.regex_to_plain(messageInfo.match)})
Utility.print(string.format("@YMatch Text@w: %s", Translate.useRegex and Omit.groups[group].messages[message].match or Translate.regex_to_plain(Omit.groups[group].messages[message].match)))
Utility.print(string.format("@YEnabled@w: %s", Omit.groups[group].messages[message].enabled and "yes" or "no"))
Utility.print(string.format("@YEnabled@w: %s", Omit.groups[group].messages[message].enabled and "yes" or "no"))
end
end
@ -1481,7 +1481,7 @@ function Omit.add_message(alias, line, wc)
end
end
Omit.groups[group].messages[message] = {
Omit.groups[group].messages[message] = {
["enabled"] = true,
["enabled"] = true,
["match"] = match
["match"] = Translate.useRegex and match or Translate.plain_to_regex(match)
}
}
Omit.save()
Omit.save()
Omit.add_triggers()
Omit.add_triggers()
@ -1543,7 +1543,7 @@ function Omit.edit_message(alias, line, wc)
Utility.plugin_message(string.format("Added message named %s to the %s group.", message, value))
Utility.plugin_message(string.format("Added message named %s to the %s group.", message, value))
elseif (field == "match") then
elseif (field == "match") then
Omit.groups[group].messages[message].match = value
Omit.groups[group].messages[message].match = Translate.useRegex and value or Translate.plain_to_regex(value)
Utility.plugin_message(string.format("Changed the match string of the %s message in the %s group to the following:", message, group))
Utility.plugin_message(string.format("Changed the match string of the %s message in the %s group to the following:", message, group))