* ---------------------------------------------------
*/
+using namespace std;
+
#include <stdio.h>
#include "users.h"
#include "channels.h"
std::string MySuffix;
public:
- ModuleHostChange()
+ ModuleHostChange(Server* Me)
+ : Module::Module(Me)
{
- // We must create an instance of the Server class to work with
- Srv = new Server;
+ Srv = Me;
Conf = new ConfigReader;
MySuffix = Conf->ReadValue("host","suffix",0);
}
virtual ~ModuleHostChange()
{
- // not really neccessary, but free it anyway
- delete Srv;
delete Conf;
}
- virtual void OnRehash()
+ virtual void OnRehash(std::string parameter)
{
delete Conf;
Conf = new ConfigReader;
{
// returns the version number of the module to be
// listed in /MODULES
- return Version(1,0,0,1,0);
+ return Version(1,0,0,1,VF_VENDOR);
}
virtual void OnUserConnect(userrec* user)
// first take their nick and strip out non-dns, leaving just [A-Z0-9\-]
std::string complete = "";
std::string old = user->nick;
- for (int j = 0; j < old.length(); j++)
+ for (unsigned int j = 0; j < old.length(); j++)
{
if (((old[j] >= 'A') && (old[j] <= 'Z')) ||
((old[j] >= 'a') && (old[j] <= 'z')) ||
{
}
- virtual Module * CreateModule()
+ virtual Module * CreateModule(Server* Me)
{
- return new ModuleHostChange;
+ return new ModuleHostChange(Me);
}
};