summaryrefslogtreecommitdiffstats
path: root/scripts/lwho.pl
diff options
context:
space:
mode:
authorAlexander Færøy2014-05-31 13:10:46 +0200
committerAlexander Færøy2014-05-31 13:10:46 +0200
commit2d0759e6ca5767b48bcc85bf38c2c43d5f0b63b1 (patch)
tree1c5e6d817c88e67b46e216a50e0aef5428bf63df /scripts/lwho.pl
parent2d080422d79d1fd49d6c5528593ccaaff9bfc583 (diff)
downloadscripts.irssi.org-2d0759e6ca5767b48bcc85bf38c2c43d5f0b63b1.tar.bz2
Import scripts from scripts.irssi.org
Diffstat (limited to 'scripts/lwho.pl')
-rw-r--r--scripts/lwho.pl29
1 files changed, 29 insertions, 0 deletions
diff --git a/scripts/lwho.pl b/scripts/lwho.pl
new file mode 100644
index 0000000..5a70079
--- /dev/null
+++ b/scripts/lwho.pl
@@ -0,0 +1,29 @@
+# This script adds command /lwho that shows
+# locally logged users in current window
+
+
+$VERSION = '0.01a';
+%IRSSI = (
+ authors => 'Mika',
+ contact => '[Mika] @ IRCnet',
+ name => 'Local who',
+ description => 'Displays users logged on system in current window, simple one',
+ license => '-',
+ url => '-',
+ changed => 'none',
+ bugs => 'none?'
+);
+
+
+use Irssi;
+use Sys::Hostname;
+
+Irssi::command_bind('lwho' => sub {
+ my $floodi = " ---- users logged on system \cB". hostname ."\cB";
+ my $output = `w`;
+ $floodi =~ s/ - $//;
+ Irssi::active_win()->print("$floodi\n$output ----", MSGLEVEL_CRAP);
+ }
+);
+
+Irssi::print("local who $VERSION by [Mika]");