diff options
| author | ailin-nemui | 2016-04-27 13:38:51 +0200 |
|---|---|---|
| committer | ailin-nemui | 2016-04-27 13:38:51 +0200 |
| commit | e57ab885f902dff656f918f5e5b08977af7daaaf (patch) | |
| tree | a4248c323bc070200ec18d390ea34cf822ce9fe4 /scripts | |
| parent | 16c1715c797fe327b256573ca15d0584b63e516e (diff) | |
| parent | f6861fb4b454bf83db54047d082a4a1e2101d239 (diff) | |
| download | scripts.irssi.org-e57ab885f902dff656f918f5e5b08977af7daaaf.tar.bz2 | |
Merge pull request #261 from ailin-nemui/nm2
update nm2
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/nm2.pl | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/nm2.pl b/scripts/nm2.pl index 08ec53d..b553bf2 100644 --- a/scripts/nm2.pl +++ b/scripts/nm2.pl @@ -4,7 +4,7 @@ use v5.14; use List::Util qw(min max); use Hash::Util qw(lock_keys); -our $VERSION = '2.0-dev'; # cb10e88bcd58d0c +our $VERSION = '2.1'; # a42b713aaa38823 our %IRSSI = ( authors => 'Nei', contact => 'Nei @ anti@conference.jabber.teamidiot.de', @@ -116,6 +116,13 @@ my $format_re = qr/ %(?=[}%{]) sub update_expando { my ($mode, $server, $target, $nick, $space) = @_; my $t_add; + if (exists $Irssi::Script::{'realnames::'} + && (my $code = 'Irssi::Script::realnames'->can('_get_nick_chan'))) { + if (my $i = $code->($server, $target, $nick)) { + $nick = $i->{n}{realname} + if length $i->{n}{realname}; + } + } my $nl = length $nick; my $pad_len = max(0, $space - $nl); if ($S{truncate_nick}) { @@ -554,7 +561,9 @@ init(); # Changelog # ========= -# 2.0-dev +# 2.1 - support realnames script +# +# 2.0 # - fix crash if xmpp action signal is not registered (just ignore it) # - do not grow either when using no-shrink with maxlength # - hopefully fix alignment in xmpp muc |
