html/lwho.pl


   1 # This script adds command /lwho that shows 
   2 # locally logged users in current window
   3 
   4 
   5 $VERSION = '0.01a';
   6 %IRSSI = (
   7  authors     => 'Mika',
   8  contact     => '[Mika] @ IRCnet',
   9  name        => 'Local who',
  10  description => 'Displays users logged on system in current window, simple one',
  11  license     => '-',
  12  url         => '-',
  13  changed     => 'none',
  14  bugs        => 'none?'
  15 );
  16 
  17 
  18 use Irssi;
  19 use Sys::Hostname;
  20 
  21 Irssi::command_bind('lwho' => sub {
  22         my $floodi = " ---- users logged on system \cB". hostname ."\cB";
  23         my $output = `w`;
  24         $floodi =~ s/ - $//;
  25         Irssi::active_win()->print("$floodi\n$output ----", MSGLEVEL_CRAP);
  26     }
  27 );
  28 
  29 Irssi::print("local who $VERSION by [Mika]");