Exemplo n.º 1
0
	ModuleConnFlood(InspIRCd* Me) : Module(Me)
	{

		InitConf();
		Implementation eventlist[] = { I_OnRehash, I_OnUserRegister };
		ServerInstance->Modules->Attach(eventlist, this, 2);
	}
Exemplo n.º 2
0
int main(int argc, char* argv[])
{
    g_sSection = s_szSvrType[SVRTYPE_GAME];

    bool bSuccessInitConf = true;
    bool bDaemon = InitConf(argc, argv, bSuccessInitConf);

    if (!bSuccessInitConf)
        return 0;

    // start server
    CLogicCirculator circulator;
    if (!circulator.Start(!bDaemon))
    {
        WriteLog(LOGLEVEL_ERROR, "circulator.Start() return false!\n");
#ifdef WIN32
        (void)getchar();
#endif
        return 0;
    }
    else
    {
        WriteLog(LOGLEVEL_DEBUG, "circulator.Start() return true!\n");
    }

    // stop server
    circulator.Stop();

    return 0;
}
Exemplo n.º 3
0
void MainBoxDisplay()
{
	InitConf(); // Man, am I boiling mad! CDVDinit() should have been called first!
	LoadConf();
	// Adjust window position?
	// We held off setting the name until now... so description would show.
	SetDlgItemText(mainboxwindow, IDC_0202, conf.devicename);
	// First Time - Show the window
	ShowWindow(mainboxwindow, SW_SHOWNORMAL);
} // END MainBoxDisplay()
Exemplo n.º 4
0
s32 CALLBACK CDVDtest()
{
#ifdef VERBOSE_FUNCTION_INTERFACE
	PrintLog("CDVDiso interface: CDVDtest()");
#endif /* VERBOSE_FUNCTION_INTERFACE */
	InitConf(); // Odd... hasn't CDVDinit been called yet?
	LoadConf();
	if (conf.isoname[0] == 0)  return (0); // No name chosen yet. Catch on Open()
	if (IsIsoFile(conf.isoname) == 0)  return (0); // Valid name. Go.
	return (-1); // Invalid name - reconfigure first.
	// Note really need this? Why not just return(0)...
} // END CDVDtest()
Exemplo n.º 5
0
s32 CALLBACK CDVDinit()
{
	int i;
	InitLog();
	if (OpenLog() != 0)  return (-1); // Couldn't open Log File? Abort.
#ifdef VERBOSE_FUNCTION_INTERFACE
	PrintLog("CDVDiso interface: CDVDinit()");
#endif /* VERBOSE_FUNCTION_INTERFACE */
	InitConf();
	isofile = NULL;
	isomode = -1;
	for (i = 0; i < 2048; i++)  isocdcheck[i] = 0;
	deviceopencount = 0;
	return (0);
} // END CDVDinit()
Exemplo n.º 6
0
int main(int argc, char *argv[])
{
	gtk_init(NULL, NULL);

	OpenLog();
	InitConf();
	LoadConf();
	MainBoxDisplay();
	ProgressBoxDisplay();
	MessageBoxDisplay();

	gtk_widget_show_all(mainbox.window);
	gtk_main();
	CloseLog();
	return(0);
} // END main()
Exemplo n.º 7
0
DLLFUNC int MOD_INIT(m_staff)(ModuleInfo *modinfo)
{
#ifdef USE_LIBCURL
	memset(&Download, 0, sizeof Download);
	ModuleSetOptions(modinfo->handle, MOD_OPT_PERM);
#endif
	memset(&staff, 0, sizeof(staff));
	InitConf();

	if (!AddCommand(modinfo->handle, MSG_STAFF, TOK_STAFF, m_staff))
		return MOD_FAILED;
	HookAddEx(modinfo->handle, HOOKTYPE_CONFIGRUN, cb_conf);
	HookAddEx(modinfo->handle, HOOKTYPE_REHASH, cb_rehash);
	HookAddEx(modinfo->handle, HOOKTYPE_REHASHFLAG, cb_rehashflag);
	HookAddEx(modinfo->handle, HOOKTYPE_STATS, cb_stats);

	return MOD_SUCCESS;
}
Exemplo n.º 8
0
s32 CALLBACK CDVDinit() {
  errno = 0;

  InitLog();
  if(OpenLog() != 0)  return(-1);

#ifdef VERBOSE_FUNCTION
  PrintLog("CDVD interface: CDVDinit()");
#endif /* VERBOSE_FUNCTION */

  InitConf();

  devicehandle = -1;
  devicecapability = 0;
  lasttime = time(NULL);

  // Initialize DVD.c and CD.c as well
  InitDisc();
  InitDVDInfo();
  InitCDInfo();

  return(0);
} // END CDVDinit()
Exemplo n.º 9
0
	void init()
	{
		InitConf();
		Implementation eventlist[] = { I_OnRehash, I_OnUserRegister };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
Exemplo n.º 10
0
	virtual void OnRehash(User* user)
	{
		InitConf();
	}
Exemplo n.º 11
0
static int cb_rehash()
{
	FreeConf();
	InitConf();
	return 1;
}