Is there an way to set the default mode for new clients and/or channels? Thanks, Jerome
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 02/24/11 17:03, Jerome Rose wrote:
Is there an way to set the default mode for new clients and/or channels?
See the [Channels] section of the configuration, specifically the "Modes =" directive.
For example:
[Channel] # Pre-defined channels can be configured in [Channel] sections. # Such channels are created by the server when starting up and even # persist when there are no more members left. # Persistent channels are marked with the mode 'P', which can be set # and unset by IRC operators like other modes on the fly. # There may be more than one [Channel] block, one for each channel.
# Name of the channel Name = #ngric
# Topic for this channel Topic = Welcome
# Initial channel modes Modes = tnk
Thanks, Jerome
- -- It has been said that "hate" is a powerful emotion, perhaps that's why I'm so strong.
- -evilghost
Also sprach Jerome Rose, at 2/24/11 4:03 PM:
Is there an way to set the default mode for new clients and/or channels?
In client.c, there's Init_New_Client(), which apparently takes a mode string.
You could add a define in defines.h for default umodes and include that, so
if( Modes ) Client_SetModes(client, Modes);
would skip the if() since there are always modes to apply. There is probably a more elegant way to do this.
For now I added a CLIENT_DEFAULT_MODE to defines and added it to the Init_New_Client call in the local client init function (line 146 in client.c). Works just fine for my current purposes, if I get some free time I'll look into doing the same for channels, and adding config parsing so they can be set at run time. If I do I'll send in a patch.
Thanks for the quick replies. -Jerome
On Thu, Feb 24, 2011 at 6:53 PM, Lucien Pullen drurowin@gmail.com wrote:
Also sprach Jerome Rose, at 2/24/11 4:03 PM:
Is there an way to set the default mode for new clients and/or channels?
In client.c, there's Init_New_Client(), which apparently takes a mode string.
You could add a define in defines.h for default umodes and include that, so
if( Modes ) Client_SetModes(client, Modes);
would skip the if() since there are always modes to apply. There is probably a more elegant way to do this. _______________________________________________
ngIRCd Mailing List: ngIRCd-ML@arthur.barton.de http://arthur.barton.de/mailman/listinfo/ngircd-ml
Hi Jerome!
Am Fr, 25.02.2011, 03:11 schrieb Jerome Rose:
For now I added a CLIENT_DEFAULT_MODE to defines and added it to the Init_New_Client call in the local client init function (line 146 in client.c). Works just fine for my current purposes,
Good to hear!
if I get some free time I'll look into doing the same for channels, and adding config parsing so they can be set at run time. If I do I'll send in a patch.
Patches are welcome as always :-) Please let us/me know if you need help.
Regards Alex