diff --git a/include/config.h b/include/config.h
index afaf1de..60446fe 100644
--- a/include/config.h
+++ b/include/config.h
@@ -207,8 +207,12 @@
 
 /*
  * Full pathnames and defaults of irc system's support files. Please note that
- * these are only the recommened names and paths. Change as needed.
- * You must define these to something, even if you don't really want them.
+ * these are only the recommened names and paths.  You must define PPATH if you 
+ * want a pidfile written. Also, IRCDTUNE should be defined because it is needed for
+ * operation. All of these options are runtime-configurable (except for CPATH and LPATH)
+ * in the files block of unrealircd.conf. CPATH is runtime-configurable as a command-
+ * line argument. These used as the default values for options absent from the user's
+ * unrealircd.conf.
  */
 #define	CPATH		"unrealircd.conf"	/* server configuration file */
 #define	MPATH		"ircd.motd"	/* server MOTD file */
diff --git a/include/h.h b/include/h.h
index bacb60a..e4ac248 100644
--- a/include/h.h
+++ b/include/h.h
@@ -73,6 +73,7 @@ extern MODVAR long lastsendK, lastrecvK;
  * Configuration linked lists
 */
 extern MODVAR ConfigItem_me		*conf_me;
+extern MODVAR ConfigItem_files		*conf_files;
 extern MODVAR ConfigItem_class 	*conf_class;
 extern MODVAR ConfigItem_class		*default_class;
 extern MODVAR ConfigItem_admin 	*conf_admin;
diff --git a/include/struct.h b/include/struct.h
index b282542..e150ce4 100644
--- a/include/struct.h
+++ b/include/struct.h
@@ -94,6 +94,7 @@ typedef struct _configflag_ban ConfigFlag_ban;
 typedef struct _configflag_tld ConfigFlag_tld;
 typedef struct _configitem ConfigItem;
 typedef struct _configitem_me ConfigItem_me;
+typedef struct _configitem_files ConfigItem_files;
 typedef struct _configitem_admin ConfigItem_admin;
 typedef struct _configitem_class ConfigItem_class;
 typedef struct _configitem_oper ConfigItem_oper;
@@ -1109,6 +1110,12 @@ struct _configitem_me {
 	unsigned short	   numeric;
 };
 
+struct _configitem_files {
+	char	   *motd_file, *rules_file, *smotd_file;
+	char	   *botmotd_file, *opermotd_file, *svsmotd_file;
+	char	   *pid_file, *tune_file;
+};
+
 struct _configitem_admin {
 	ConfigItem *prev, *next;
 	ConfigFlag flag;
diff --git a/src/ircd.c b/src/ircd.c
index 3c02409..04086e3 100644
--- a/src/ircd.c
+++ b/src/ircd.c
@@ -1530,12 +1530,12 @@ int InitwIRCD(int argc, char *argv[])
 	me.umodes = conf_listen->options;
 	conf_listen->listener = &me;
 	run_configuration();
-	botmotd = (aMotd *) read_file(BPATH, NULL);
-	rules = (aMotd *) read_file(RPATH, NULL);
-	opermotd = (aMotd *) read_file(OPATH, NULL);
-	motd = (aMotd *) read_file_ex(MPATH, NULL, &motd_tm);
-	smotd = (aMotd *) read_file_ex(SMPATH, NULL, &smotd_tm);
-	svsmotd = (aMotd *) read_file(VPATH, NULL);
+	botmotd = (aMotd *) read_file(conf_files->botmotd_file, NULL);
+	rules = (aMotd *) read_file(conf_files->rules_file, NULL);
+	opermotd = (aMotd *) read_file(conf_files->opermotd_file, NULL);
+	motd = (aMotd *) read_file_ex(conf_files->motd_file, NULL, &motd_tm);
+	smotd = (aMotd *) read_file_ex(conf_files->smotd_file, NULL, &smotd_tm);
+	svsmotd = (aMotd *) read_file(conf_files->svsmotd_file, NULL);
 	strncpy(me.sockhost, conf_listen->ip, sizeof(me.sockhost) - 1);
 	if (me.name[0] == '\0')
 		strncpyzt(me.name, me.sockhost, sizeof(me.name));
diff --git a/src/modules/m_addomotd.c b/src/modules/m_addomotd.c
index 68d3ac4..90cbe49 100644
--- a/src/modules/m_addomotd.c
+++ b/src/modules/m_addomotd.c
@@ -106,7 +106,7 @@ DLLFUNC CMD_FUNC(m_addomotd)
 		    me.name, parv[0], "ADDMOTD");
 		return 0;
 	}
