previously, any client could join in this configuration:
[Channel]
Name = #test
Modes = tnk
KeyFile = /tmp/foobar
fix this by checking for zero-length key before comparing
key to channel key.
if (!strchr(Chan->modes, 'k'))
return true;
if (!strchr(Chan->modes, 'k'))
return true;
- if (strcmp(Chan->key, Key) == 0)
- return true;
if (*Key == '\0')
return false;
if (*Key == '\0')
return false;
+ if (strcmp(Chan->key, Key) == 0)
+ return true;
file_name = array_start(&Chan->keyfile);
if (!file_name)
file_name = array_start(&Chan->keyfile);
if (!file_name)