Yay for documenting code....

This commit is contained in:
JD Horelick 2010-03-23 21:20:07 -04:00
parent 4aa4fa57f2
commit d25c6eb1b2
4 changed files with 22 additions and 4 deletions

View File

@ -1,5 +1,7 @@
DIE server.name
DIE server.name [server.name]
Terminates the IRC server
Terminatess the IRC server. If a second server name
is provided, remotely terminate that server. In this
case, both server names must match.
- Requires Oper Priv: D

View File

@ -1,5 +1,7 @@
RESTART server.name
RESTART server.name [server.name]
Restarts the IRC server.
Restarts the IRC server. If a second server name
is provided, remotely restart that server. In this
case, both server names must match.
- Requires Oper Priv: D

View File

@ -104,6 +104,13 @@ me_die(struct Client *client_p __unused, struct Client *source_p, int parc, cons
static int
do_die(struct Client *source_p, const char *servername)
{
/* this makes sure both servernames match otherwise weirdness will occur */
if(irccmp(servername, me.name))
{
sendto_one_notice(source_p, ":Mismatch on /die %s", me.name);
return 0;
}
ircd_shutdown(get_client_name(source_p, HIDE_IP));
return 0;

View File

@ -111,6 +111,13 @@ do_restart(struct Client *source_p, const char *servername)
rb_dlink_node *ptr;
struct Client *target_p;
/* this makes sure both servernames match otherwise weirdness will occur */
if(irccmp(servername, me.name))
{
sendto_one_notice(source_p, ":Mismatch on /restart %s", me.name);
return 0;
}
RB_DLINK_FOREACH(ptr, lclient_list.head)
{
target_p = ptr->data;