mirror of
https://github.com/anope/anope.git
synced 2026-07-09 05:43:13 +02:00
Fix some uses of Entry that didn't have their arguments swapped.
This commit is contained in:
@@ -70,7 +70,7 @@ public:
|
||||
// We have to check for bans.
|
||||
for (const auto &entry : c->GetModeList("BAN"))
|
||||
{
|
||||
Entry ban("BAN", entry);
|
||||
Entry ban(entry, "BAN");
|
||||
if (ban.Matches(user))
|
||||
c->RemoveMode(NULL, "BAN", ban.GetMask());
|
||||
}
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
{
|
||||
BotInfo *bi = c->ci->bi;
|
||||
|
||||
Entry ban("BAN", data.value);
|
||||
Entry ban(data.value, "BAN");
|
||||
if (ban.Matches(bi))
|
||||
c->RemoveMode(bi, "BAN", data.value);
|
||||
}
|
||||
|
||||
@@ -260,13 +260,7 @@ class CommandCSAKick final
|
||||
}
|
||||
}
|
||||
|
||||
Entry e("", mask);
|
||||
|
||||
mask = (e.nick.empty() ? "*" : e.nick) + "!"
|
||||
+ (e.user.empty() ? "*" : e.user) + "@"
|
||||
+ (e.host.empty() ? "*" : e.host);
|
||||
if (!e.real.empty())
|
||||
mask += "#" + e.real;
|
||||
mask = Entry(mask).GetCleanMask();
|
||||
}
|
||||
else
|
||||
nc = na->nc;
|
||||
@@ -309,7 +303,7 @@ class CommandCSAKick final
|
||||
for (const auto &[_, u2] : UserListByNick)
|
||||
{
|
||||
AccessGroup nc_access = ci->AccessFor(nc), u_access = source.AccessFor(ci);
|
||||
Entry entry_mask("", mask);
|
||||
Entry entry_mask(mask);
|
||||
|
||||
if ((ci->AccessFor(u2).HasPriv("FOUNDER") || nc_access >= u_access) && entry_mask.Matches(u2))
|
||||
{
|
||||
|
||||
@@ -216,7 +216,7 @@ public:
|
||||
auto *memb = it->second;
|
||||
++it;
|
||||
|
||||
Entry e(mode, mask);
|
||||
Entry e(mask, mode);
|
||||
if (e.Matches(memb->user))
|
||||
{
|
||||
++matched;
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
auto *memb = it->second;
|
||||
++it;
|
||||
|
||||
Entry e("", mask);
|
||||
Entry e(mask);
|
||||
if (e.Matches(memb->user))
|
||||
{
|
||||
++matched;
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
}
|
||||
else if (u != NULL)
|
||||
{
|
||||
Entry akick_mask("", autokick->mask);
|
||||
Entry akick_mask(autokick->mask);
|
||||
if (akick_mask.Matches(u))
|
||||
source.Reply(_("\002%s\002 matches auto kick entry %s on \002%s\002 (%s)."), u->nick.c_str(), autokick->mask.c_str(), ci->name.c_str(), autokick->reason.c_str());
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ public:
|
||||
{
|
||||
for (; ign != ign_end; ++ign)
|
||||
{
|
||||
Entry ignore_mask("", (*ign)->mask);
|
||||
Entry ignore_mask((*ign)->mask);
|
||||
if (ignore_mask.Matches(u, true))
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-2
@@ -737,7 +737,7 @@ bool Channel::MatchesList(User *u, const Anope::string &mode)
|
||||
|
||||
for (const auto &entry : this->GetModeList(mode))
|
||||
{
|
||||
Entry e(mode, entry);
|
||||
Entry e(entry, mode);
|
||||
if (e.Matches(u))
|
||||
return true;
|
||||
}
|
||||
@@ -888,7 +888,7 @@ bool Channel::Unban(User *u, const Anope::string &mode, bool full)
|
||||
|
||||
for (const auto &entry : this->GetModeList(mode))
|
||||
{
|
||||
Entry ban(mode, entry);
|
||||
Entry ban(entry, mode);
|
||||
if (ban.Matches(u, full))
|
||||
{
|
||||
this->RemoveMode(NULL, mode, ban.GetMask());
|
||||
|
||||
Reference in New Issue
Block a user