]> jfr.im git - irc/quakenet/snircd-patchqueue.git/blob - dierestart.patch
Remove topic_reveal.patch. This has been fixed in IRCU and ircu patch is correct...
[irc/quakenet/snircd-patchqueue.git] / dierestart.patch
1 # HG changeset patch
2 # Parent 6ddd72a8d4f99bf688363698f44a1c5d81bbcdf9
3
4 diff -r 6ddd72a8d4f9 ircd/m_die.c
5 --- a/ircd/m_die.c Sun Jul 14 17:52:57 2013 +0100
6 +++ b/ircd/m_die.c Sun Jul 14 17:53:48 2013 +0100
7 @@ -106,6 +106,12 @@
8 if (!HasPriv(sptr, PRIV_DIE))
9 return send_reply(sptr, ERR_NOPRIVILEGES);
10
11 + if (parc < 2 || ircd_strcmp(parv[1],cli_name(&me))) {
12 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :This will terminate the server %s", sptr, cli_name(&me));
13 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :If you are sure this is what you want, use /quote DIE %s", sptr, cli_name(&me));
14 + return 0;
15 + }
16 +
17 for (i = 0; i <= HighestFd; i++)
18 {
19 if (!(acptr = LocalClientArray[i]))
20 diff -r 6ddd72a8d4f9 ircd/m_restart.c
21 --- a/ircd/m_restart.c Sun Jul 14 17:52:57 2013 +0100
22 +++ b/ircd/m_restart.c Sun Jul 14 17:53:48 2013 +0100
23 @@ -86,6 +86,7 @@
24 #include "ircd_log.h"
25 #include "ircd_reply.h"
26 #include "ircd_string.h"
27 +#include "msg.h"
28 #include "numeric.h"
29 #include "numnicks.h"
30 #include "send.h"
31 @@ -100,6 +101,12 @@
32 if (!HasPriv(sptr, PRIV_RESTART))
33 return send_reply(sptr, ERR_NOPRIVILEGES);
34
35 + if (parc < 2 || ircd_strcmp(parv[1],cli_name(&me))) {
36 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :This will restart the server %s", sptr, cli_name(&me));
37 + sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :If you are sure this is what you want, use /quote RESTART %s", sptr, cli_name(&me));
38 + return 0;
39 + }
40 +
41 log_write(LS_SYSTEM, L_NOTICE, 0, "Server RESTART by %#C", sptr);
42 server_restart("received RESTART");
43