mirror of
https://github.com/pissnet/pissircd.git
synced 2025-07-31 15:32:26 +01:00
- Docs: log { } from 'optional' -> 'recomended'
- If no log { } block is present a warning will be printed out and we will fallback to a default of logging errors to ircd.log. Suggested by w00t (#0002327).
This commit is contained in:
parent
9c38686f52
commit
ab103a74cd
3 changed files with 17 additions and 1 deletions
3
Changes
3
Changes
|
@ -598,3 +598,6 @@
|
|||
Bugz (#0002198). Obviously all servers need to be upgraded to make this work.
|
||||
- Fixed SVSNOOP bug where remote servers still thought the opers had privileges, reported
|
||||
by Zell (#0002185)
|
||||
- Docs: log { } from 'optional' -> 'recomended'
|
||||
- If no log { } block is present a warning will be printed out and we will fallback
|
||||
to a default of logging errors to ircd.log. Suggested by w00t (#0002327).
|
||||
|
|
|
@ -1250,7 +1250,7 @@ loadmodule "modules/cloak.dll";
|
|||
</pre>
|
||||
</div>
|
||||
<p><font class="block_section">4.11 - </font><font class="block_name">Log Block</font>
|
||||
<font class="block_optional">OPTIONAL</font><a name="logblock"></a><div class="desc">
|
||||
<font class="block_recommended">RECOMMENDED</font><a name="logblock"></a><div class="desc">
|
||||
</p>
|
||||
<p>Syntax:<br>
|
||||
<pre>
|
||||
|
|
13
src/s_conf.c
13
src/s_conf.c
|
@ -1570,6 +1570,17 @@ char *encoded;
|
|||
}
|
||||
}
|
||||
|
||||
static void make_default_logblock(void)
|
||||
{
|
||||
ConfigItem_log *ca = MyMallocEx(sizeof(ConfigItem_log));
|
||||
|
||||
config_status("No log { } block found -- using default: errors will be logged to 'ircd.log'");
|
||||
|
||||
ca->file = strdup("ircd.log");
|
||||
ca->flags |= LOG_ERROR;
|
||||
AddListItem(ca, conf_log);
|
||||
}
|
||||
|
||||
int init_conf(char *rootconf, int rehash)
|
||||
{
|
||||
config_status("Loading IRCd configuration ..");
|
||||
|
@ -1673,6 +1684,8 @@ int init_conf(char *rootconf, int rehash)
|
|||
RunHook0(HOOKTYPE_REHASH_COMPLETE);
|
||||
}
|
||||
do_weird_shun_stuff();
|
||||
if (!conf_log)
|
||||
make_default_logblock();
|
||||
nextconnect = TStime() + 1; /* check for autoconnects */
|
||||
config_status("Configuration loaded without any problems ..");
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue