]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_safelist.cpp
Mention ulines too
[user/henk/code/inspircd.git] / src / modules / m_safelist.cpp
index 9638a7a5e9f37431a7369e68538d9a1cf2ac9073..1f73a7bf28ec11ee2ded3479179f9ba37dde3dfa 100644 (file)
@@ -60,7 +60,7 @@ class ModuleSafeList : public Module
 
        virtual Version GetVersion()
        {
-               return Version(1,2,0,0,VF_VENDOR,API_VERSION);
+               return Version("$Id$",VF_VENDOR,API_VERSION);
        }
 
 
@@ -145,7 +145,7 @@ class ModuleSafeList : public Module
                /*
                 * start at channel 0! ;)
                 */
-               ld = new ListData(0,ServerInstance->Time(), pcnt ? parameters[0] : "*", minusers, maxusers);
+               ld = new ListData(0,ServerInstance->Time(), (pcnt && (parameters[0][0] != '<' && parameters[0][0] != '>')) ? parameters[0] : "*", minusers, maxusers);
                user->Extend("safelist_cache", ld);
 
                time_t* llt = new time_t;
@@ -184,7 +184,7 @@ class ModuleSafeList : public Module
 
                                if ((chan) && (chan->modes[CM_PRIVATE]) && (!IS_OPER(user)))
                                {
-                                       bool display = (InspIRCd::Match(chan->name, ld->glob) || (!chan->topic.empty() && match(chan->topic, ld->glob)));
+                                       bool display = (InspIRCd::Match(chan->name, ld->glob) || (!chan->topic.empty() && InspIRCd::Match(chan->topic, ld->glob)));
                                        if ((users) && (display))
                                        {
                                                int counter = snprintf(buffer, MAXBUF, "322 %s * %ld :", user->nick.c_str(), users);
@@ -194,7 +194,7 @@ class ModuleSafeList : public Module
                                }
                                else if ((chan) && ((((!(chan->IsModeSet('p'))) && (!(chan->IsModeSet('s'))))) || (has_user) || IS_OPER(user)))
                                {
-                                       bool display = (InspIRCd::Match(chan->name, ld->glob) || (!chan->topic.empty() && match(chan->topic, ld->glob)));
+                                       bool display = (InspIRCd::Match(chan->name, ld->glob) || (!chan->topic.empty() && InspIRCd::Match(chan->topic, ld->glob)));
                                        if ((users) && (display))
                                        {
                                                int counter = snprintf(buffer, MAXBUF, "322 %s %s %ld :[+%s] %s", user->nick.c_str(), chan->name.c_str(), users, chan->ChanModes(has_user || IS_OPER(user)), chan->topic.c_str());