class Server;
ExtModeList EMode;
+featurelist Features;
// returns true if an extended mode character is in use
bool ModeDefined(char modechar, int type)
char* Request::GetData()
{
- return this->data;
+ return (char*)this->data;
}
Module* Request::GetSource()
char* Event::GetData()
{
- return this->data;
+ return (char*)this->data;
}
Module* Event::GetSource()
return PRIORITY_DONTCARE;
}
+bool Server::PublishFeature(const std::string &FeatureName, Module* Mod)
+{
+ if (Features.find(FeatureName) == Features.end())
+ {
+ Features[FeatureName] = Mod;
+ return true;
+ }
+ return false;
+}
+
+bool Server::UnpublishFeature(const std::string &FeatureName)
+{
+ featurelist::iterator iter = Features.find(FeatureName);
+
+ if (iter == Features.end())
+ return false;
+
+ Features.erase(iter);
+ return true;
+}
+
+Module* Server::FindFeature(const std::string &FeatureName)
+{
+ featurelist::iterator iter = Features.find(FeatureName);
+
+ if (iter == Features.end())
+ return NULL;
+
+ return iter->second;
+}
+
void Server::RehashServer()
{
WriteOpers("*** Rehashing config file");
void Server::SendMode(char **parameters, int pcnt, userrec *user)
{
- ServerInstance->ModeGrok->ServerMode(parameters,pcnt,user);
+ //ServerInstance->ModeGrok->ServerMode(parameters,pcnt,user);
}
void Server::Send(int Socket, const std::string &s)
//~ if (this->cache)
//~ delete this->cache;
if (this->errorlog)
- delete this->errorlog;
+ DELETE(this->errorlog);
if(this->privatehash)
- delete this->data;
+ DELETE(this->data);
}