Commits

jdhore  committed 7f94202

Yay for documenting code....

  • Participants
  • Parent commits 9cb908a

Comments (0)

Files changed (4)

File help/opers/die

-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

File help/opers/restart

-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

File modules/core/m_die.c

 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;

File modules/m_restart.c

 	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;