X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_noinvite.cpp;h=a0caade2a23e3df719f4ceb649edfbc555c21077;hb=9dd72b7003963d868a23da930a91300b49ab4959;hp=a72a95db82b6af7927ca2e1756b051f4014a0239;hpb=1383dba43e463f292aea094d01f62f355946049d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_noinvite.cpp b/src/modules/m_noinvite.cpp index a72a95db8..a0caade2a 100644 --- a/src/modules/m_noinvite.cpp +++ b/src/modules/m_noinvite.cpp @@ -44,28 +44,13 @@ class ModuleNoInvite : public Module virtual void On005Numeric(std::string &output) { - std::stringstream line(output); - std::string temp1, temp2; - - while (!line.eof()) - { - line >> temp1; - if (temp1.substr(0,10) == "CHANMODES=") - { - // append the chanmode to the end - temp1 = temp1.substr(10,temp1.length()); - temp1 = "CHANMODES=" + temp1 + "V"; - } - temp2 = temp2 + temp1 + " "; - } - if (temp2.length()) - output = temp2.substr(0,temp2.length()-1); + InsertMode(output,"V",4); } virtual int OnUserPreInvite(userrec* user,userrec* dest,chanrec* channel) { - if (channel->IsCustomModeSet('V')) + if (channel->IsModeSet('V')) { WriteServ(user->fd,"492 %s %s :Can't invite %s to channel (+V set)",user->nick, channel->name, dest->nick); return 1;