irc2.11 には 色々な機能が盛り込まれています。changelog や roadmap を見ると色々な機能が有るのが分かります。目立った新機能と言えば Unique ID (UID) が生成されることでしょう。Unique ID とは、サーバのPrefix(SID) + サーバ内の固有の数字(UID) という 16進9桁の組合せから出来ています。この Unique ID とは色々なところで利用されるようになります。
XXXYZZZZZ の16進9桁 Server ID X... ISO3166 Country Code Y... Server Number User ID Z... Serial Number
尚、Server ID の Country Prefix には、ISO3166 countrycodeに基づき国別に分類されます。
"2768ABC78" UID. In this example 276 is the ISO3166 code for Germany, 8 the ID of the german server and "ABC78" the random string generated by the server.
The Server ID on IRCnet is 4 characters long and begins with 3 digits that are assigned based on the geographical location via ISO3166 countrycode and ends with an identifier of the server in the TLD.
参照: New features in the IRCnet ircd 2.11
また、サーバに接続すると、以下のように表示された行が有り、メッセージ番号042と言うのが新設されています。
:<server name> 042 <nick> 392AAAAA6 :your unique ID
ユーザから見て、どういうところで活躍しているか見てみましょう。
例えば、サーバスプリットが起こり、誰かが貴方のニックネームを奪おうとした、若しくはたまたまぶつかってしまった。と言うことが起これば nick collision というかたちでサーバ側からKILLされサーバから切断されますが、それを防ぐための対策としても使われています。サーバスプリットが発生し、リンクが復帰した後、nick collision が運悪く起こってしまった場合、その Unique ID が一時的に貴方のニックネームとして代用され、切断されるのを防いでいます。
もっと、重要なことは、チャンネルを奪われる可能性が低くなると言うことです。過去に見られた古典的な乗っ取りの手法の一つとして、クラック等を行ったホストを使用し、該当するサーバに見張り用のクライアントを設置。サーバスプリットが発生したとき、他の人のnicknameを奪い、自らのボットに他の人のnickname をボットに付け、サーバスプリットが回復したとき、nick collision で KILL させ、サーバから切断させるという手法が使われてきました。これの解決方法として、`ERROR: Nickname :Nick/channel is temporarily unavailable' と言うのが有りましたが、一定時間過ぎると、使用可能となってしまい、抜本的な解決方法にはなりませんでした。その為、新しくUIDが導入され、nick collision を検出した場合、代替のnickname に Unique ID が使用されるようになり、KILL 無くす事が可能となりました。その為、 KILL を使ったチャンネル紛争は容易には出来なくなると予想されます。
実際に流れを紹介してみましょう。
例えば、#gamer というチャンネルがあったとします。そして、現時点での所有者(チャンネルオペレータ)は日本人側にあったと仮定します。そして、第三者(外国人)がそのチャンネルを欲しく、強行手段にでました。
*.jp server --- *.pl server (#gamerにjoinしてる) (dummy) nick1 abuse1 nick2 abuse2 nick3 abuse3 nick4 abuse4 abuse5 (nickname)監視用
という合計9個の nickname が各々のサーバに存在したとします。サーバ間リンクが正常な場合、お互い同一ネットワーク上に存在することになります。しかし、何らかの不調でサーバ間リンク「*.jp <-> *.pl」 間が切断された場合、各々のサーバは独立します。すなわち、*.pl server 側からは、nick1, nick2, nick3, nick4 が見えなく(存在しなく)なります。そのとき、*.jp server 側に存在するnickname を *.pl server 側で搾取してしまった場合どうなるでしょう。ここで考えてみてください。irc では、nickname はユニークな存在であり、重複が許されないという仕様が定義されています。そして、サーバ間接続が復帰した場合、重複するnicknameが検出され、お互い、切断されてしまいます。
*.jp server <- 切断 -> *.pl server
nick1 abuse1 -> nick1
nick2 abuse2 -> nick2
nick3 abuse3 -> nick3
nick4 abuse4 -> nick4
abuse5
↓
*.jp server <- 復帰 -> *.pl server
nick1 <- 衝突 -> nick1
nick2 <- 衝突 -> nick2
nick3 <- 衝突 -> nick3
nick4 <- 衝突 -> nick4
abuse5
↓
KILLされ、お互いのユーザ(nick1-4)が切断される。
↓
自分のクライアントをrejoin or joinさせることにより、チャンネルオペレータを搾取可能
上記のようなことを防ぐために、nick collision によるKILLを無くそうという試みとなります。
詳しくは後述しますが、特定のサーバに接続している人を Ban したい時などに役に立ちます。また、逆引きホストは、任意で設定できる物であり、FQDNで指定するのは広範囲すぎて難しい場合が多いでしょう。また、できたとしても、数が多すぎ、MaxBansの制限値(30個)を簡単に越えてしまうこともしばしば有ります。そこで、特定のircサーバからの接続を拒否することができます。尚、irc server 内部的には、UIDで処理されているようです。その為、
Example: mode <channel> +b 616*!*@*
と記述することにより、ポーランドのサーバからのJOINを全て拒否することが可能になります。
補足となりますが、相手のサーバがUnique IDを利用できるバージョン(irc2.11.x以降)で有れば、自分自身接続しているサーバが対応していなくても可能です。上記の例では、ポーランドのサーバは2.11になっているため、使用可能ということです。逆に言い換えれば、日本のサーバはUnique ID が使用出来ないため、外人が `+b 392*!*@*' としても、効果は有りません。全てのサーバが2.11になら無い限り、幸せになれないかもしれません。
応用的な使い方として、日本のサーバに繋いでいる人 と 特定のIRCサーバに繋いでいる人(例: irc1.us.ircnet.net) に繋いでいる人だけをJOIN可能にするには、次のようにする方法があります。日本のサーバに繋いでいる人だけと限定してしまえば、#chan:*.jp と※さほど変わらないでしょう。
Example: mode <channel> +IIi 392*!*@* 849*!*@*
※ splitしたとき等、他のサーバ(海外側)でチャンネルを取得される可能性が有るため、さほどとしました。
* Clients can use "NICK 0" to get their UID as a nick. Works during registration, too.
nick 0 とコマンドを入力すると、以下のようなメッセージを返します。
Example: nick 0 :tomocha!~tomocha@ThinkPad-X31.local.tomocha.net NICK :392AAAABB
これは、irc2.11.x 以降では `nickname 0' が特別扱いされ、自分自身のUnique ID を見ることが出来ます。尚、irc2.11.x 以前のバージョンで有れば、エラーとなり、以下のようなメッセージを返します。また、IRCでは数字から始まるニックネームは利用出来ません。ちなみに、IRCクライアントがこの機能を実装していないと、ニックネームの変更に失敗したとみなされ、ニックネームの最後に “_”や“0”を付けたりしてしまう可能性があります。LimeChatではこの問題が発生しました。
:<server name> 432 <nick> - :Erroneous Nickname
* New channel list type: R (aka reop hints). With the same syntax and behaviour as beI, it serves as a hint list for reopping opless channels. * Clients cannot set +R. (This restriction will be removed in 2.11.1)
irc2.11.0 時点では、サーバオペレータ のみが利用できるようになっています。尚、irc2.11.1 からはユーザが利用できるようになる予定です。
セーフチャンネル等で、サーバreopチャンネルフラグ(+r)の立っているチャンネルで、opless(オペレータ権限の無くなったチャンネル)になった際、サーバから一定の法則に基づき、チャンネルオペレータ権限をユーザに付ける機能があります(RFC2811 5.2.5 サーバReopメカニズム参照)。この機能を改良したものにあたるのが、+R(Reop Hints)となります。+R機能は、セーフチャンネルでなくとも使用可能(#から始まるチャンネルも可能)になります。また、oplessになってから約90分後にサーバ側よりチャンネルオペレータ権限が配布されます。使用方法は、+b/+e/+I と同じように、`nick!user@host'と記述します。
尚、reop hintが動作し、チャンネルにオペレータ権限が復帰したとき、以下のようにチャンネルにnoticeで表示されます。
:<server name> NOTICE <channel> :Enforcing channel mode +R (214)
現在の設定の一覧を取得するには、以下のように入力すれば取得できます。
Example: mode <channel> +R
* CIDR support in +beIR channelmodes.
今までは、ホスト部分には、IP or ホスト名でマスクを記述していましたが、サブネットマスク単位(CIDR)でも記述することが可能になりました。それに加え、UIDの構成の一部であるSIDでも ban を書けることが出来るようになったため、望まないユーザを確実に追い出すことが可能となります。
Example: mode <channel> +b 380*!*@*) Example: mode <channel> +b *!*@*.it bans, ban exceptions, invite に対して、CIDR 表記が対応。 Example: mode <channel> +b *!*@10.1.2.0/24
すなわち、今までで有れば、* [アスタリスク]を利用し、広範囲のマスクを記述していたが、的を的確に絞ることが可能となったという事になります。
その他の詳細は、 ROADMAP を参照してください。色々と修正された部分等が公開されています。また、ChangeLogも公開されていますし、公式サイトにも「New features in the IRCnet ircd 2.11」が公開されていますので、興味のある方は直接オリジナルを参照下さいませ。
詳細は hemp-patch の項を参照
irc2.11.0 では Nickname で次の文字列が使用出来なくなりました。特にNicknameに顔文字を使用されておられる方々は注意が必要となります(2.11.1 では使用出来るようになります)。また、日本のサーバ (WIDEパッチ)では、もともと記号等は使えないようになってる場合があります。
[|]{\}
irc2.11.0 に添付されている doc/2.11-New のファイルの中身です。
All:
* Nicknames cannot contain [|]{\} chars. (This restriction will be
removed in 2.11.1)
* Channel names cannot contain {\}~ chars. If used (or from remote),
they will be changed to [|]^ accordingly. (This restriction will be
removed in 2.11.1)
* New channel list type: R (aka reop hints). With the same syntax and
behaviour as beI, it serves as a hint list for reopping opless
channels.
* Clients cannot set +R. (This restriction will be removed in 2.11.1)
* CIDR support in +beIR channelmodes.
* +beIR channelmodes have new wildcard `#' matching any digit; note
that if ban starts with digit, it will match on UID, if with '#',
it will match on nickname.
* New stats k to show tklines (stats K shows klines).
Client:
* When collision occurs, clients get their nicks forcefully changed
to their UIDs. (Note: this requires no 2.10 server on the path
between these two clients!)
* Clients can use "NICK 0" to get their UID as a nick. Works during
registration, too.
* Channels now keep information who and when set the topic.
* LIST (if allowed) does not disconnect if client's sendQ fills.
* WHOIS now shows the time user signed on.
* LUSERS (and USERS, if defined) shows local and global usercount and
maximums.
* INVITE overriding ban shows inviter's n!u@h in channel notice.
* Support for text representation of user modes in USER command
during registration.
Operator:
* New server to server protocol, based on Unique IDs
* Operator broadcast message syntax has been changed to:
$$*.mask - message all users matching given server mask
$#*.mask - message all users matching given hostname mask
* Essential notices were moved from &LOCAL to &NOTICES
* Possibility of using port "0" in manual CONNECTs (even remote);
ircd will use port from ircd.conf
* Added DelayedKill feature to make ircd more responsible on rehash
on big servers with many clients and many klines.
* New server channel &CLIENTS with clients connects, quits and nick
changes (may be undefined during compilation).
* New command: TKLINE (syntax: TKLINE seconds user@host :reason),
available for services and (depending on O: flag) opers.
Admin:
* File layout changed slightly:
- localstatedir defaults to $(prefix)/var (autoconf did that!)
- logdir defaults to $(localstatedir)/log, not $(prefix)/var/log
- ircd_var_dir (where .pid and .tune are kept) defaults to
$(localstatedir)/run
- log files are no longer in $(prefix)/var/log/ircd/, instead
they are in $(logdir)
- log file names changed from $(logdir)/{users,rejects,auth}
to $(logdir)/ircd.{users,rejects,auth}
- config and log file names depend on $(IRCD) name.
* Ability to specify outgoing IP in C: line.
* I:line now requires both addr and name fields to match.
* I:line flags
D - restricted, when client has no reverse DNS.
E - client is exempted from K: lines.
e - client is exempted from X: lines.
F - fall-through to next I: if password did not match.
I - restricted, when client has no ident.
N - disable resolved hostname to be used.
M - disable resolved hostname to be shown.
R - restricted.
* Reject reason sent to client can be specified in iauth.conf.
* Client's username and hostname are checked for valid chars.
* C:lines can have negative ports to disable autoconnects; these
will be used when CONNECT with port "0" is used.
* STATS ? shows quick information about connected servers.
* STATS f, avaible to local operators only, shows detailed
information about client TCP connection.
* -t option (foreground mode) is now avaible even without DEBUGMODE
* Added SET command which makes possible to fine-tune certain
ircd values during runtime (like dbuf poolsize, autoconnect and client
accepting).
* Stats Z no longer computes real memory statistics unless DEBUGMODE
set.
* Stats l/L shows count in Bytes, not kBytes.
* SERVICE command changed, it uses SID now.
* O:line flags for better control
L - local operator (disables all remote functions)
P - removes penalty
p - allows flooding
& - allows joining &CLIENTS
A - enables all flags below
K - allows KILL (local and remote)
k - allows only local KILL
S - allows SQUIT (local and remote)
s - allows only local SQUIT
C - allows CONNECT (local and remote)
c - allows only local CONNECT
l - allows CLOSE
h - allows HAZH
d - allows DNS
r - allows REHASH
R - allows RESTART
D - allows DIE
e - allows SET
T - allows TKLINE
t - enables full TRACE and STATS L
* New config X-line.
* New module to iauth: mod_webproxy.
* socks and webproxy modules can connect to different ports.
* "delayed" execution mode for iauth.