Please sign in to comment.
watch module: Don't handle multiple matching patterns for each target
Keep track of the targets which have already been notified of a matching message, and do not notify them again if other patterns in the same message match also. For example, consider the following match patterns: 1) <*watch> /msg *watch ADD *!*@* *highlight *%nick%* 2) <*watch> /msg *watch ADD *!*@* *highlight *testuser* 3) <*watch> /msg *watch ADD *!*@* *testhilights *test* If %nick% ist something like "testuser123", all of the these patterns match the following message: <otheruser> hey testuser123, look at this: ... Without this patch, the watch module would generate two notify messages for target *highlight, and one notify message for target *testhilights. This is unneccessary because patterns 1 and 2 will result in generating the same notify message twice for target *highlight. By using a std::set, the implementation in this patch keeps track of which targets have already been notified and does not notify them more than once.
- Loading branch information...