-	conf = fopen(OPATH, "a");
+	conf = fopen(conf_files->opermotd_file, "a");
 	if (conf == NULL)
 	{
 		return 0;
diff --git a/src/modules/m_svsmotd.c b/src/modules/m_svsmotd.c
index 70b86fa..a597e72 100644
--- a/src/modules/m_svsmotd.c
+++ b/src/modules/m_svsmotd.c
@@ -113,12 +113,12 @@ int  m_svsmotd(aClient *cptr, aClient *sptr, int parc, char *parv[])
         switch (*parv[1])
         {
           case '#':
-                  conf = fopen(VPATH, "a");
+                  conf = fopen(conf_files->svsmotd_file, "a");
                   sendto_ops("Added '%s' to services motd", parv[2]);
                   break;
           case '!':
           {
-                  remove(VPATH);
+                  remove(conf_files->svsmotd_file);
                   free_motd(svsmotd);
                   svsmotd = NULL;
                   sendto_ops("Wiped out services motd data");
@@ -150,6 +150,6 @@ int  m_svsmotd(aClient *cptr, aClient *sptr, int parc, char *parv[])
 
         fclose(conf);
         /* We editted it, so rehash it -- codemastr */
-        svsmotd = read_file(VPATH, &svsmotd);
+        svsmotd = read_file(conf_files->svsmotd_file, &svsmotd);
         return 1;
 }
diff --git a/src/s_bsd.c b/src/s_bsd.c
index f536894..fa46c99 100644
--- a/src/s_bsd.c
+++ b/src/s_bsd.c
@@ -672,20 +672,20 @@ void write_pidfile(void)
 #ifdef IRCD_PIDFILE
 	int  fd;
 	char buff[20];
-	if ((fd = open(IRCD_PIDFILE, O_CREAT | O_WRONLY, 0600)) >= 0)
+	if ((fd = open(conf_files->pid_file, O_CREAT | O_WRONLY, 0600)) >= 0)
 	{
 		bzero(buff, sizeof(buff));
 		(void)ircsprintf(buff, "%5d\n", (int)getpid());
 		if (write(fd, buff, strlen(buff)) == -1)
 			Debug((DEBUG_NOTICE, "Error writing to pid file %s",
-			    IRCD_PIDFILE));
+			    conf_files->pid_file));
 		(void)close(fd);
 		return;
 	}
 #ifdef	DEBUGMODE
 	else
 		Debug((DEBUG_NOTICE, "Error opening pid file %s",
-		    IRCD_PIDFILE));
+		    conf_files->pid_file));
 #endif
 #endif
 }
diff --git a/src/s_conf.c b/src/s_conf.c
index 4981e9a..d186e6e 100644
--- a/src/s_conf.c
+++ b/src/s_conf.c
@@ -79,6 +79,7 @@ struct _conf_operflag
 
 static int	_conf_admin		(ConfigFile *conf, ConfigEntry *ce);
 static int	_conf_me		(ConfigFile *conf, ConfigEntry *ce);
+static int	_conf_files		(ConfigFile *conf, ConfigEntry *ce);
 static int	_conf_oper		(ConfigFile *conf, ConfigEntry *ce);
 static int	_conf_class		(ConfigFile *conf, ConfigEntry *ce);
 static int	_conf_drpass		(ConfigFile *conf, ConfigEntry *ce);
@@ -116,6 +117,7 @@ static int	_conf_cgiirc	(ConfigFile *conf, ConfigEntry *ce);
 
 static int	_test_admin		(ConfigFile *conf, ConfigEntry *ce);
 static int	_test_me		(ConfigFile *conf, ConfigEntry *ce);
+static int	_test_files		(ConfigFile *conf, ConfigEntry *ce);
 static int	_test_oper		(ConfigFile *conf, ConfigEntry *ce);
 static int	_test_class		(ConfigFile *conf, ConfigEntry *ce);
 static int	_test_drpass		(ConfigFile *conf, ConfigEntry *ce);
