X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmodules%2Fm_nopartmsg.cpp;h=50a6e14b9bc68097dabdf6caa62775bc12c92148;hb=97c0e6b4c4e304a1c4e764fc06a7e2663a41743d;hp=648626a2392929ca808814df0305e834e90f71a2;hpb=fe1b94c4009fb1a4edb59fbf80dc98de65563224;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_nopartmsg.cpp b/src/modules/m_nopartmsg.cpp index 648626a23..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,29 +31,24 @@ 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, const std::string &partmessage, bool &silent) + virtual void OnUserPart(User* user, Channel* channel, std::string &partmessage, bool &silent) { if (!IS_LOCAL(user)) return; -#if 0 - if (channel->IsExtBanned(user, 'p')) + if (channel->GetExtBanStatus(user, 'p') < 0) partmessage = ""; -#endif return; } 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'); } };