diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-21 16:17:03 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-03-21 16:17:03 +0000 |
commit | f6b8a12a8066b60446570729f77084116853fe2e (patch) | |
tree | 982ff1e2795b3378cc8c7874202ed09a75ed97e1 /src/channels.cpp | |
parent | b4d1587b44ca01ef90c64cb21e5ddc0783564491 (diff) |
Convert to new api
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9144 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/channels.cpp')
-rw-r--r-- | src/channels.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/channels.cpp b/src/channels.cpp index a0c9a0304..8211b3564 100644 --- a/src/channels.cpp +++ b/src/channels.cpp @@ -838,13 +838,15 @@ void Channel::UserList(User *user, CUList *ulist) char list[MAXBUF]; size_t dlen, curlen; int MOD_RESULT = 0; + bool call_modules = true; if (!IS_LOCAL(user)) return; FOREACH_RESULT(I_OnUserList,OnUserList(user, this, ulist)); if (MOD_RESULT == 1) - return; + call_modules = false; + if (MOD_RESULT != -1) { if ((this->IsModeSet('s')) && (!this->HasUser(user))) @@ -883,11 +885,15 @@ void Channel::UserList(User *user, CUList *ulist) std::string prefixlist = this->GetPrefixChar(i->first); std::string nick = i->first->nick; - FOREACH_MOD(I_OnNamesListItem, OnNamesListItem(user, i->first, this, prefixlist, nick)); - /* Nick was nuked, a module wants us to skip it */ - if (nick.empty()) - continue; + if (call_modules) + { + FOREACH_MOD(I_OnNamesListItem, OnNamesListItem(user, i->first, this, prefixlist, nick)); + + /* Nick was nuked, a module wants us to skip it */ + if (nick.empty()) + continue; + } size_t ptrlen = snprintf(ptr, MAXBUF, "%s%s ", prefixlist.c_str(), nick.c_str()); |