@@ -157,6 +159,7 @@ static ConfigCommand _ConfigCommands[] = {
 	{ "deny",		_conf_deny,		_test_deny	},
 	{ "drpass",		_conf_drpass,		_test_drpass	},
 	{ "except",		_conf_except,		_test_except	},
+	{ "files",		_conf_files,		_test_files	},
 	{ "help",		_conf_help,		_test_help	},
 	{ "include",		NULL,	  		_test_include	},
 	{ "link", 		_conf_link,		_test_link	},
@@ -354,6 +357,7 @@ int			config_run();
  * Configuration linked lists
 */
 ConfigItem_me		*conf_me = NULL;
+ConfigItem_files	*conf_files = NULL;
 ConfigItem_class 	*conf_class = NULL;
 ConfigItem_class	*default_class = NULL;
 ConfigItem_admin 	*conf_admin = NULL;
@@ -1445,6 +1449,59 @@ static void inline config_warn_duplicate(const char *filename, int line, const c
 	config_warn("%s:%d: Duplicate %s directive", filename, line, entry);
 }
 
+/* returns 1 if the test fails */
+int config_test_openfile(ConfigEntry *cep, int flags, mode_t mode, const char *entry, int fatal)
+{
+	int fd;
+	
+	if(!cep->ce_vardata)
+	{
+		if(fatal)
+			config_error("%s:%i: %s: <no file specified>: no file specified",
+				     cep->ce_fileptr->cf_filename,
+				     cep->ce_varlinenum,
+				     entry);
+		else
+			
+			config_warn("%s:%i: %s: <no file specified>: no file specified",
+				    cep->ce_fileptr->cf_filename,
+				    cep->ce_varlinenum,
+				    entry);
+		return 1;
+	}
+	/* 
+	 * Make sure that files are created with the correct mode. This is 
+	 * because we don't feel like unlink()ing them...which would require
+	 * stat()ing them to make sure that we don't delete existing ones
+	 * and that we deal with all of the bugs that come with complexity. 
+	 * The only files we may be creating are the tunefile and pidfile so far.
+	 */
+	if(flags & O_CREAT)
+		fd = open(cep->ce_vardata, flags, mode);
+	else
+		fd = open(cep->ce_vardata, flags);
+	if(fd == -1)
+	{
+		if(fatal)
+			config_error("%s:%i: %s: %s: %s",
+				     cep->ce_fileptr->cf_filename,
+				     cep->ce_varlinenum,
+				     entry,
+				     cep->ce_vardata,
+				     strerror(errno));
+		else
+			config_warn("%s:%i: %s: %s: %s",
+				     cep->ce_fileptr->cf_filename,
+				     cep->ce_varlinenum,
+				     entry,
+				     cep->ce_vardata,
+				     strerror(errno));
+		return 1;
+	}
+	close(fd);
+	return 0;
+}
+
 void config_progress(char *format, ...)
 {
 	va_list		ap;
@@ -1692,6 +1749,8 @@ void applymeblock(void)
 
 int	init_conf(char *rootconf, int rehash)
 {
+	char *old_pid_file = NULL;
+  
 	config_status("Loading IRCd configuration ..");
 	if (conf)
 	{
@@ -1727,6 +1786,7 @@ int	init_conf(char *rootconf, int rehash)
 		if (rehash)
 		{
 			Hook *h;
+			old_pid_file = conf_files->pid_file;
 			unrealdns_delasyncconnects();
 			config_rehash();
 #ifndef STATIC_LINKING
@@ -1770,7 +1830,17 @@ int	init_conf(char *rootconf, int rehash)
 		}
 		charsys_finish();
 		applymeblock();
-	}
+		if(old_pid_file &&
+		   strcmp(old_pid_file, conf_files->pid_file))
+			{
+				sendto_ops("pidfile is being rewritten to %s, please delete %s",
+					   conf_files->pid_file,
+					   old_pid_file);
+				ircfree(old_pid_file);
+				
+				write_pidfile();
+			}
+		   }
 	else	
 	{
 		config_error("IRCd configuration failed to load");
@@ -2234,6 +2304,25 @@ void	config_rehash()
 		next = (ListStruct *)cgiirc_ptr->next;
 		delete_cgiircblock(cgiirc_ptr);
 	}
+
+	/*
+	  reset conf_files -- should this be in its own function? no, because
+	  it's only used here
+	 */
+	ircfree(conf_files->motd_file);
+	ircfree(conf_files->smotd_file);
+	ircfree(conf_files->opermotd_file);
+	ircfree(conf_files->svsmotd_file);
+	ircfree(conf_files->botmotd_file);
+	ircfree(conf_files->rules_file);
+	ircfree(conf_files->tune_file);
+	/* 
+	   Don't free conf_files->pid_file here; the old value is used to determine if 
+	   the pidfile location has changed and write_pidfile() needs to be called 
+	   again.
+	*/
+	ircfree(conf_files);
+	conf_files = NULL;
 }
 
 int	config_post_test()
@@ -2354,6 +2443,10 @@ int	config_run()
 	}
 #endif
 
