Created
May 12, 2015 17:52
-
-
Save eloyesp/fb31135b22d44904da2e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uses password from .netrc when stablishing connections | |
use strict; | |
use warnings; | |
use vars qw($VERSION %IRSSI); | |
use Irssi; | |
use Data::Dumper; | |
$VERSION = '0.01'; | |
%IRSSI = ( | |
authors => 'Eloy Espinaco', | |
contact => '[email protected]', | |
name => 'irssi-netrc', | |
description => 'Use netrc to store passwords', | |
license => 'GPL', | |
); | |
sub handle_connection { | |
my (@server) = @_; | |
print 'connecting to: '; | |
print Dumper(@server); | |
print $server[0]{'password'}; | |
print $server[0]{'password'} = 'other'; | |
print $server[0]{'password'}; | |
Irssi::signal_stop(); | |
} | |
Irssi::signal_add('server connecting', 'handle_connection'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment