Skip to content

Instantly share code, notes, and snippets.

@eiro
Created May 4, 2015 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eiro/908b5610ece27d4bee49 to your computer and use it in GitHub Desktop.
Save eiro/908b5610ece27d4bee49 to your computer and use it in GitHub Desktop.
my first attempt to log
use vars qw($VERSION %IRSSI);
use Irssi;
use Eirotic;
use re '/x';
Irssi::signal_add "message public" , sub {
my ( $srv, $msg, $nick, $address, $target ) = @_;
state $fh = do {
open my $w, '>>','/tmp/logmetender';
$w
};
say $fh join "\t"
, $nick
, $target
, $$srv{chatnet}
, $msg;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment