]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/users.cpp
auto-set +s when +n is set (as +n requires +s) - allow +n to be 'set twice' allowing...
[user/henk/code/inspircd.git] / src / users.cpp
index 27eb0a1f696dead2f14733927e4e23d761eca836..7be073bd69a9b169ec1c20b8bb84b3e95bd0ac32 100644 (file)
@@ -98,8 +98,12 @@ std::string userrec::ProcessNoticeMasks(const char *sm)
        const char *c = sm;
        std::string output = "";
 
+       ServerInstance->Log(DEBUG,"Process notice masks");
+
        while (c && *c)
        {
+               ServerInstance->Log(DEBUG,"Process notice mask %c",*c);
+               
                switch (*c)
                {
                        case '+':
@@ -111,7 +115,7 @@ std::string userrec::ProcessNoticeMasks(const char *sm)
                        default:
                                if ((*c >= 'A') && (*c <= 'z') && (ServerInstance->SNO->IsEnabled(*c)))
                                {
-                                       if ((IsNoticeMaskSet(*c) && adding) || (!IsNoticeMaskSet(*c) && !adding))
+                                       if ((!IsNoticeMaskSet(*c) && adding) || (IsNoticeMaskSet(*c) && !adding))
                                        {
                                                if ((oldadding != adding) || (sm == c))
                                                        output += (adding ? '+' : '-');
@@ -287,6 +291,7 @@ userrec::userrec(InspIRCd* Instance) : ServerInstance(Instance)
        invites.clear();
        chans.resize(MAXCHANS);
        memset(modes,0,sizeof(modes));
+       memset(snomasks,0,sizeof(snomasks));
        
        for (unsigned int n = 0; n < MAXCHANS; n++)
        {