information. At this time, all join/leave messages are shown.
This is enabled by a new option, show_console.
Closes #12452.
+2008-05-03 Makoto Matsushita <matusita@galdvalion.matatabi.or.jp>
+
+ * etc/dot.keitairc, lib/Keitairc/Config.pm,
+ lib/Keitairc/IrcCallback.pm: join/leave\e$B%a%C%;!<%8$r$^$H$a$FI=<($9\e(B
+ \e$B$k%7%9%F%`%a%C%;!<%8MQ\e(B(\e$B2>A[\e(B)\e$B%A%c%s%M%k$rI=<($9$k$?$a$N%*%W%7%g%s$r\e(B
+ \e$BDI2C\e(B (thanks to Takahashi Yoshihiro)\e$B!%\e(B Closes #12452.
+
2008-05-02 Makoto Matsushita <matusita@jp.FreeBSD.org>
* keitairc, etc/dot.keitairc, lib/Keitairc/Config.pm,
#
# sample ~/.keitairc for keitairc 2.x
#
-# $Id: dot.keitairc,v 1.10 2008-05-02 14:50:12 matusita Exp $
+# $Id: dot.keitairc,v 1.11 2008-05-02 15:22:47 matusita Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/etc/dot.keitairc,v $
################################################################
# Set to this value to '0' to disable.
# show_joinleave = 0
+# Create '*console*' channel for gathering IRC system message.
+# Works with show_joinleave is not zero.
+# show_console = 1
+
# Set to 1 if you wanna daemonize keitairc.
# daemonize = 1
# -*-perl-*-
# Keitairc::Config
-# $Id: Config.pm,v 1.10 2008-05-02 14:49:23 matusita Exp $
+# $Id: Config.pm,v 1.11 2008-05-02 15:22:47 matusita Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/Keitairc/Config.pm,v $
#
# Copyright (c) 2008 Jun Morimoto <morimoto@mrmt.net>
use_cookie cookie_ttl session_ttl
web_port web_title web_lines web_root
web_username web_password web_host
- show_newmsgonly show_joinleave ping_delay reconnect_delay
+ show_newmsgonly show_joinleave show_console
+ ping_delay reconnect_delay
smtp_server smtp_from smtp_to debug
template_dir version daemonize pid_dir pid_file plugin_dir
reverse_message reverse_recent reverse_unread)
# -*-perl-*-
# Keitairc::IrcCallback
-# $Id: IrcCallback.pm,v 1.7 2008-05-02 14:49:23 matusita Exp $
+# $Id: IrcCallback.pm,v 1.8 2008-05-02 15:22:47 matusita Exp $
# $Source: /home/ishikawa/work/keitairc/tmp/keitairc/lib/Keitairc/IrcCallback.pm,v $
#
# Copyright (c) 2008 Jun Morimoto <morimoto@mrmt.net>
$channel =~ s/ .*//;
$ib->join($channel);
- if($who ne $cf->irc_nick()){
- my $cid = $ib->name2cid($channel);
- $ib->add_message($cid, "$who joined") if ($cf->show_joinleave());
+ if($who ne $cf->irc_nick() && $cf->show_joinleave()) {
+ my $cid;
+ if ($cf->show_console()) {
+ my $ch = $channel;
+ Encode::from_to($ch, 'jis', 'euc-jp');
+ $cid = $ib->name2cid("*Console*");
+ $ib->add_message($cid, "$who joined to $ch");
+ } else {
+ $cid = $ib->name2cid($channel);
+ $ib->add_message($cid, "$who joined");
+ }
}
$heap->{Irc}->yield(who => $channel);
my $cid = $ib->name2cid($channel);
if($who eq $cf->irc_nick()){
$ib->part($cid);
- } else {
- $ib->add_message($cid, "$who leaves") if ($cf->show_joinleave());
+ } elsif ($cf->show_joinleave()) {
+ if ($cf->show_console()) {
+ my $ch = $channel;
+ Encode::from_to($ch, 'jis', 'euc-jp');
+ $ib->add_message($ib->name2cid("*Console*"),
+ "$who leaves from $ch");
+ } else {
+ $ib->add_message($cid, "$who leaves");
+ }
}
$ib->remove_nick($cid, $who);
$heap->{seen_traffic} = 1;