1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-09 10:03:13 +02:00

Made tld {} get rehashed

This commit is contained in:
codemastr
2001-02-14 20:47:47 +00:00
parent e0588102ac
commit 8247b2cc5f
2 changed files with 25 additions and 4 deletions
+2 -1
View File
@@ -200,4 +200,5 @@
- Made /rehash work .. sortof. Fixed some crash bugs
- Added /stats P on listener info (oper-only)
- listener temporary stuff works now
- Fixed temporary stuf with conf_link
- Fixed temporary stuf with conf_link
- Made tld {} get rehashed
+23 -3
View File
@@ -1990,9 +1990,7 @@ void listen_cleanup()
close_listeners();
}
int rehash(cptr, sptr, sig)
aClient *cptr, *sptr;
int sig;
int rehash(aClient *cptr, aClient *sptr, int sig)
{
ConfigItem_oper *oper_ptr;
ConfigItem_class *class_ptr;
@@ -2002,6 +2000,7 @@ int rehash(cptr, sptr, sig)
ConfigItem_ban *ban_ptr;
ConfigItem_link *link_ptr;
ConfigItem_listen *listen_ptr;
ConfigItem_tld *tld_ptr;
ConfigItem t;
@@ -2099,6 +2098,27 @@ int rehash(cptr, sptr, sig)
{
listen_ptr->flag.temporary = 1;
}
for (tld_ptr = conf_tld; tld_ptr; tld_ptr = (ConfigItem_tld *) tld_ptr->next)
{
aMotd *motd;
ircfree(tld_ptr->motd_file);
ircfree(tld_ptr->rules_file);
while (tld_ptr->motd) {
motd = tld_ptr->motd->next;
ircfree(tld_ptr->motd->line);
ircfree(tld_ptr->motd);
tld_ptr->motd = motd;
}
while (tld_ptr->rules) {
motd = tld_ptr->rules->next;
ircfree(tld_ptr->rules->line);
ircfree(tld_ptr->rules);
tld_ptr->rules = motd;
}
t.next = del_ConfigItem((ConfigItem *) tld_ptr, (ConfigItem **)&conf_tld);
MyFree(tld_ptr);
tld_ptr = (ConfigItem_tld *) &t;
}
/* This space is for codemastr's upcoming tld & vhost removal code. */
if (conf_drpass)
{