summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-10 04:01:38 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-03-10 04:01:38 +0000
commit07a31be32927bf8ab7a9c1084b47ccc28d7f181b (patch)
tree96265724fc25a9a079bb58ca92d5949d7755c138 /src
parent8bc87bd2447a6ffaccefe259aeb10e3ef109b112 (diff)
Clean up /WHO output for auditorium channels
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12617 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-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)