]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_exemptchanops.cpp
Merge branch 'master+gnutlsprio'
[user/henk/code/inspircd.git] / src / modules / m_exemptchanops.cpp
index 2d06b73a0b64169c6ab707e51351e6ccd8ee4176..076445644ba2bfa84644d94eadff7b170a3ea5ed 100644 (file)
@@ -36,7 +36,7 @@ class ExemptChanOps : public ListModeBase
                        return false;
                }
 
-               std::string restriction = word.substr(0, p);
+               std::string restriction(word, 0, p);
                // If there is a '-' in the restriction string ignore it and everything after it
                // to support "auditorium-vis" and "auditorium-see" in m_auditorium
                p = restriction.find('-');
@@ -98,7 +98,7 @@ class ExemptHandler : public HandlerBase3<ModResult, User*, Channel*, const std:
                                if (pos == std::string::npos)
                                        continue;
                                if (!i->mask.compare(0, pos, restriction))
-                                       minmode = (*i).mask.substr(pos + 1);
+                                       minmode.assign(i->mask, pos + 1, std::string::npos);
                        }
                }