summaryrefslogtreecommitdiff
path: root/src/modules/m_namesx.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 16:23:40 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-05-04 16:23:40 +0000
commit6dadb437999760fc10757cf4b9faba4702b1c011 (patch)
treeee778b2e052c21193cab19dfa7687561675f818a /src/modules/m_namesx.cpp
parent5714b1868e06417990fad07ce669b12703324c46 (diff)
Add <auditorium showops> which determines if auditorium works like ircnet +a (anonymous channels) or like unrealircd +u.
The old behaviour is similar to anonymous channels, only showing the current user. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@6875 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_namesx.cpp')
-rw-r--r--src/modules/m_namesx.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_namesx.cpp b/src/modules/m_namesx.cpp
index badbae074..5194224b7 100644
--- a/src/modules/m_namesx.cpp
+++ b/src/modules/m_namesx.cpp
@@ -67,7 +67,7 @@ class ModuleNamesX : public Module
return 0;
}
- virtual int OnUserList(userrec* user, chanrec* Ptr)
+ virtual int OnUserList(userrec* user, chanrec* Ptr, CUList* &ulist)
{
if (user->GetExt("NAMESX"))
{
@@ -76,7 +76,10 @@ class ModuleNamesX : public Module
dlen = curlen = snprintf(list,MAXBUF,"353 %s = %s :", user->nick, Ptr->name);
int numusers = 0;
char* ptr = list + dlen;
- CUList *ulist= Ptr->GetUsers();
+
+ if (!ulist)
+ ulist = Ptr->GetUsers();
+
bool has_user = Ptr->HasUser(user);
for (CUList::iterator i = ulist->begin(); i != ulist->end(); i++)
{