summaryrefslogtreecommitdiff
path: root/src/coremods/core_channel/cmd_invite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/coremods/core_channel/cmd_invite.cpp')
-rw-r--r--src/coremods/core_channel/cmd_invite.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/coremods/core_channel/cmd_invite.cpp b/src/coremods/core_channel/cmd_invite.cpp
index 55ed33f7f..c1f1b00c7 100644
--- a/src/coremods/core_channel/cmd_invite.cpp
+++ b/src/coremods/core_channel/cmd_invite.cpp
@@ -123,17 +123,23 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use
}
char prefix = 0;
+ unsigned int minrank = 0;
switch (ServerInstance->Config->AnnounceInvites)
{
case ServerConfig::INVITE_ANNOUNCE_OPS:
{
prefix = '@';
+ minrank = OP_VALUE;
break;
}
case ServerConfig::INVITE_ANNOUNCE_DYNAMIC:
{
PrefixMode* mh = ServerInstance->Modes->FindPrefixMode('h');
- prefix = (mh && mh->name == "halfop" ? mh->GetPrefix() : '@');
+ if ((mh) && (mh->name == "halfop"))
+ {
+ prefix = mh->GetPrefix();
+ minrank = mh->GetPrefixRank();
+ }
break;
}
default:
@@ -141,10 +147,11 @@ CmdResult CommandInvite::Handle (const std::vector<std::string>& parameters, Use
}
}
- FOREACH_MOD(OnUserInvite, (user, u, c, timeout));
+ CUList excepts;
+ FOREACH_MOD(OnUserInvite, (user, u, c, timeout, minrank, excepts));
if (ServerInstance->Config->AnnounceInvites != ServerConfig::INVITE_ANNOUNCE_NONE)
- c->WriteAllExceptSender(user, true, prefix, "NOTICE %s :*** %s invited %s into the channel", c->name.c_str(), user->nick.c_str(), u->nick.c_str());
+ c->WriteAllExcept(user, true, prefix, excepts, "NOTICE %s :*** %s invited %s into the channel", c->name.c_str(), user->nick.c_str(), u->nick.c_str());
}
else if (IS_LOCAL(user))
{