X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_showfile.cpp;h=cb51c4387cbf5e2a264d4120a015aaa63b01bc9f;hb=3ccf0065d43db80f31c6404aeac4d65551481508;hp=c42877eef2fab9943a14d30d0b9dd1312fc1f9cd;hpb=ef0fecc856d435ff140ce87ca38618d6edceafcc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_showfile.cpp b/src/modules/m_showfile.cpp index c42877eef..cb51c4387 100644 --- a/src/modules/m_showfile.cpp +++ b/src/modules/m_showfile.cpp @@ -104,7 +104,7 @@ class ModuleShowFile : public Module FileReader reader(file); CommandShowFile* sfcmd; - Command* handler = ServerInstance->Parser->GetHandler(cmdname); + Command* handler = ServerInstance->Parser.GetHandler(cmdname); if (handler) { // Command exists, check if it is ours @@ -113,7 +113,7 @@ class ModuleShowFile : public Module // This is our command, make sure we don't have the same entry twice sfcmd = static_cast(handler); - if (std::find(newcmds.begin(), newcmds.end(), sfcmd) != newcmds.end()) + if (stdalgo::isin(newcmds, sfcmd)) throw ModuleException("Command " + cmdname + " is already used in a tag"); } else