// version is a simple class for holding a modules version number
Version::Version(const std::string &modv, int flags, int api_ver, const std::string& rev)
-: version(modv + " - " + rev), Flags(flags), API(api_ver)
+: description(modv), version(rev), Flags(flags), API(api_ver)
{
}
return this->source;
}
-char* Event::Send(InspIRCd* SI)
+char* Event::Send()
{
FOREACH_MOD(I_OnEvent,OnEvent(this));
return NULL;
// These declarations define the behavours of the base class Module (which does nothing at all)
-Module::Module(InspIRCd*) { }
+Module::Module() { }
Module::~Module() { }
ModResult Module::OnSendSnotice(char &snomask, std::string &type, const std::string &message) { return MOD_RES_PASSTHRU; }
void Module::OnRehash(User*) { }
ModResult Module::OnUserPreJoin(User*, Channel*, const char*, std::string&, const std::string&) { return MOD_RES_PASSTHRU; }
void Module::OnMode(User*, void*, int, const std::vector<std::string>&, const std::vector<TranslateType>&) { }
-Version Module::GetVersion() { return Version("Misconfigured", VF_VENDOR, -1); }
void Module::OnOper(User*, const std::string&) { }
void Module::OnPostOper(User*, const std::string&, const std::string &) { }
void Module::OnInfo(User*) { }
void Module::OnPostConnect(User*) { }
ModResult Module::OnAddBan(User*, Channel*, const std::string &) { return MOD_RES_PASSTHRU; }
ModResult Module::OnDelBan(User*, Channel*, const std::string &) { return MOD_RES_PASSTHRU; }
-void Module::OnRawSocketAccept(int, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { }
-int Module::OnRawSocketWrite(int, const char*, int) { return 0; }
-void Module::OnRawSocketClose(int) { }
-void Module::OnRawSocketConnect(int) { }
-int Module::OnRawSocketRead(int, char*, unsigned int, int&) { return 0; }
+void Module::OnStreamSocketAccept(StreamSocket*, irc::sockets::sockaddrs*, irc::sockets::sockaddrs*) { }
+int Module::OnStreamSocketWrite(StreamSocket*, std::string&) { return -1; }
+void Module::OnStreamSocketClose(StreamSocket*) { }
+void Module::OnStreamSocketConnect(StreamSocket*) { }
+int Module::OnStreamSocketRead(StreamSocket*, std::string&) { return -1; }
void Module::OnUserMessage(User*, void*, int, const std::string&, char, const CUList&) { }
void Module::OnUserNotice(User*, void*, int, const std::string&, char, const CUList&) { }
void Module::OnRemoteKill(User*, User*, const std::string&, const std::string&) { }
ModResult Module::OnWhoisLine(User*, User*, int&, std::string&) { return MOD_RES_PASSTHRU; }
void Module::OnBuildExemptList(MessageType, Channel*, User*, char, CUList&, const std::string&) { }
void Module::OnGarbageCollect() { }
-void Module::OnBufferFlushed(User*) { }
void Module::OnText(User*, void*, int, const std::string&, char, CUList&) { }
void Module::OnRunTestSuite() { }
void Module::OnNamesListItem(User*, Membership*, std::string&, std::string&) { }
ModResult Module::OnNumeric(User*, unsigned int, const std::string&) { return MOD_RES_PASSTHRU; }
-void Module::OnHookIO(EventHandler*, ListenSocketBase*) { }
+void Module::OnHookIO(StreamSocket*, ListenSocketBase*) { }
ModResult Module::OnHostCycle(User*) { return MOD_RES_PASSTHRU; }
void Module::OnSendWhoLine(User*, User*, Channel*, std::string&) { }
/* This will throw a CoreException if there's a problem loading
* the module file or getting a pointer to the init_module symbol.
*/
- newhandle = new ircd_module(ServerInstance, modfile, "init_module");
+ newhandle = new ircd_module(modfile, "init_module");
newmod = newhandle->CallInit();
if (newmod)
}
this->ModCount++;
- FOREACH_MOD_I(ServerInstance,I_OnLoadModule,OnLoadModule(newmod, filename_str));
+ FOREACH_MOD(I_OnLoadModule,OnLoadModule(newmod, filename_str));
/* We give every module a chance to re-prioritize when we introduce a new one,
* not just the one thats loading, as the new module could affect the preference
/* Tidy up any dangling resolvers */
ServerInstance->Res->CleanResolvers(modfind->second.second);
- FOREACH_MOD_I(ServerInstance,I_OnUnloadModule,OnUnloadModule(modfind->second.second, modfind->first));
+ FOREACH_MOD(I_OnUnloadModule,OnUnloadModule(modfind->second.second, modfind->first));
this->DetachAll(modfind->second.second);
return retval;
}
-ConfigReader::ConfigReader(InspIRCd* Instance)
+ConfigReader::ConfigReader()
{
this->error = 0;
}
return ServerInstance->Config->ConfVarEnum(tag, index);
}
-FileReader::FileReader(InspIRCd* Instance, const std::string &filename)
+FileReader::FileReader(const std::string &filename)
{
LoadFile(filename);
}
-FileReader::FileReader(InspIRCd* Instance)
+FileReader::FileReader()
{
}