X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_nopartmsg.cpp;h=50a6e14b9bc68097dabdf6caa62775bc12c92148;hb=fcafba14c5408360ec725ed1649ede75b7ae52c1;hp=46b79b51f09523ce741877d6fcf6a004507bd5ca;hpb=4e599dd4fbfe5abc0d60a05008344e35e6bc870d;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp index 46b79b51f..50a6e14b9 100644 --- a/src/modules/m_nopartmsg.cpp +++ b/src/modules/m_nopartmsg.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -31,16 +31,16 @@ class ModulePartMsgBan : public Module virtual Version GetVersion() { - return Version(1,2,0,0,VF_VENDOR,API_VERSION); + return Version("$Id$", VF_COMMON|VF_VENDOR, API_VERSION); } - virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent) + virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent) { if (!IS_LOCAL(user)) return; - if (channel->IsExtBanned(user, 'p')) + if (channel->GetExtBanStatus(user, 'p') < 0) partmessage = ""; return; @@ -48,10 +48,7 @@ class ModulePartMsgBan : public Module virtual void On005Numeric(std::string &output) { - if (output.find(" EXTBAN=:") == std::string::npos) - output.append(" EXTBAN=:p"); - else - output.insert(output.find(" EXTBAN=:") + 9, "p"); + ServerInstance->AddExtBanChar('p'); } };