Exemplo n.º 1
0
	ModuleRegexPOSIX() : ref(this)
	{
		ServerInstance->Modules->AddService(ref);
		Implementation eventlist[] = { I_OnRehash };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
		OnRehash(NULL);
	}
Exemplo n.º 2
0
	ModuleCgiIRC(InspIRCd* Me) : Module(Me)
	{
		
		OnRehash(NULL,"");
		mycommand=new cmd_webirc(Me, Hosts, NotifyOpers);
		ServerInstance->AddCommand(mycommand);
	}
Exemplo n.º 3
0
	ModuleChanLog(InspIRCd* Me) : Module(Me)
	{
		Implementation eventlist[] = { I_OnRehash, I_OnSendSnotice };
		ServerInstance->Modules->Attach(eventlist, this, 2);

		OnRehash(NULL);
	}
Exemplo n.º 4
0
	void init()
	{
		expected_request = std::string("<policy-file-request/>\0", 23);
		OnRehash(NULL);
		Implementation eventlist[] = { I_OnRehash, I_OnAcceptConnection, I_OnBackgroundTimer };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 5
0
	ModuleWaitPong(InspIRCd* Me)
	 : Module(Me), extenstr("waitpong_pingstr")
	{
		OnRehash(NULL);
		Implementation eventlist[] = { I_OnUserRegister, I_OnCheckReady, I_OnPreCommand, I_OnRehash, I_OnUserDisconnect, I_OnCleanup };
		ServerInstance->Modules->Attach(eventlist, this, 6);
	}
Exemplo n.º 6
0
	void init()
	{
		OnRehash(NULL);
		ServerInstance->Modules->AddService(nn);
		Implementation eventlist[] = { I_OnUserPreNick, I_On005Numeric, I_OnRehash };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 7
0
	void init()
	{
		OnRehash(NULL);
		ServerInstance->Modules->AddService(cmd);
		Implementation eventlist[] = { I_OnRehash };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 8
0
	ModuleSQLAuth(InspIRCd* Me)
	: Module(Me) {
		ServerInstance->Modules->UseInterface("SQLutils");
		ServerInstance->Modules->UseInterface("SQL");

		SQLutils = ServerInstance->Modules->Find("m_sqlutils.so");
		if (!SQLutils)
			throw ModuleException("Can't find m_sqlutils.so. Please load m_sqlutils.so before m_sqlauth_extended.so.");

		SQLprovider = ServerInstance->Modules->FindFeature("SQL");
		if (!SQLprovider)
			throw ModuleException("Can't find an SQL provider module. Please load one before attempting to load m_sqlauth_extended.so.");

		m_customtitle = ServerInstance->Modules->Find("m_customtitle.so");
		/*
		Don't force users to have this module compiled, this module can function without it
		if (!m_customtitle)
			throw ModuleException("Can't find m_customtitle.so. Please load m_customtitle.so before m_sqlauth_extended.so.");
		*/

		OnRehash(NULL);
		Implementation eventlist[] = { I_OnPostConnect, I_OnPreCommand, I_OnUserConnect, I_OnUserDisconnect, I_OnCheckReady, I_OnRequest, I_OnRehash, I_OnUserRegister };
		ServerInstance->Modules->Attach(eventlist, this, 8);

	}
Exemplo n.º 9
0
		ModuleConnJoin(InspIRCd* Me)
			: Module(Me)
		{
			OnRehash(NULL);
			Implementation eventlist[] = { I_OnPostConnect, I_OnRehash };
			ServerInstance->Modules->Attach(eventlist, this, 2);
		}
Exemplo n.º 10
0
CmdResult cmd_rehash::Handle (const char** parameters, int pcnt, userrec *user)
{
	user->WriteServ("382 %s %s :Rehashing",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
	std::string parameter;
	std::string old_disabled = ServerInstance->Config->DisabledCommands;
	if (pcnt)
	{
		parameter = parameters[0];
	}
	else
	{
		ServerInstance->WriteOpers("*** %s is rehashing config file %s",user->nick,ServerConfig::CleanFilename(ServerInstance->ConfigFileName));
		ServerInstance->CloseLog();
		ServerInstance->OpenLog(ServerInstance->Config->argv, ServerInstance->Config->argc);
		ServerInstance->RehashUsersAndChans();
		FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect());
		ServerInstance->Config->Read(false,user);
		ServerInstance->Res->Rehash();
		ServerInstance->ResetMaxBans();
	}
	if (old_disabled != ServerInstance->Config->DisabledCommands)
		InitializeDisabledCommands(ServerInstance->Config->DisabledCommands, ServerInstance);

	FOREACH_MOD(I_OnRehash,OnRehash(user, parameter));

	ServerInstance->BuildISupport();

	return CMD_SUCCESS;
}
Exemplo n.º 11
0
	void init()
	{
		ServerInstance->Modules->AddService(ext);
		OnRehash(NULL);
		Implementation eventlist[] = { I_OnUserRegister, I_OnCheckReady, I_OnPreCommand, I_OnRehash };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 12
0
	void init()
	{
		Implementation eventlist[] = { I_OnRehash, I_OnAcceptConnection, I_OnGarbageCollect };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist) / sizeof(Implementation));

		OnRehash(NULL);
	}
Exemplo n.º 13
0
	void init()
	{
		OnRehash(NULL);
		ServerInstance->Modes->AddModeWatcher(&banwatcher);
		Implementation list[] = { I_OnRehash, I_On005Numeric, I_OnCheckBan };
		ServerInstance->Modules->Attach(list, this, sizeof(list)/sizeof(Implementation));
	}
Exemplo n.º 14
0
	void init()
	{
		OnRehash(NULL);
		ServerInstance->XLines->RegisterFactory(&f);
		ServerInstance->Modules->AddService(cmd);
		Implementation eventlist[] = { I_OnRehash, I_OnUserPreJoin, I_OnStats };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 15
0
	ModuleAuditorium(InspIRCd* Me)
		: Module(Me)
	{
		aum = new AuditoriumMode(ServerInstance);
		if (!ServerInstance->AddMode(aum, 'u'))
			throw ModuleException("Could not add new modes!");
		OnRehash(NULL, "");
	}
Exemplo n.º 16
0
	void init()
	{
		Implementation eventlist[] = { I_OnLoadModule, I_OnUnloadModule, I_OnBackgroundTimer, I_OnRehash, I_OnPreMode, I_OnUserPreJoin, I_OnUserPreKick, I_OnPreTopicChange };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
		ServerInstance->Modules->AddService(overridemode);
		OnRehash(NULL);
		overridemod = ServerInstance->Modules->Find("m_override.so");
	}
Exemplo n.º 17
0
	void init()
	{
		ServerInstance->Modules->AddService(p);
		Implementation eventlist[] = { I_OnChannelPreDelete, I_OnPostTopicChange, I_OnRawMode, I_OnRehash, I_OnBackgroundTimer };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));

		OnRehash(NULL);
	}
Exemplo n.º 18
0
	void init()
	{
		ServerInstance->Modules->AddService(m1);

		OnRehash(NULL);
		Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 19
0
	void init()
	{
		OnRehash(NULL);
		ServerInstance->Modules->AddService(this->dnsLookup);
		ServerInstance->Modules->AddService(this->ptrHosts);

		Implementation i[] = { I_OnUserInit, I_OnCheckReady };
		ServerInstance->Modules->Attach(i, this, sizeof(i) / sizeof(Implementation));
	}
Exemplo n.º 20
0
	void init()
	{
		ServerInstance->Modules->AddService(ie);

		OnRehash(NULL);
		ie.DoImplements(this);
		Implementation eventlist[] = { I_On005Numeric, I_OnCheckInvite, I_OnCheckKey, I_OnRehash };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 21
0
 void init()
 {
     OnRehash(NULL);
     ServerInstance->Modules->AddService(cmdw);
     ServerInstance->Modules->AddService(sw);
     ServerInstance->Modules->AddService(cmdw.ext);
     Implementation eventlist[] = { I_OnRehash, I_OnGarbageCollect, I_OnUserQuit, I_OnPostConnect, I_OnUserPostNick, I_On005Numeric, I_OnSetAway };
     ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
 }
Exemplo n.º 22
0
	void init()
	{
		ServerInstance->Modules->AddService(eh.ec);
		Implementation eventlist[] = { I_OnRehash, I_OnSyncChannel };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
		ServerInstance->OnCheckExemption = &eh;

		OnRehash(NULL);
	}
Exemplo n.º 23
0
	void init()
	{
		ServerInstance->Modules->AddService(cf);

		cf.DoImplements(this);
		Implementation eventlist[] = { I_OnRehash, I_OnUserPreMessage, I_OnUserPreNotice, I_OnSyncChannel };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));

		OnRehash(NULL);
	}
Exemplo n.º 24
0
	ModulePrivdeaf()
		: m1(this)
	{
		if (!ServerInstance->Modes->AddMode(&m1))
			throw ModuleException("Could not add new modes!");

		OnRehash(NULL);
		Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash };
		ServerInstance->Modules->Attach(eventlist, this, 3);
	}
