diff options
| author | Adam <Adam@anope.org> | 2011-04-25 03:16:57 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2011-05-16 04:07:56 -0400 |
| commit | 076ebafa1b4cc935c466c615b94eaac415af9a67 (patch) | |
| tree | dbc8b0f9e7b6f954569c13ad35598f5ebe8a081d /modules/extra | |
| parent | 6922bd239c778e8f6f2081476ce20b9426c515ad (diff) | |
Moved some global functions to be member functions and misc cleanup
Diffstat (limited to 'modules/extra')
| -rw-r--r-- | modules/extra/os_defcon.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/extra/os_defcon.cpp b/modules/extra/os_defcon.cpp index a2a536adf..0de1f1d33 100644 --- a/modules/extra/os_defcon.cpp +++ b/modules/extra/os_defcon.cpp @@ -436,7 +436,7 @@ class OSDefcon : public Module } if (DConfig.Check(DEFCON_NO_NEW_CLIENTS) || DConfig.Check(DEFCON_AKILL_NEW_CLIENTS)) - kill_user(Config->s_OperServ, u, DConfig.akillreason); + u->Kill(Config->s_OperServ, DConfig.akillreason); return EVENT_STOP; } @@ -556,7 +556,7 @@ class OSDefcon : public Module if (DConfig.Check(DEFCON_NO_NEW_CLIENTS) || DConfig.Check(DEFCON_AKILL_NEW_CLIENTS)) { - kill_user(Config->s_OperServ, u, DConfig.akillreason); + u->Kill(Config->s_OperServ, DConfig.akillreason); return; } } @@ -574,7 +574,7 @@ class OSDefcon : public Module if (DConfig.Check(DEFCON_NO_NEW_CLIENTS) || DConfig.Check(DEFCON_AKILL_NEW_CLIENTS)) { - kill_user(Config->s_OperServ, u, DConfig.akillreason); + u->Kill(Config->s_OperServ, DConfig.akillreason); return; } @@ -590,7 +590,7 @@ class OSDefcon : public Module if (!Config->SessionLimitDetailsLoc.empty()) ircdproto->SendMessage(operserv->Bot(), u->nick, "%s", Config->SessionLimitDetailsLoc.c_str()); - kill_user(Config->s_OperServ, u, "Defcon session limit exceeded"); + u->Kill(Config->s_OperServ, "Defcon session limit exceeded"); ++session->hits; if (Config->MaxSessionKill && session->hits >= Config->MaxSessionKill) { @@ -651,7 +651,8 @@ void runDefCon() { Log(operserv->Bot(), "operserv/defcon") << "DEFCON: setting " << DConfig.chanmodes << " on all channels"; DefConModesSet = true; - MassChannelModes(operserv->Bot(), DConfig.chanmodes); + for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it) + it->second->SetModes(operserv->Bot(), false, "%s", DConfig.chanmodes.c_str()); } } } @@ -666,7 +667,8 @@ void runDefCon() if (!newmodes.empty()) { Log(operserv->Bot(), "operserv/defcon") << "DEFCON: setting " << newmodes << " on all channels"; - MassChannelModes(operserv->Bot(), newmodes); + for (channel_map::const_iterator it = ChannelList.begin(), it_end = ChannelList.end(); it != it_end; ++it) + it->second->SetModes(operserv->Bot(), false, "%s", newmodes.c_str()); } } } |