+	/* initialize conf_files with defaults if the block isn't set: */
+	if(!conf_files)
+	  _conf_files(NULL, NULL);
+
 	if (errors > 0)
 	{
 		config_error("%i fatal errors encountered", errors);
@@ -3229,6 +3322,175 @@ int	_test_me(ConfigFile *conf, ConfigEntry *ce)
 }
 
 /*
+ * The files {} block
+ */
+int	_conf_files(ConfigFile *conf, ConfigEntry *ce)
+{
+	ConfigEntry *cep;
+
+	if (!conf_files)
+	{
+		conf_files = MyMallocEx(sizeof(ConfigItem_files));
+
+		/* set defaults */
+		conf_files->motd_file = strdup(MPATH);
+		conf_files->rules_file = strdup(RPATH);
+		conf_files->smotd_file = strdup(SMPATH);
+		conf_files->botmotd_file = strdup(BPATH);
+		conf_files->opermotd_file = strdup(OPATH);
+		conf_files->svsmotd_file = strdup(VPATH);
+		
+		conf_files->pid_file = strdup(IRCD_PIDFILE);
+		conf_files->tune_file = strdup(IRCDTUNE);
+		
+		/* we let actual files get read in later by the motd caching mechanism */
+		fprintf(stderr, "files {} got initilized!\n");
+	}
+	/*
+	 * hack to allow initialization of conf_files (above) when there is no files block in 
+	 * CPATH. The caller calls _conf_files(NULL, NULL); to do this. We return here because 
+	 * the for loop's initialization of cep would segfault otherwise. We return 1 because
+	 * if config_run() calls us with a NULL ce, it's got a bug...but we can't detect that.
+	 */
+	if(!ce)
+	  return 1;
+	
+	for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+	{
+		if (!strcmp(cep->ce_varname, "motd"))
+			ircstrdup(conf_files->motd_file, cep->ce_vardata);
+		else if (!strcmp(cep->ce_varname, "shortmotd"))
+			ircstrdup(conf_files->smotd_file, cep->ce_vardata);
+		else if (!strcmp(cep->ce_varname, "opermotd"))
+			ircstrdup(conf_files->opermotd_file, cep->ce_vardata);
+		else if (!strcmp(cep->ce_varname, "svsmotd"))
+			ircstrdup(conf_files->svsmotd_file, cep->ce_vardata);
+		else if (!strcmp(cep->ce_varname, "botmotd"))
+			ircstrdup(conf_files->botmotd_file, cep->ce_vardata);
+		else if (!strcmp(cep->ce_varname, "rules"))
+			ircstrdup(conf_files->rules_file, cep->ce_vardata);
+		else if (!strcmp(cep->ce_varname, "tunefile"))
+			ircstrdup(conf_files->tune_file, cep->ce_vardata);
+		else if (!strcmp(cep->ce_varname, "pidfile"))
+			ircstrdup(conf_files->pid_file, cep->ce_vardata);
+	}
+	return 1;
+}
+
+int	_test_files(ConfigFile *conf, ConfigEntry *ce)
+{
+	ConfigEntry *cep;
+	int	    errors = 0;
+	char has_motd = 0, has_smotd = 0, has_rules = 0;
+	char has_botmotd = 0, has_opermotd = 0, has_svsmotd = 0;
+	char has_pidfile = 0, has_tunefile = 0;
+	
+	for (cep = ce->ce_entries; cep; cep = cep->ce_next)
+	{
+		/* files::motd */
+		if (!strcmp(cep->ce_varname, "motd"))
+		{
+			if (has_motd)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename, 
+					cep->ce_varlinenum, "files::motd");
+				continue;
+			}
+			config_test_openfile(cep, O_RDONLY, 0, "files::motd", 0);
+			has_motd = 1;
+		}
+		/* files::smotd */
+		else if (!strcmp(cep->ce_varname, "smotd")) 
+		{
+			if (has_smotd)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum, "files::smotd");
+				continue;
+			}
+			config_test_openfile(cep, O_RDONLY, 0, "files::smotd", 0);
+			has_smotd = 1;
+		}
+		/* files::rules */
+		else if (!strcmp(cep->ce_varname, "rules")) 
+		{
+			if (has_rules)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum, "files::rules");
+				continue;
+			}
+			config_test_openfile(cep, O_RDONLY, 0, "files::rules", 0);
+			has_rules = 1;
+		}
+		/* files::botmotd */
+		else if (!strcmp(cep->ce_varname, "botmotd")) 
+		{
+			if (has_botmotd)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum, "files::botmotd");
+				continue;
+			}
+			config_test_openfile(cep, O_RDONLY, 0, "files::botmotd", 0);
+			has_botmotd = 1;
+		}
+		/* files::opermotd */
+		else if (!strcmp(cep->ce_varname, "opermotd")) 
+		{
+			if (has_opermotd)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum, "files::opermotd");
+				continue;
+			}
+			config_test_openfile(cep, O_RDONLY, 0, "files::opermotd", 0);
+			has_opermotd = 1;
+		}
+		/* files::svsmotd 
+		 * This config stuff should somehow be inside of modules/m_svsmotd.c!!!... right?
+		 */
+		else if (!strcmp(cep->ce_varname, "svsmotd")) 
+		{
+			if (has_svsmotd)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum, "files::svsmotd");
+				continue;
+			}
+			config_test_openfile(cep, O_RDONLY, 0, "files::svsmotd", 0);
+			has_svsmotd = 1;
+		}
+		/* files::pidfile */
+		else if (!strcmp(cep->ce_varname, "pidfile")) 
+		{
+			if (has_pidfile)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum, "files::pidfile");
+				continue;
+			}
+			
+			errors += config_test_openfile(cep, O_WRONLY | O_CREAT, 0600, "files::pidfile", 1);
+			has_pidfile = 1;
+		}
+		/* files::tunefile */
+		else if (!strcmp(cep->ce_varname, "tunefile")) 
+		{
+			if (has_tunefile)
+			{
+				config_warn_duplicate(cep->ce_fileptr->cf_filename,
+					cep->ce_varlinenum, "files::tunefile");
+				continue;
+			}
+			errors += config_test_openfile(cep, O_RDWR | O_CREAT, 0600, "files::tunefile", 1);
+			has_tunefile = 1;
+		}
+	}
+	return errors;
+}
+
+/*
  * The oper {} block parser
 */
 
diff --git a/src/s_serv.c b/src/s_serv.c
index f358126..5d8985b 100644
--- a/src/s_serv.c
+++ b/src/s_serv.c
@@ -551,7 +551,7 @@ EVENT(save_tunefile)
 {
 	FILE *tunefile;
 
-	tunefile = fopen(IRCDTUNE, "w");
+	tunefile = fopen(conf_files->tune_file, "w");
 	if (!tunefile)
 	{
 #if !defined(_WIN32) && !defined(_AMIGA)
@@ -571,7 +571,7 @@ void load_tunefile(void)
 	FILE *tunefile;
 	char buf[1024];
 
-	tunefile = fopen(IRCDTUNE, "r");
+	tunefile = fopen(conf_files->tune_file, "r");
 	if (!tunefile)
 		return;
 	fprintf(stderr, "* Loading tunefile..\n");
@@ -582,14 +582,14 @@ void load_tunefile(void)
 	fclose(tunefile);
 }
 
-/** Rehash motd and rule files (MPATH/RPATH and all tld entries). */
+/** Rehash motd and rule files (motd_file/rules_file and all tld entries). */
 void rehash_motdrules()
 {
 ConfigItem_tld *tlds;
 
-	motd = (aMotd *) read_file_ex(MPATH, &motd, &motd_tm);
-	rules = (aMotd *) read_file(RPATH, &rules);
-	smotd = (aMotd *) read_file_ex(SMPATH, &smotd, &smotd_tm);
+	motd = (aMotd *) read_file_ex(conf_files->motd_file, &motd, &motd_tm);
+	rules = (aMotd *) read_file(conf_files->rules_file, &rules);
+	smotd = (aMotd *) read_file_ex(conf_files->smotd_file, &smotd, &smotd_tm);
 	for (tlds = conf_tld; tlds; tlds = (ConfigItem_tld *) tlds->next)
 	{
 		tlds->motd = read_file_ex(tlds->motd_file, &tlds->motd, &tlds->motd_tm);
@@ -605,11 +605,12 @@ ConfigItem_tld *tlds;
 
 void reread_motdsandrules()
 {
-	motd = (aMotd *) read_file_ex(MPATH, &motd, &motd_tm);
-	rules = (aMotd *) read_file(RPATH, &rules);
-	smotd = (aMotd *) read_file_ex(SMPATH, &smotd, &smotd_tm);
-	botmotd = (aMotd *) read_file(BPATH, &botmotd);
-	opermotd = (aMotd *) read_file(OPATH, &opermotd);
+	motd = (aMotd *) read_file_ex(conf_files->motd_file, &motd, &motd_tm);
+	rules = (aMotd *) read_file(conf_files->rules_file, &rules);
+	smotd = (aMotd *) read_file_ex(conf_files->smotd_file, &smotd, &smotd_tm);
+	botmotd = (aMotd *) read_file(conf_files->botmotd_file, &botmotd);
+	opermotd = (aMotd *) read_file(conf_files->opermotd_file, &opermotd);
+	svsmotd = (aMotd *) read_file(conf_files->svsmotd_file, &svsmotd);
 }
 
 extern void reinit_resolver(aClient *sptr);
@@ -721,7 +722,7 @@ CMD_FUNC(m_rehash)
 				    sptr->name);
 				if (cptr != sptr)
 					sendto_serv_butone(&me, ":%s GLOBOPS :%s is remotely rehashing OperMOTD", me.name, sptr->name);
-				opermotd = (aMotd *) read_file(OPATH, &opermotd);
+				opermotd = (aMotd *) read_file(conf_files->opermotd_file, &opermotd);
 				RunHook3(HOOKTYPE_REHASHFLAG, cptr, sptr, parv[1]);
 				return 0;
 			}
@@ -733,7 +734,7 @@ CMD_FUNC(m_rehash)
 				    sptr->name);
 				if (cptr != sptr)
 					sendto_serv_butone(&me, ":%s GLOBOPS :%s is remotely rehashing BotMOTD", me.name, sptr->name);
-				botmotd = (aMotd *) read_file(BPATH, &botmotd);
+				botmotd = (aMotd *) read_file(conf_files->botmotd_file, &botmotd);
 				RunHook3(HOOKTYPE_REHASHFLAG, cptr, sptr, parv[1]);
 				return 0;
 			}
@@ -766,10 +767,11 @@ CMD_FUNC(m_rehash)
 	}
 
 	/* Normal rehash, rehash motds&rules too, just like the on in the tld block will :p */
-	reread_motdsandrules();
 	if (cptr == sptr)
 		sendto_one(sptr, rpl_str(RPL_REHASHING), me.name, parv[0], configfile);
-	return rehash(cptr, sptr, (parc > 1) ? ((*parv[1] == 'q') ? 2 : 0) : 0);
+	x = rehash(cptr, sptr, (parc > 1) ? ((*parv[1] == 'q') ? 2 : 0) : 0);
+	reread_motdsandrules();
+	return x;
 }
 
 /*
diff --git a/src/win32/gui.c b/src/win32/gui.c
index 7190041..d45d590 100644
--- a/src/win32/gui.c
+++ b/src/win32/gui.c
@@ -389,11 +389,11 @@ LRESULT CALLBACK MainDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 						}
 						AppendMenu(hConfig, MF_SEPARATOR, 0, NULL);
 					}
-					AppendMenu(hConfig, MF_STRING, IDM_MOTD, MPATH);
-					AppendMenu(hConfig, MF_STRING, IDM_SMOTD, SMPATH);
-					AppendMenu(hConfig, MF_STRING, IDM_OPERMOTD, OPATH);
-					AppendMenu(hConfig, MF_STRING, IDM_BOTMOTD, BPATH);
-					AppendMenu(hConfig, MF_STRING, IDM_RULES, RPATH);
+					AppendMenu(hConfig, MF_STRING, IDM_MOTD, conf_files->motd_file);
+					AppendMenu(hConfig, MF_STRING, IDM_SMOTD, conf_files->smotd_file);
+					AppendMenu(hConfig, MF_STRING, IDM_OPERMOTD, conf_files->opermotd_file);
+					AppendMenu(hConfig, MF_STRING, IDM_BOTMOTD, conf_files->botmotd_file);
+					AppendMenu(hConfig, MF_STRING, IDM_RULES, conf_files->rules_file);
 						
 					if (conf_tld) 
 					{
@@ -494,11 +494,11 @@ LRESULT CALLBACK MainDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 					AppendMenu(hConfig, MF_SEPARATOR, 0, NULL);
 				}
 
-				AppendMenu(hConfig, MF_STRING, IDM_MOTD, MPATH);
-				AppendMenu(hConfig, MF_STRING, IDM_SMOTD, SMPATH);
-				AppendMenu(hConfig, MF_STRING, IDM_OPERMOTD, OPATH);
-				AppendMenu(hConfig, MF_STRING, IDM_BOTMOTD, BPATH);
-				AppendMenu(hConfig, MF_STRING, IDM_RULES, RPATH);
+				AppendMenu(hConfig, MF_STRING, IDM_MOTD, conf_files->motd_file);
+				AppendMenu(hConfig, MF_STRING, IDM_SMOTD, conf_files->smotd_file);
+				AppendMenu(hConfig, MF_STRING, IDM_OPERMOTD, conf_files->opermotd_file);
+				AppendMenu(hConfig, MF_STRING, IDM_BOTMOTD, conf_files->botmotd_file);
+				AppendMenu(hConfig, MF_STRING, IDM_RULES, conf_files->rules_file);
 				
 				if (conf_tld) 
 				{
@@ -582,12 +582,12 @@ LRESULT CALLBACK MainDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 				}
 				case IDM_RHOMOTD:
 					MessageBox(NULL, "Rehashing the OperMOTD", "Rehashing", MB_OK);
-					opermotd = (aMotd *) read_file(OPATH, &opermotd);
+					opermotd = (aMotd *) read_file(conf_files->opermotd_file, &opermotd);
 					sendto_realops("Rehashing the OperMOTD via the console");
 					break;
 				case IDM_RHBMOTD:
 					MessageBox(NULL, "Rehashing the BotMOTD", "Rehashing", MB_OK);
-					botmotd = (aMotd *) read_file(BPATH, &botmotd);
+					botmotd = (aMotd *) read_file(conf_files->botmotd_file, &botmotd);
 					sendto_realops("Rehashing the BotMOTD via the console");
 					break;
 				case IDM_LICENSE: 
@@ -608,23 +608,23 @@ LRESULT CALLBACK MainDLG(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
 					break;
 				case IDM_MOTD:
 					DialogBoxParam(hInst, "FromFile", hDlg, (DLGPROC)FromFileDLG, 
-						(LPARAM)MPATH);
+						(LPARAM)conf_files->motd_file);
 					break;
 				case IDM_SMOTD:
 					DialogBoxParam(hInst, "FromFile", hDlg, (DLGPROC)FromFileDLG, 
-						(LPARAM)SMPATH);
+						(LPARAM)conf_files->smotd_file);
 					break;
 				case IDM_OPERMOTD:
 					DialogBoxParam(hInst, "FromFile", hDlg, (DLGPROC)FromFileDLG,
-						(LPARAM)OPATH);
+						(LPARAM)conf_files->opermotd_file);
 					break;
 				case IDM_BOTMOTD:
 					DialogBoxParam(hInst, "FromFile", hDlg, (DLGPROC)FromFileDLG,
-						(LPARAM)BPATH);
+						(LPARAM)conf_files->botmotd_file);
 					break;
 				case IDM_RULES:
 					DialogBoxParam(hInst, "FromFile", hDlg, (DLGPROC)FromFileDLG,
-						(LPARAM)RPATH);
+						(LPARAM)conf_files->rules_file);
 					break;
 				case IDM_NEW:
 					DialogBoxParam(hInst, "FromFile", hDlg, (DLGPROC)FromFileDLG, (LPARAM)NULL);
