Commits

Jilles Tjoelker  committed b0ed6bd

For remote rehashes, send error messages to the requesting oper as well.

  • Participants
  • Parent commits 7e9acfd

Comments (0)

Files changed (4)

File include/s_conf.h

 extern FILE *conf_fbfile_in;
 extern char conf_line_in[256];
 
+extern struct Client *remote_rehash_oper_p;
+
 struct ConfItem
 {
 	struct ConfItem *next;	/* list node pointer */

File modules/m_rehash.c

 				source_p->servptr->name, SHARED_REHASH))
 		return 0;
 
+	remote_rehash_oper_p = source_p;
 	do_rehash(source_p, parc > 1 ? parv[1] : NULL);
+	remote_rehash_oper_p = NULL;
 
 	return 0;
 }

File src/newconf.c

 
 	ierror("\"%s\", line %d: %s", current_file, lineno + 1, msg);
 	sendto_realops_snomask(SNO_GENERAL, L_ALL, "\"%s\", line %d: %s", current_file, lineno + 1, msg);
+	if (remote_rehash_oper_p)
+		sendto_one_notice(remote_rehash_oper_p, ":*** Notice -- \"%s\", line %d: %s", current_file, lineno + 1, msg);
 }
 
 int

File src/s_conf.c

 
 FILE *conf_fbfile_in;
 extern char yytext[];
+struct Client *remote_rehash_oper_p;
 
 static int verify_access(struct Client *client_p, const char *username);
 static int attach_iline(struct Client *, struct ConfItem *);
 			sendto_realops_snomask(SNO_GENERAL, L_ALL,
 					"Can't open %s file bans could be missing!",
 					*banconfs[i].filename);
+			if (remote_rehash_oper_p)
+				sendto_one_notice(remote_rehash_oper_p,
+					":*** Notice -- Can't open %s file bans could be missing!",
+					*banconfs[i].filename);
 		}
 		else
 		{
 		{
 			sendto_realops_snomask(SNO_GENERAL, L_ALL,
 					     "Can't open file '%s' - aborting rehash!", filename);
+			if (remote_rehash_oper_p)
+				sendto_one_notice(remote_rehash_oper_p,
+					     ":*** Notice -- Can't open file '%s' - aborting rehash!", filename);
 			return;
 		}
 	}
 
 	sendto_realops_snomask(SNO_GENERAL, L_ALL, "\"%s\", line %d: %s at '%s'",
 			     conffilebuf, lineno + 1, msg, newlinebuf);
+	if (remote_rehash_oper_p)
+		sendto_one_notice(remote_rehash_oper_p, ":*** Notice -- \"%s\", line %d: %s at '%s'",
+				     conffilebuf, lineno + 1, msg, newlinebuf);
 
 	ilog(L_MAIN, "\"%s\", line %d: %s at '%s'", conffilebuf, lineno + 1, msg, newlinebuf);
 }