]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_safelist.cpp
Annotations
[user/henk/code/inspircd.git] / src / modules / m_safelist.cpp
index 831ddcac59f68f1488bee0dfbb8426eac51aee55..ac7225b5eba3f9fdea68cbc3ce26d6303eeaff51 100644 (file)
@@ -23,6 +23,8 @@ using namespace std;
 #include "inspircd.h"
 #include "wildcard.h"
 
+/** Holds a users m_safelist state
+ */
 class ListData : public classbase
 {
  public:
@@ -100,12 +102,12 @@ class ListTimer : public InspTimer
                                        chan = ServerInstance->GetChannelIndex(ld->list_position);
                                        /* spool details */
                                        bool has_user = (chan && chan->HasUser(u));
-                                       if (!match(chan->name, ld->glob.c_str()))
-                                               continue;
                                        if ((chan) && (((!(chan->modes[CM_PRIVATE])) && (!(chan->modes[CM_SECRET]))) || (has_user)))
                                        {
+                                               bool display = match(chan->name, ld->glob.c_str());
+
                                                long users = chan->GetUserCounter();
-                                               if (users)
+                                               if ((users) && (display))
                                                {
                                                        int counter = snprintf(buffer,MAXBUF,"322 %s %s %ld :[+%s] %s",u->nick,chan->name,users,chan->ChanModes(has_user),chan->topic);
                                                        /* Increment total plus linefeed */