| 23 |
|
*/ |
| 24 |
|
|
| 25 |
|
#include "stdinc.h" |
| 26 |
< |
#include "tools.h" |
| 26 |
> |
#include "list.h" |
| 27 |
|
#include "restart.h" |
| 28 |
– |
#include "common.h" |
| 28 |
|
#include "fdlist.h" |
| 29 |
|
#include "ircd.h" |
| 30 |
|
#include "irc_string.h" |
| 31 |
|
#include "send.h" |
| 32 |
< |
#include "s_log.h" |
| 32 |
> |
#include "log.h" |
| 33 |
|
#include "client.h" /* for UMODE_ALL */ |
| 34 |
|
#include "memory.h" |
| 35 |
+ |
#include "conf_db.h" |
| 36 |
|
|
| 37 |
|
void |
| 38 |
|
restart(const char *mesg) |
| 39 |
|
{ |
| 40 |
|
static int was_here = 0; /* redundant due to restarting flag below */ |
| 41 |
|
|
| 42 |
< |
if (was_here) |
| 42 |
> |
if (was_here++) |
| 43 |
|
abort(); |
| 44 |
– |
was_here = 1; |
| 44 |
|
|
| 45 |
< |
server_die(mesg, YES); |
| 45 |
> |
server_die(mesg, 1); |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
void |
| 51 |
|
char buffer[IRCD_BUFSIZE]; |
| 52 |
|
dlink_node *ptr = NULL; |
| 53 |
|
struct Client *target_p = NULL; |
| 54 |
+ |
static int was_here = 0; |
| 55 |
+ |
|
| 56 |
+ |
if (rboot && was_here++) |
| 57 |
+ |
abort(); |
| 58 |
|
|
| 59 |
|
if (EmptyString(mesg)) |
| 60 |
|
snprintf(buffer, sizeof(buffer), "Server %s", |
| 78 |
|
sendto_one(target_p, ":%s ERROR :%s", me.name, buffer); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
< |
ilog(L_NOTICE, buffer); |
| 81 |
> |
ilog(LOG_TYPE_IRCD, "%s", buffer); |
| 82 |
> |
|
| 83 |
> |
save_all_databases(NULL); |
| 84 |
|
|
| 85 |
|
send_queued_all(); |
| 86 |
|
close_fds(NULL); |