summaryrefslogtreecommitdiff
path: root/src/modules/m_auditorium.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_auditorium.cpp')
-rw-r--r--src/modules/m_auditorium.cpp19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/modules/m_auditorium.cpp b/src/modules/m_auditorium.cpp
index 7519b1189..4be1feb5c 100644
--- a/src/modules/m_auditorium.cpp
+++ b/src/modules/m_auditorium.cpp
@@ -50,8 +50,11 @@ class ModuleAuditorium : public Module
OnRehash(NULL);
- Implementation eventlist[] = { I_OnUserJoin, I_OnUserPart, I_OnUserKick, I_OnBuildNeighborList, I_OnNamesListItem, I_OnRehash };
- ServerInstance->Modules->Attach(eventlist, this, 6);
+ Implementation eventlist[] = {
+ I_OnUserJoin, I_OnUserPart, I_OnUserKick,
+ I_OnBuildNeighborList, I_OnNamesListItem, I_OnSendWhoLine,
+ I_OnRehash };
+ ServerInstance->Modules->Attach(eventlist, this, 7);
}
~ModuleAuditorium()
@@ -164,6 +167,18 @@ class ModuleAuditorium : public Module
}
}
}
+
+ void OnSendWhoLine(User* source, const std::vector<std::string>&, User* user, Channel* channel, std::string& line)
+ {
+ if (!channel)
+ return;
+ Membership* memb = channel->GetUser(user);
+ if (IsVisible(memb))
+ return;
+ if (CanSee(source, memb))
+ return;
+ line.clear();
+ }
};
MODULE_INIT(ModuleAuditorium)