summaryrefslogtreecommitdiff
path: root/modules/chanserv/cs_entrymsg.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/chanserv/cs_entrymsg.cpp')
-rw-r--r--modules/chanserv/cs_entrymsg.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/chanserv/cs_entrymsg.cpp b/modules/chanserv/cs_entrymsg.cpp
index 0b5469661..c28c58bc9 100644
--- a/modules/chanserv/cs_entrymsg.cpp
+++ b/modules/chanserv/cs_entrymsg.cpp
@@ -283,10 +283,16 @@ public:
if (u && c && c->ci && u->server->IsSynced())
{
EntryMessageList *messages = c->ci->GetExt<EntryMessageList>("entrymsg");
+ if (!messages)
+ return;
- if (messages != NULL)
- for (const auto &message : *(*messages))
- u->SendMessage(c->ci->WhoSends(), "[%s] %s", c->ci->name.c_str(), message->message.c_str());
+ for (const auto &message : *(*messages))
+ {
+ if (u->ShouldPrivmsg())
+ IRCD->SendContextPrivmsg(c->ci->WhoSends(), u, c, message->message);
+ else
+ IRCD->SendContextNotice(c->ci->WhoSends(), u, c, message->message);
+ }
}
}
};