X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_channames.cpp;h=0826fa56a91354e40e933241ff3ef43d346d3de5;hb=cb4c516ace8fef75b8a54a141c3644af9697ac0a;hp=008422c66e2a07535a03614c85d3aef3ad6e8df9;hpb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_channames.cpp b/src/modules/m_channames.cpp index 008422c66..0826fa56a 100644 --- a/src/modules/m_channames.cpp +++ b/src/modules/m_channames.cpp @@ -2,7 +2,7 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * InspIRCd: (C) 2002-2010 InspIRCd Development Team * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see @@ -76,13 +76,12 @@ class ModuleChannelNames : public Module modes.push_back(c->name); modes.push_back("-P"); - ServerInstance->SendMode(modes, ServerInstance->FakeClient); - ServerInstance->PI->SendMode(c->name, ServerInstance->Modes->GetLastParseParams(), ServerInstance->Modes->GetLastParseTranslate()); + ServerInstance->SendGlobalMode(modes, ServerInstance->FakeClient); } const UserMembList* users = c->GetUsers(); for(UserMembCIter j = users->begin(); j != users->end(); ++j) - if (IS_LOCAL(j->first) && !c->ServerKickUser(j->first, "Channel name no longer valid", NULL)) - delete c; + if (IS_LOCAL(j->first)) + c->KickUser(ServerInstance->FakeClient, j->first, "Channel name no longer valid"); } badchan = false; } @@ -104,9 +103,9 @@ class ModuleChannelNames : public Module while (0 != (allowno = allowrange.GetToken())) allowedmap[(unsigned char)(allowno)] = true; - allowedmap[7] = false; - allowedmap[' '] = false; - allowedmap[','] = false; + allowedmap[0x07] = false; // BEL + allowedmap[0x20] = false; // ' ' + allowedmap[0x2C] = false; // ',' ValidateChans(); } @@ -130,7 +129,7 @@ class ModuleChannelNames : public Module virtual Version GetVersion() { - return Version("Implements config tags which allow changing characters allowed in channel names", VF_VENDOR,API_VERSION); + return Version("Implements config tags which allow changing characters allowed in channel names", VF_VENDOR); } };