- if (channel->IsModeSet('u'))
- {
- silent = true;
- /* Because we silenced the event, make sure it reaches the user whos joining (but only them of course) */
- user->WriteFrom(user, "JOIN %s", channel->name.c_str());
- if (ShowOps)
- channel->WriteAllExceptSender(user, false, channel->GetPrefixValue(user) >= OP_VALUE ? 0 : '@', "JOIN %s", channel->name.c_str());
- WriteOverride(user, channel, "JOIN "+channel->name);
- }
- }
-
- void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent)
- {
- if (channel->IsModeSet('u'))
- {
- silent = true;
- /* Because we silenced the event, make sure it reaches the user whos leaving (but only them of course) */
- user->WriteFrom(user, "PART %s%s%s", channel->name.c_str(),
- partmessage.empty() ? "" : " :",
- partmessage.empty() ? "" : partmessage.c_str());
- if (ShowOps)
- {
- channel->WriteAllExceptSender(user, false, channel->GetPrefixValue(user) >= OP_VALUE ? 0 : '@', "PART %s%s%s", channel->name.c_str(), partmessage.empty() ? "" : " :",
- partmessage.empty() ? "" : partmessage.c_str());
- }
- WriteOverride(user, channel, "PART " + channel->name + (partmessage.empty() ? "" : (" :" + partmessage)));
- }