mirror of
https://github.com/pissnet/pissircd.git
synced 2025-07-27 05:22:24 +01:00
- Fixed a bug if me::info was set to "".
This commit is contained in:
parent
c38621994b
commit
9b9aa1d80f
2 changed files with 16 additions and 0 deletions
1
Changes
1
Changes
|
@ -281,3 +281,4 @@
|
|||
- doc/example.conf now simply refers to unreal32docs.html for oper flags (#0001973)
|
||||
reported by vonitsanet and AngryWolf.
|
||||
- Fixed an MacOS X crash-on-first-connect if SSL was enabled (#0001982), reported by bit.
|
||||
- Fixed a bug if me::info was set to "".
|
||||
|
|
15
src/s_conf.c
15
src/s_conf.c
|
@ -2879,6 +2879,8 @@ int _test_me(ConfigFile *conf, ConfigEntry *ce)
|
|||
|
||||
if (cep->ce_vardata)
|
||||
{
|
||||
int valid = 0;
|
||||
char *p;
|
||||
if (strlen(cep->ce_vardata) > (REALLEN-1))
|
||||
{
|
||||
config_error("%s:%i: too long me::info, must be max. %i characters",
|
||||
|
@ -2886,6 +2888,19 @@ int _test_me(ConfigFile *conf, ConfigEntry *ce)
|
|||
errors++;
|
||||
|
||||
}
|
||||
/* Valid me::info? Any data except spaces is ok */
|
||||
for (p=cep->ce_vardata; *p; p++)
|
||||
if (*p != ' ')
|
||||
{
|
||||
valid = 1;
|
||||
break;
|
||||
}
|
||||
if (!valid)
|
||||
{
|
||||
config_error("%s:%i: empty me::info, should be a server description.",
|
||||
ce->ce_fileptr->cf_filename, ce->ce_varlinenum);
|
||||
errors++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(cep = config_find_entry(ce->ce_entries, "numeric")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue