]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_safelist.cpp
Fix these too
[user/henk/code/inspircd.git] / src / modules / m_safelist.cpp
index 0c6f7df81b18747efa25a90bb3a93cd25d4656e3..e42d085cb6f3754a91d4134fc280b30d95001b85 100644 (file)
@@ -185,20 +185,20 @@ class ModuleSafeList : public Module
 
                                if ((chan) && (chan->modes[CM_PRIVATE]) && (!IS_OPER(user)))
                                {
-                                       bool display = (match(chan->name, ld->glob.c_str()) || (*chan->topic && match(chan->topic, ld->glob.c_str())));
+                                       bool display = (match(chan->name, ld->glob) || (*chan->topic && match(chan->topic, ld->glob)));
                                        if ((users) && (display))
                                        {
-                                               int counter = snprintf(buffer, MAXBUF, "322 %s *", user->nick);
+                                               int counter = snprintf(buffer, MAXBUF, "322 %s * %ld :", user->nick, users);
                                                amount_sent += counter + ServerNameSize;
                                                user->WriteServ(std::string(buffer));
                                        }
                                }
                                else if ((chan) && ((((!(chan->modes[CM_PRIVATE])) && (!(chan->modes[CM_SECRET])))) || (has_user) || IS_OPER(user)))
                                {
-                                       bool display = (match(chan->name, ld->glob.c_str()) || (*chan->topic && match(chan->topic, ld->glob.c_str())));
+                                       bool display = (match(chan->name, ld->glob) || (*chan->topic && match(chan->topic, ld->glob)));
                                        if ((users) && (display))
                                        {
-                                               int counter = snprintf(buffer, MAXBUF, "322 %s %s %ld :[+%s] %s",user->nick, chan->name, users, chan->ChanModes(has_user), chan->topic);
+                                               int counter = snprintf(buffer, MAXBUF, "322 %s %s %ld :[+%s] %s",user->nick, chan->name, users, chan->ChanModes(has_user || IS_OPER(user)), chan->topic);
                                                amount_sent += counter + ServerNameSize;
                                                user->WriteServ(std::string(buffer));
                                        }