mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-10 02:59:01 -04:00
More stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8574 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
parent
81951dafc1
commit
621f93b72f
@ -438,7 +438,7 @@ class CoreExport Module : public Extensible
|
||||
|
||||
virtual void OnReadConfig(ServerConfig* config, ConfigReader* coreconf);
|
||||
|
||||
virtual int OnDownloadFile(const std::string &filename, std::stringstream &filedata);
|
||||
virtual int OnDownloadFile(const std::string &filename, std::istringstream* &filedata);
|
||||
|
||||
/** Returns the version number of a Module.
|
||||
* The method should return a Version object with its version information assigned via
|
||||
|
@ -1296,10 +1296,16 @@ void ServerConfig::StartDownloads()
|
||||
ServerInstance->Log(DEBUG,"Module-handled schema for %s", x->first.c_str());
|
||||
|
||||
/* For now, error it */
|
||||
FileErrors++;
|
||||
TotalDownloaded++;
|
||||
delete x->second;
|
||||
x->second = NULL;
|
||||
int MOD_RESULT = 0;
|
||||
FOREACH_RESULT(I_OnDownloadFile, OnDownloadFile(file, reinterpret_cast<std::istringstream*>(x->second)));
|
||||
if (MOD_RESULT == 0)
|
||||
{
|
||||
/* No module claimed this file */
|
||||
TotalDownloaded++;
|
||||
FileErrors++;
|
||||
delete x->second;
|
||||
x->second = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ std::string Event::GetEventID()
|
||||
Module::Module(InspIRCd* Me) : ServerInstance(Me) { }
|
||||
Module::~Module() { }
|
||||
void Module::OnReadConfig(ServerConfig*, ConfigReader*) { }
|
||||
int Module::OnDownloadFile(const std::string&, std::stringstream&) { return 0; }
|
||||
int Module::OnDownloadFile(const std::string&, std::istringstream*&) { return 0; }
|
||||
void Module::OnUserConnect(User*) { }
|
||||
void Module::OnUserQuit(User*, const std::string&, const std::string&) { }
|
||||
void Module::OnUserDisconnect(User*) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user