Merge pull request #1822 from ChrisTyrrel/watch-spaces

Watch module: Allow new entries to use spaces
This commit is contained in:
Alexey Sokolov
2022-01-23 20:37:03 +00:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -632,7 +632,7 @@ class CWatcherMod : public CModule {
CString sHostMask = sLine.Token(1);
CString sTarget = sLine.Token(2);
CString sPattern = sLine.Token(3);
CString sPattern = sLine.Token(3, true);
CString sMessage;
+5
View File
@@ -78,6 +78,11 @@ TEST_F(ZNCTest, WatchModule) {
ircd.Write(":n!i@h PRIVMSG #znc :\001ACTION foo\001");
client.ReadUntil(
":$*!watch@znc.in PRIVMSG nick :* CTCP: n [ACTION foo] to [#znc]");
client.Write("PRIVMSG *watch :add * *spaces *word1 word2*");
client.ReadUntil("Adding entry:");
ircd.Write(":n!i@h PRIVMSG #znc :SOMETHING word1 word2 SOMETHING");
client.ReadUntil(
":*spaces!watch@znc.in PRIVMSG nick :<n:#znc> SOMETHING word1 word2 SOMETHING");
}
TEST_F(ZNCTest, ModuleCrypt) {