Skip to content

Commit c5093d2

Browse files
committed
Update os_notify.cpp
1 parent 617cc2e commit c5093d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/third/os_notify.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,12 @@ class NotifyList
160160
/* Check if a User matches to a mask */
161161
bool Check(const User *u, const Anope::string &mask)
162162
{
163-
/* Regex mask: Matches against u@h and n!u@h#r only */
163+
/* Regex mask: Matches against nick, u@h, and n!u@h#r */
164164
if (mask.length() >= 2 && mask[0] == '/' && mask[mask.length() - 1] == '/')
165165
{
166166
const Anope::string uh = u->GetIdent() + '@' + u->host;
167167
const Anope::string nuhr = u->nick + '!' + uh + '#' + u->realname;
168-
return (Anope::Match(uh, mask, false, true) || Anope::Match(nuhr, mask, false, true));
168+
return (Anope::Match(u->nick, mask, false, true) || Anope::Match(uh, mask, false, true) || Anope::Match(nuhr, mask, false, true));
169169
}
170170

171171
/* Use 'modes' Entry to perform matching per item (nick, user, host, real) */
@@ -945,7 +945,7 @@ class OSNotify : public Module
945945

946946
const Anope::string uh = u->GetIdent() + '@' + u->host;
947947
const Anope::string nuhr = u->nick + '!' + uh + '#' + u->realname;
948-
if (ex.regex->Matches(uh) || ex.regex->Matches(nuhr))
948+
if (ex.regex->Matches(u->nick) || ex.regex->Matches(uh) || ex.regex->Matches(nuhr))
949949
return true;
950950
continue;
951951
}

0 commit comments

Comments
 (0)