Jelajahi Sumber

fix port handling

Ralf S. Engelschall 20 tahun lalu
induk
melakukan
0846eb8260
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      ircii/ircii.pl

+ 2 - 2
ircii/ircii.pl

@@ -72,7 +72,7 @@ if (defined($opt->{-ssl})) {
     my $lhost = $opt->{-h};
     my $lport = 60000 + int(rand() * 1000);
     my $rhost = ((defined($ARGV[-1]) and $ARGV[-1] !~ m|^-|) ? $ARGV[-1] : "irc");
-    my $rport = ($opt->{-p} || 6667);
+    my $rport = ($opt->{-p} || 994);
 
     #   start an SSL tunnel
     my $tmpdir = tempdir("/tmp/ircII-XXXXXX", CLEANUP => 1);
@@ -95,7 +95,7 @@ if (defined($opt->{-ssl})) {
     sleep(1);
 
     #   manipulate ircII command line arguments
-    unshift(@ARGV, "-p", $lport);
+    splice(@ARGV, -2, 0, "-p", $lport);
     $ARGV[-1] = "localhost";
 
     #   start ircII through SSL tunnel