< Day Day Up > |
Hack 11 Fix Channel Problems with CHANFIX
EFnet is the oldest IRC network in the world and does not use IRC Services. But it's CHANFIX to the rescue if problems occur in your channel. Many IRC users are familiar with Services. NickServ and ChanServ keep order on IRC and make problems like "nick juping" (someone preventing your reconnecting by using your nickname) and "channel takeover" a rare event on many IRC networks. However, IRC Services as we know it today was first written in 1995 by Brian "Morpher" Smith and was implemented on the DALnet IRC network, which started up in 1994. The EFnet IRC network was created in 1988 and is the oldest and one of the largest networks in the world. By 1995, EFnet had achieved 15,000 concurrent users, which was quite a lot back then. To implement Services at that point would undermine the sometimes years of work that had gone into maintaining a channel. It could cause unjust channel takeovers if one user managed to register a channel before the real founder. People who regularly use the same nickname could lose out by being offline when NickServ was implemented and find that someone else had registered their nickname. For those reasons, EFnet has chosen to go without Services and will continue to do so for the foreseeable future. In its place, Chris "comstud" Behrens has coded a service known as CHANFIX, which monitors channels on the network, tracks who has ops and how often, and can restore channels to their original state in the event of a takeover or complete loss of ops due to splits or attacks against the channel operators. 2.8.1 Channel MonitoringCHANFIX is linked to EFnet via a custom Services module, giving it an omniscient presence, capable of seeing all channels and users on any server of the network. No registration is required; CHANFIX indexes all channels on EFnet. Every five minutes, CHANFIX does an index of every channel it sees on EFnet and keeps track of who has ops. Every time CHANFIX runs an index pass, it awards the user@host a single point and keeps a score for the past two weeks. Thus, the maximum score any user can have for a channel is 4032. There are, of course, some caveats to this procedure. First, CHANFIX does not index any channel with fewer than four users, and CHANFIX ignores all users without a working Ident (matched by the host mask *!~*@*), as well as all users with hosts that appear to be dynamic (*!*@*dialup* and *!*@*ppp* for example). The reasons why will be made clear later. In addition, CHANFIX will index only if 75% or more of the network is linked. CHANFIX will not run any indexes when it's on the short side of a major split. The following is an example of a CHANFIX score list for a channel: <CHANFIX> Top 10 scores for channel "#windows" in the database: <CHANFIX> 3740, 3714, 3682, 3497, 3478, 3448, 3402, 3304, 3196, 3155 <CHANFIX> Top 10 scores for current ops in channel "#windows": <CHANFIX> 3740, 3714, 3682, 3497, 3478, 3448, 3402, 3196, 3155, 3074 <CHANFIX> Top 10 scores for current non-ops in channel "#windows": <CHANFIX> 3714, 2843, 2310, 2122, 1429, 1038, 203, 192, 58 Here's an example of a score for a specific user@host: <CHANFIX> User "windows@pound.windows.bot"'s score in channel "#windows": 3714 2.8.2 Automatic CHANFIXUpon a channel becoming "opless," either from the last remaining channel operator losing the link to her server or from an op accidentally performing a de-op of all ops, CHANFIX immediately begins the process for an automatic fix of the channel. CHANFIX first checks its database for the channel and breaks the scores down from highest to lowest, to create a one-hour "cycle down" period split into five-minute blocks. This causes the highest-scored ops to be re-opped first and the lowest-scored ops to be re-opped last. CHANFIX then joins the channel and removes +i, +l, or +b modes that could be preventing scored ops from joining the channel. If one or more of the current ops in the channel have scores in the top 8.3% of all of the scores in the database, they are opped immediately. If none of the current ops are in the top 8.3% or CHANFIX can't op five ops, CHANFIX waits five minutes until the next pass or until the channel has five ops again. When CHANFIX checks the channel again 5 minutes later, it tries to op the top 16.6% scored ops in the database (a high-scoring op could have joined in the past 5 minutes, so it includes all previous scores). This continues for 60 minutes or until there are 5 ops in the channel again. After 60 minutes, CHANFIX will op anyone with a score as soon as he enters the channel. This means that it's possible for someone who had ops for 30 seconds (perhaps when you were having fun in your channel) to become the guy who gets ops after a catastrophic channel event, so be careful who you op, always! The following is an example of an automatic CHANFIX: * BBS sets mode: -o BBS <BBS> Oops, I messed up! * CHANFIX (services@services.int) has joined #windows * services.int sets mode: +o CHANFIX * CHANFIX sets mode: -bbbb *!*@152.3.* *!*@thefoundry.co.uk *!*@*.no *!*@*.duke.edu * CHANFIX sets mode: -b *!*@pool-141-153-*.mad.east.verizon.net * CHANFIX sets mode: +o BBS <CHANFIX> 1 client should have been opped. * CHANFIX (services@services.int) has left #windows *** 5 minutes later *** * CHANFIX (services@services.int) has joined #windows * services.int sets mode: +o CHANFIX * CHANFIX sets mode: +ooo Zorlak WinSpy WinInfo <CHANFIX> 3 clients should have been opped. * CHANFIX (services@services.int) has left #windows 2.8.3 Manual CHANFIXDue to the nature of EFnet, channel takeovers do happen from time to time. Sometimes a client gets hacked or an op may accidentally op the wrong person. When this happens, CHANFIX can be called manually by a CHANFIX administrator and instructed to fix a channel and restore ops to the regular ops. In addition, CHANFIX is used to fix channel desyncs. While increasingly rare, it is possible for a channel to be seen as slightly different from server to server. Fixing channel desyncs is a side effect of how CHANFIX fixes channels when called manually. The following is an example of a channel that's been taken over: [14:52] <CHANFIX> Top 10 scores for channel "#windows" in the database: [14:52] <CHANFIX> 3740, 3714, 3682, 3497, 3478, 3448, 3402, 3304, 3196, 3155 [14:52] <CHANFIX> Top 10 scores for current ops in channel "#windows": [14:52] <CHANFIX> 3, 1, 1, 1, 1, 1, 1, 1, 1 [14:52] <CHANFIX> Top 10 scores for current non-ops in channel "#windows": [14:52] <CHANFIX> 3714, 2843, 2310, 2122, 1429, 1038, 203, 192, 58 You can clearly see that the channel has been taken over. Someone got ops about 15 minutes ago, then waited about 10 minutes before performing a mass de-op, then a mass op of their friends or some IRC bots. When you trigger a manual fix, CHANFIX first inspects the channel's timestamp. If it's 2 or greater, CHANFIX SJOINs the channel with a TS-1 [Hack #84]. This causes all servers on the network to yield to CHANFIX as the older channel, and each server de-ops all ops in the channel. The SJOIN also clears +l, +b, and +i channel modes, allowing the original ops to join the channel if they were banned. From this point on, CHANFIX treats the channel like any normally opless channel and performs the preceding automatic steps. If the channel were simply desynced, the reset of the TS and clearing of modes on all servers would likewise fix that problem, and the automatic CHANFIX process would take over. In the unlikely event that a channel already has a TS of 1 or 0, CHANFIX joins with the same TS and sends SA (Services Administrator) modes to de-op and reset modes. Letting the individual servers change modes is simply a cleaner solution. The following is an example of using CHANFIX to fix a channel takeover. Notice the TS change and the removal of +b and +l modes: <TO-Leader> Haha, we took over your channel! <BBS> Not for long! -> [msg(chanfix)] chanfix #windows * irc.choopa.net sets mode: -oooo TO-One TO-Two TO-Three TO-Four * irc.choopa.net sets mode: -oooo TO-Five TO-Six TO-Seven TO-Eight * irc.choopa.net sets mode: -oo TO-Nine TO-Leader * irc.choopa.net sets mode: -v WinInfo -irc.choopa.net:#windows- *** Notice -- TS for #windows changed from 1078875452 to 1078875451 * services.int sets mode: -l * CHANFIX (services@services.int) has joined #windows * services.int sets mode: +o CHANFIX * CHANFIX sets mode: -bbbb *!*@152.3.* *!*@thefoundry.co.uk *!*@*.no *!*@*.duke.edu * CHANFIX sets mode: -b *!*@pool-141-153-*.mad.east.verizon.net * CHANFIX sets mode: +o BBS <CHANFIX> 10 clients should have been deopped. <CHANFIX> 1 client should have been opped. * CHANFIX (services@services.int) has left #windows *** 5 minutes later *** * CHANFIX (services@services.int) has joined #windows * services.int sets mode: +o CHANFIX * CHANFIX sets mode: +ooo Zorlak WinSpy WinInfo <CHANFIX> 3 clients should have been opped. * CHANFIX (services@services.int) has left #windows 2.8.4 Interesting CHANFIX FactsEFnet server operators cannot manually op or de-op anyone unless they are channel operators themselves. EFnet operators also can't join +i channels or bypass bans as on some other networks. This is what makes CHANFIX such a valuable resource. CHANFIX administrators cannot see into +i channels to find out who currently has ops. All they can see are the scores. This ensures users' privacy on the network, while still allowing the operators to do their jobs. CHANFIX does not display the nicks of scored ops to the network operators. CHANFIX was designed to provide protection to large, stable channels on EFnet while maintaining the privacy of the users. CHANFIX is not a replacement for good channel management skills. It is possible to set a ban on CHANFIX, so it will stop indexing and fixing channels that abuse the service. Running a channel on EFnet requires trusted friends and, in most cases, a good set of IRC bots to handle ops and small attacks. 2.8.5 See AlsoFor more information on CHANFIX on EFnet, see http://www.efnet.org/chanfix. If you are an EFnet user and need a manual CHANFIX, please join the channel #chanfix, but be sure to read the aforementioned URL first. While CHANFIX itself is closed source, Thomas "Beige" Mannfred Carlsson and Joost "Garion" Vunderink have reverse-engineered CHANFIX's processes and written an open source (http://opensource.org) version of CHANFIX. It's currently being used on EFnet in a monitor-only capacity. You can learn more about it at http://www.garion.org/ocf. —Hunter Pine |
< Day Day Up > |