diff options
| author | Julie Lala <jules@okfoc.us> | 2015-01-21 11:48:52 -0500 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2015-01-21 11:48:52 -0500 |
| commit | 581aa0c42f5b2487f1e20399644fce4f57bb1141 (patch) | |
| tree | 77a20a28e23c276e0c006c28ccdd82de28a90182 | |
| parent | 2cef80045e4230e8f10dc0034340248f29c4dcc3 (diff) | |
importing changes from travis
| -rw-r--r-- | index.html | 9 | ||||
| -rw-r--r-- | xdcc.pl | 10 |
2 files changed, 12 insertions, 7 deletions
@@ -9,8 +9,13 @@ XDCC server for <tt>irssi</tt>. Run a fileserver. People can request DCC sends over CTCP. Trusted users can also upload files. <p> -Download it here! → → → <a href="xdcc.pl" style="color:blue!important"><i>xdcc.pl</i></a> -<p> +<h2>Install</h2> + +<ul> +<li> Download it here! → → → <a href="xdcc.pl" style="color:blue!important"><i>xdcc.pl</i></a> +<li> Copy it to <tt>~/.irssi/scripts</tt> +<li> Load it with <tt>/script load xdcc.pl</tt> +</ul> <h2>Usage</h2> @@ -10,7 +10,7 @@ $VERSION = "1.0"; authors => 'Julie LaLa', contact => 'ryz@asdf.us', name => 'xdcc.pl', - description => 'This script sets up a little XDCC server.', + description => 'Run an XDCC file server from irssi.', license => 'Jollo LNT license', url => 'http://asdf.us/xdcc/', changed => 'Tue Jan 21 09:57:55 EST 2015', @@ -173,7 +173,7 @@ sub ctcp_reply { } sub xdcc_message { my ($server, $nick, $msgname, @params) = @_; - my (@msgs) = split ("\n", $messages->{$msgname}); + my (@msgs) = split (/\n/, $messages->{$msgname}); for my $msg (@msgs) { $msg =~ s/%_/\x02/g; $msg =~ s/%-/\x03/g; @@ -231,7 +231,7 @@ sub xdcc_batch { xdcc_message( $server, $nick, 'specify_range', scalar @files ); return; } - my ($from, $to) = split("-", $index, 2); + my ($from, $to) = split(/-/, $index, 2); $from = int $from; $to = int $to; if ($from >= $to || $from < 1 || $to < 1 || $from > @files || $to > @files) { @@ -321,13 +321,13 @@ sub xdcc_get_info { my $file = $files[$id]; my @stats = stat($file->{path}); - my $size = $stats[7]; + my $size = int $stats[7]; my $date = $stats[9]; my ($m,$h,$d,$n,$y) = (localtime $date)[1..5]; my @months = qw[Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec]; my $ymd = sprintf "%d-%s-%d %d:%02d", $d, $months[$n], 1900+$y, $h, $m; - + my $bytes; if ($size < 1024) { $bytes = $size + " b." } elsif ($size < 1024*1024) { $bytes = int($size/1024) + " kb." } |
