Package: irssi-scripts
Version: 20090526
Severity: normal
Tags: patch

I had a problem for about a year or so with bitlbee_tab_completion.pl,
that is, I autoload the script when irssi starts, but although the
script is loading, it does not work ! I think that the reason is the
following:

  1. bitlbee_tab_completion.pl when loaded checks for the currently open
  channels for a valid '&bitlbee' channel, then it runs these lines:

                      $get_completions = 1;
                Irssi::server_find_tag($bitlbee_server_tag)->send_raw( 
'COMPLETIONS' );

  since I autoload the script at irssi start, hence, there are no
  servers (& hence no channels) joined yet.

  2. there is a subroutine run at 'channel sync' signal, this subroutine
  also checks if the current channel is a valid '&bitlbee' channel, yet
  it doesn't send a 'COMPLETIONS' command to its server if it is a valid
  &bitlbee channel.

  So I patched that subroutine to run the lines I mentioned above if the
  current channel is found to be a valid '&bitlbee' channel.

-- System Information:
Debian Release: 5.0
  APT prefers jaunty-updates
  APT policy: (500, 'jaunty-updates'), (500, 'jaunty-security'), (500, 
'jaunty-proposed'), (500, 'jaunty-backports'), (500, 'jaunty')
Architecture: i386 (i686)

Kernel: Linux 2.6.28-15-generic (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages irssi-scripts depends on:
ii  irssi                  0.8.12-6ubuntu1.1 terminal based IRC client

Versions of packages irssi-scripts recommends:
ii  libwww-perl                   5.820-1    WWW client/server library for Perl

Versions of packages irssi-scripts suggests:
ii  elinks  0.13~20090727-1                  advanced text-mode WWW browser
ii  epiphan 2.26.1-0ubuntu1                  Intuitive GNOME web browser - Geck
ii  firefox 3.0.13+nobinonly-0ubuntu0.9.04.1 safe and easy web browser from Moz
ii  firefox 3.5.2+nobinonly-0ubuntu0.9.04.1  safe and easy web browser from Moz
pn  libdbi- <none>                           (no description available)
ii  lynx-cu 2.8.7dev11-2                     Text-mode WWW Browser with NLS sup
ii  net-too 1.60-21ubuntu1                   The NET-3 networking toolkit
ii  perl    5.10.0-19ubuntu1.1               Larry Wall's Practical Extraction 
ii  perl-mo 5.10.0-19ubuntu1.1               Core Perl modules
ii  w3m [ww 0.5.2-2build1                    WWW browsable pager with excellent

-- no debconf information
Fix for the case of the script being loaded before joining a bitlbee service
--- /tmp/bitlbee_tab_completion.pl      2009-06-18 22:52:33.000000000 +0300
+++ bitlbee_tab_completion.pl   2009-06-18 22:56:53.000000000 +0300
@@ -25,6 +25,8 @@
         if( $channel->{topic} eq "Welcome to the control channel. Type 
\x02help\x02 for help information." ){
                 $bitlbee_server_tag = $channel->{server}->{tag};
                 $bitlbee_channel = $channel->{name};
+                     $get_completions = 1;
+                Irssi::server_find_tag($bitlbee_server_tag)->send_raw( 
'COMPLETIONS' );
         }
 };
 

Reply via email to