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:
@@ -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
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user