if (!override)
{
unsigned int maxchans = user->GetClass()->maxchans;
+ if (!maxchans)
+ maxchans = ServerInstance->Config->MaxChans;
if (user->IsOper())
{
unsigned int opermaxchans = ConvToNum<unsigned int>(user->oper->getConfig("maxchans"));
if (privs)
{
- // If the user was granted prefix modes (in the OnUserPreJoin hook, or he's a
- // remote user and his own server set the modes), then set them internally now
+ // If the user was granted prefix modes (in the OnUserPreJoin hook, or they're a
+ // remote user and their own server set the modes), then set them internally now
for (std::string::const_iterator i = privs->begin(); i != privs->end(); ++i)
{
PrefixMode* mh = ServerInstance->Modes->FindPrefixMode(*i);
return scratch.c_str();
}
-void Channel::WriteNotice(const std::string& text)
+void Channel::WriteNotice(const std::string& text, char status)
{
- ClientProtocol::Messages::Privmsg privmsg(ClientProtocol::Messages::Privmsg::nocopy, ServerInstance->FakeClient, this, text, MSG_NOTICE);
+ ClientProtocol::Messages::Privmsg privmsg(ClientProtocol::Messages::Privmsg::nocopy, ServerInstance->FakeClient, this, text, MSG_NOTICE, status);
Write(ServerInstance->GetRFCEvents().privmsg, privmsg);
+ ServerInstance->PI->SendMessage(this, status, text, MSG_NOTICE);
}
/* returns the status character for a given user on a channel, e.g. @ for op,