-
Notifications
You must be signed in to change notification settings - Fork 102
Initial cmodes should be configurable #31
Comments
|
I don't see autochanmodes in the code. |
You don't see it because it doesn't exist. Here is where the code exists that sets channel modes on new channels, and it's hardcoded to +nt. |
|
I am porting it over |
I have ported the code over and it works. I would like someone to check it off before I commit it to the main tree. My test cases are as following: Case 1: Default config,
Test passed. Case 2:
Test passed. Case 3:
Test results show that it will silently ignore mode flags that it does not recognize. Is this expected behavior? |
Please also test without |
Case 4:
Test passed. |
@jillest has been suggesting that validation be done on channel joins and config rehashing. I have added code that places log notices as well as firing server notices:
It is as simple as adding unsigned char * ch;
for(ch = ConfigChannel.autochanmodes; *ch; *ch++)
{
if(!chmode_table[*ch].set_func == chm_simple)
{
ilog(L_MAIN, "WARNING: Invalid channel mode %c set in channel::autochanmodes", *ch);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Invalid channel mode %c set in channel::autochanmodes", *ch);
continue;
}
else if (chmode_table[*ch].set_func == chm_nosuch) {
ilog(L_MAIN, "WARNING: Invalid channel mode %c set in channel::autochanmodes", *ch);
sendto_realops_snomask(SNO_GENERAL, L_ALL,
"Invalid channel mode %c set in channel::autochanmodes", *ch);
continue;
}
} to the needed places, ( |
Currently, m_join.c hardcodes the default cmodes on an initial channel creation to +nt. Could this be configurable? I'm thinking something like this to do an override of the server default:
channel {
default_cmodes = "+sn";
}
Thank you.
The text was updated successfully, but these errors were encountered: