From 7f53ebd4fd905e4aff8109bbf5c5e7d75686c200 Mon Sep 17 00:00:00 2001 From: Ilkka Oksanen Date: Mon, 9 Jun 2014 14:04:57 +0200 Subject: ircd-irc2: disable netsplit detection By default ircd goes to netsplit mode if the amount of connected users or servers go below a certain limit. Default limits are less than 65000 users connected or less than 80 servers connected. This means that in practice all brew installed ircds are always in netsplit mode. In netsplit mode no one can be channel operator. Channel operators are useful already in small ircd setups. Therefore it's best to disable netsplit detection. You need to administrate a popular IRC network with multiple servers for netsplit detection to be useful. Closes #29993. Signed-off-by: Jack Nagel --- Library/Formula/ircd-irc2.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Library/Formula') diff --git a/Library/Formula/ircd-irc2.rb b/Library/Formula/ircd-irc2.rb index c2f36952c..bc6ec7647 100644 --- a/Library/Formula/ircd-irc2.rb +++ b/Library/Formula/ircd-irc2.rb @@ -34,8 +34,17 @@ class IrcdIrc2 < Formula "--mandir=#{man}", "CFLAGS=-DRLIMIT_FDMAX=0" + build_dir = `./support/config.guess`.chomp + + # Disable netsplit detection. In a netsplit, joins to new channels do not + # give chanop status. + inreplace "#{build_dir}/config.h", /#define DEFAULT_SPLIT_USERS\s+65000/, + "#define DEFAULT_SPLIT_USERS 0" + inreplace "#{build_dir}/config.h", /#define DEFAULT_SPLIT_SERVERS\s+80/, + "#define DEFAULT_SPLIT_SERVERS 0" + # The directory is something like `i686-apple-darwin13.0.2' - system "make", "install", "-C", `./support/config.guess`.chomp + system "make", "install", "-C", build_dir (etc/"ircd.conf").write default_ircd_conf end -- cgit v1.2.3