Reordered functions to match ratbox3's order

This commit is contained in:
Valery Yatsko 2008-07-28 23:02:54 +04:00
parent 3f46cd0007
commit b1d6fa8cd2
1 changed files with 37 additions and 36 deletions

View File

@ -1,10 +1,11 @@
/*
* ircd-ratbox: A slightly useful ircd.
* charybdis: A slightly useful ircd.
* ircd.c: Starts up and runs the ircd.
*
* Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
* Copyright (C) 1996-2002 Hybrid Development Team
* Copyright (C) 2002-2005 ircd-ratbox development team
* Copyright (C) 2002-2008 ircd-ratbox development team
* Copyright (C) 2005-2008 charybdis development team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -21,7 +22,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*
* $Id: ircd.c 3380 2007-04-03 22:25:11Z jilles $
* $Id$
*/
#include "ratbox_lib.h"
@ -168,39 +169,6 @@ print_startup(int pid)
dup2(0, 2);
}
static void
ircd_log_cb(const char *str)
{
ilog(L_MAIN, "%s", str);
}
static void
ircd_restart_cb(const char *str)
{
restart(str);
}
/*
* Why EXIT_FAILURE here?
* Because if ircd_die_cb() is called it's because of a fatal
* error inside libcharybdis, and we don't know how to handle the
* exception, so it is logical to return a FAILURE exit code here.
* --nenolod
*/
static void
ircd_die_cb(const char *str)
{
if(str != NULL)
{
/* Try to get the message out to currently logged in operators. */
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Server panic! %s", str);
inotice("server panic: %s", str);
}
unlink(pidFileName);
exit(EXIT_FAILURE);
}
/*
* init_sys
*
@ -476,6 +444,39 @@ setup_corefile(void)
#endif
}
static void
ircd_log_cb(const char *str)
{
ilog(L_MAIN, "%s", str);
}
static void
ircd_restart_cb(const char *str)
{
restart(str);
}
/*
* Why EXIT_FAILURE here?
* Because if ircd_die_cb() is called it's because of a fatal
* error inside libcharybdis, and we don't know how to handle the
* exception, so it is logical to return a FAILURE exit code here.
* --nenolod
*/
static void
ircd_die_cb(const char *str)
{
if(str != NULL)
{
/* Try to get the message out to currently logged in operators. */
sendto_realops_snomask(SNO_GENERAL, L_NETWIDE, "Server panic! %s", str);
inotice("server panic: %s", str);
}
unlink(pidFileName);
exit(EXIT_FAILURE);
}
struct ev_entry *check_splitmode_ev = NULL;
static int