示例#1
0
	ModuleConnFlood(InspIRCd* Me) : Module(Me)
	{

		InitConf();
		Implementation eventlist[] = { I_OnRehash, I_OnUserRegister };
		ServerInstance->Modules->Attach(eventlist, this, 2);
	}
示例#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;
}
示例#3
0
文件: mainbox.c 项目: Codyle/pcsx2
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()
示例#4
0
文件: CDVDiso.c 项目: Codyle/pcsx2
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()
示例#5
0
文件: CDVDiso.c 项目: Codyle/pcsx2
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()
示例#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()
示例#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;
}
示例#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()
示例#9
0
	void init()
	{
		InitConf();
		Implementation eventlist[] = { I_OnRehash, I_OnUserRegister };
		ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
	}
示例#10
0
	virtual void OnRehash(User* user)
	{
		InitConf();
	}
示例#11
0
static int cb_rehash()
{
	FreeConf();
	InitConf();
	return 1;
}