1
0
mirror of https://github.com/anope/anope.git synced 2026-06-27 00:56:38 +02:00

Get rid of the remaining references in the core to specific services. Move more stuff out of the core to the proper modules.

This commit is contained in:
Adam
2013-05-26 17:13:11 -04:00
parent f2dee1e1d6
commit 22658d63bd
164 changed files with 835 additions and 2137 deletions
+28 -5
View File
@@ -14,9 +14,11 @@
#include "protocol.h"
#include "channels.h"
struct StackerInfo;
/* List of pairs of user/channels and their stacker info */
std::map<User *, StackerInfo *> ModeManager::UserStackerObjects;
std::map<Channel *, StackerInfo *> ModeManager::ChannelStackerObjects;
static std::map<User *, StackerInfo *> UserStackerObjects;
static std::map<Channel *, StackerInfo *> ChannelStackerObjects;
/* List of all modes Anope knows about */
std::vector<ChannelMode *> ModeManager::ChannelModes;
@@ -31,6 +33,25 @@ static std::vector<ChannelModeStatus *> ChannelModesByStatus;
/* Number of generic modes we support */
unsigned ModeManager::GenericChannelModes = 0, ModeManager::GenericUserModes = 0;
struct StackerInfo
{
/* Modes to be added */
std::list<std::pair<Mode *, Anope::string> > AddModes;
/* Modes to be deleted */
std::list<std::pair<Mode *, Anope::string> > DelModes;
/* Bot this is sent from */
const BotInfo *bi;
StackerInfo() : bi(NULL) { }
/** Add a mode to this object
* @param mode The mode
* @param set true if setting, false if unsetting
* @param param The param for the mode
*/
void AddMode(Mode *mode, bool set, const Anope::string &param);
};
ChannelStatus::ChannelStatus()
{
}
@@ -255,7 +276,11 @@ static StackerInfo *GetInfo(List &l, Object *o)
return s;
}
std::list<Anope::string> ModeManager::BuildModeStrings(StackerInfo *info)
/** Build a list of mode strings to send to the IRCd from the mode stacker
* @param info The stacker info for a channel or user
* @return a list of strings
*/
static std::list<Anope::string> BuildModeStrings(StackerInfo *info)
{
std::list<Anope::string> ret;
std::list<std::pair<Mode *, Anope::string> >::iterator it, it_end;
@@ -521,8 +546,6 @@ void ModeManager::StackerAdd(const BotInfo *bi, User *u, UserMode *um, bool Set,
s->AddMode(um, Set, Param);
if (bi)
s->bi = bi;
else
s->bi = NULL;
if (!modePipe)
modePipe = new ModePipe();