* | 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.
/* $ModDesc: Allows an extended ban (+b) syntax redirecting banned users to another channel */
/* $ModDep: ../../include/u_listmode.h */
-/* Originally written by Om, January 2008
+/* Originally written by Om, January 2009
*/
class BanRedirectEntry : public classbase
class BanRedirect : public ModeWatcher
{
- private:
- InspIRCd* Srv;
public:
BanRedirect(InspIRCd* Instance)
- : ModeWatcher(Instance, 'b', MODETYPE_CHANNEL), Srv(Instance)
+ : ModeWatcher(Instance, 'b', MODETYPE_CHANNEL)
{
}
if(mask[CHAN].length())
{
- if(!IS_LOCAL(source) || Srv->IsChannel(mask[CHAN].c_str(), ServerInstance->Config->Limits.ChanMax))
+ if(!IS_LOCAL(source) || ServerInstance->IsChannel(mask[CHAN].c_str(), ServerInstance->Config->Limits.ChanMax))
{
if (assign(channel->name) == mask[CHAN])
{
while(modestack.GetStackedLine(stackresult))
{
- for(StringDeque::size_type i = 0; i < stackresult.size(); i++)
- {
- mode_junk.push_back(stackresult[i]);
- }
-
+ mode_junk.insert(mode_junk.end(), stackresult.begin(), stackresult.end());
ServerInstance->SendMode(mode_junk, ServerInstance->FakeClient);
+ mode_junk.erase(mode_junk.begin() + 1, mode_junk.end());
}
delete redirects;
virtual Version GetVersion()
{
- return Version("$Id$", VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version("$Id$", VF_COMMON|VF_VENDOR, API_VERSION);
}
void Prioritize()
{
Module* banex = ServerInstance->Modules->Find("m_banexception.so");
- ServerInstance->Modules->SetPriority(this, I_OnUserPreJoin, PRIO_BEFORE, &banex);
+ ServerInstance->Modules->SetPriority(this, I_OnUserPreJoin, PRIORITY_BEFORE, &banex);
}
};