1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-08 04:23:13 +02:00

+- Added support for nested comments in the configuration file (by chasm)

+- Added chasm to /info
This commit is contained in:
stskeeps
2001-08-22 13:06:06 +00:00
parent d5b5fa710c
commit a8f79f88db
3 changed files with 17 additions and 2 deletions
+2
View File
@@ -813,3 +813,5 @@ seen. gmtime warning still there
- Moved FAILOPER_WARN define to set::options::fail-oper-warn
- Fixed an alias {} bug found by James-Bond
- Moved SHOWCONNECTINFO define to set::options::show-connect-info
- Added support for nested comments in the configuration file (by chasm)
- Added chasm to /info
+13 -2
View File
@@ -587,16 +587,27 @@ static ConfigFile *config_parse(char *filename, char *confdata)
else if (*(ptr+1) == '*')
{
int commentstart = linenumber;
int commentlevel = 1;
for(ptr+=2;*ptr;ptr++)
{
if ((*ptr == '*') && (*(ptr+1) == '/'))
if ((*ptr == '/') && (*(ptr+1) == '*'))
{
commentlevel++;
ptr++;
break;
}
else if ((*ptr == '*') && (*(ptr+1) == '/'))
{
commentlevel--;
ptr++;
}
else if (*ptr == '\n')
linenumber++;
if (!commentlevel)
break;
}
if (!*ptr)
{
+2
View File
@@ -1958,6 +1958,8 @@ void m_info_send(sptr)
me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :| * assyrian <assyrian@unrealircd.org>",
me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :| * chasm <chasm@unrealircd.org>",
me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :|", me.name, RPL_INFO, sptr->name);
sendto_one(sptr, ":%s %d %s :| Previous versions:",
me.name, RPL_INFO, sptr->name);