X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_exemptchanops.cpp;h=076445644ba2bfa84644d94eadff7b170a3ea5ed;hb=bd1471bc08be28bc2554d35fdaeb078338b14266;hp=2d06b73a0b64169c6ab707e51351e6ccd8ee4176;hpb=0b1c84c54185545b62673ad098fe0d3d19c22570;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); } }