X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_exemptchanops.cpp;h=076445644ba2bfa84644d94eadff7b170a3ea5ed;hb=63aa8d0d42f619c52d382bde3e6ba2e5e23b12ac;hp=2d06b73a0b64169c6ab707e51351e6ccd8ee4176;hpb=3a3ff949670c61a4a8856e1391222e156eb1cd17;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_exemptchanops.cpp b/src/modules/m_exemptchanops.cpp index 2d06b73a0..076445644 100644 --- a/src/modules/m_exemptchanops.cpp +++ b/src/modules/m_exemptchanops.cpp @@ -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 HandlerBase3mask.compare(0, pos, restriction)) - minmode = (*i).mask.substr(pos + 1); + minmode.assign(i->mask, pos + 1, std::string::npos); } }