Exemplo n.º 25
0
	void init()
	{
		OnRehash(NULL);
		ServerInstance->Modules->AddService(cmdsilence);
		ServerInstance->Modules->AddService(cmdsvssilence);
		ServerInstance->Modules->AddService(cmdsilence.ext);

		Implementation eventlist[] = { I_OnRehash, I_On005Numeric, I_OnUserPreNotice, I_OnUserPreMessage, I_OnUserPreInvite };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 26
0
	void init()
	{
		timer = new LoopLagTimer(this);
		action = new LoopAction(this);
		ServerInstance->Timers->AddTimer(timer);
		ServerInstance->Modules->AddService(cmd);
		Implementation eventlist[] = {I_OnRehash, I_OnBackgroundTimer};
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist) / sizeof(Implementation));
		OnRehash(NULL);
	}
Exemplo n.º 27
0
	void init()
	{
		ServerInstance->Modules->AddService(ext);
		OnRehash(NULL);
		Implementation eventlist[] = {
			I_OnRehash, I_OnUserInit, I_OnCheckReady,
			I_OnUserDisconnect, I_OnSetConnectClass
		};
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 28
0
	void init()
	{
		OnRehash(NULL);

		ServerInstance->Modules->AddService(cmd);
		ServerInstance->Modules->AddService(bcrypt);

		Implementation eventlist[] = { I_OnPreCommand, I_OnPassCompare };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 29
0
	ModuleDeaf(InspIRCd* Me)
		: Module(Me)
	{
		m1 = new User_d(ServerInstance);
		if (!ServerInstance->Modes->AddMode(m1))
			throw ModuleException("Could not add new modes!");

		OnRehash(NULL);
		Implementation eventlist[] = { I_OnUserPreMessage, I_OnUserPreNotice, I_OnRehash, I_OnBuildExemptList };
		ServerInstance->Modules->Attach(eventlist, this, 4);
	}
Exemplo n.º 30
0
	ModuleOperCmds(InspIRCd* serv)
	: Module::Module(serv)
	{
		Srv = serv;
		Conf = new ConfigReader(Srv);
		cmd = new cmd_operperms(this);
		
		OnRehash(NULL, "");
		
		Srv->AddCommand(cmd);
	}