diff options
author | Graham Barr <gbarr@pobox.com> | 2000-03-06 08:48:23 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2000-03-06 08:48:23 +0000 |
commit | 76d32cad37eb8b20aba87de2834fda7929400eea (patch) | |
tree | 3d8b9fc5fd82d596fb8bc712f802283b29ead86d | |
parent | a81edc3b26074e41675db5e91eaf1d0589f808b0 (diff) | |
download | perl-libnet-76d32cad37eb8b20aba87de2834fda7929400eea.tar.gz |
- Added support for the xwho command in qpage, but no docs yet.
-rw-r--r-- | Net/SNPP.pm | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/Net/SNPP.pm b/Net/SNPP.pm index b7e05e6..785172d 100644 --- a/Net/SNPP.pm +++ b/Net/SNPP.pm @@ -16,7 +16,7 @@ use IO::Socket; use Net::Cmd; use Net::Config; -$VERSION = "1.10"; # $Id: //depot/libnet/Net/SNPP.pm#4 $ +$VERSION = "1.11"; # $Id: //depot/libnet/Net/SNPP.pm#5 $ @ISA = qw(Net::Cmd IO::Socket::INET); @EXPORT = (qw(CMD_2WAYERROR CMD_2WAYOK CMD_2WAYQUEUED), @Net::Cmd::EXPORT); @@ -146,6 +146,24 @@ sub help : undef; } +sub xwho +{ + @_ == 1 or croak 'usage: $snpp->xwho()'; + my $me = shift; + + $me->_XWHO or return undef; + + my(%hash,$line); + my @msg = $me->message; + pop @msg; # Remove command complete line + + foreach $line (@msg) { + $line =~ /^\s*(\S+)\s*(.*)/ and $hash{$1} = $2; + } + + \%hash; +} + sub service_level { @_ == 2 or croak 'usage: $snpp->service_level( LEVEL )'; @@ -273,6 +291,9 @@ sub _HOLD { shift->command("HOLD", @_)->response() == CMD_OK } sub _CALL { shift->command("CALL", @_)->response() == CMD_OK } sub _SUBJ { shift->command("SUBJ", @_)->response() == CMD_OK } +# NonStandard + +sub _XWHO { shift->command("XWHO")->response() == CMD_OK } 1; __END__ |