]> git.99rst.org Git - irssi-scripts.irssi.org.git/commitdiff
OTHER doesn't work on quakenet
authorJari Matilainen <redacted>
Wed, 26 Jul 2017 17:59:54 +0000 (19:59 +0200)
committerJari Matilainen <redacted>
Wed, 26 Jul 2017 17:59:54 +0000 (19:59 +0200)
scripts/identd.pl

index 958fff5566e4806168c1ed1d9abd80a99d2dbab3..d283e57fa2d2d0ec2a9d72445786792290a38718 100644 (file)
@@ -59,9 +59,9 @@ sub start_ident_server {
 sub handle_connection {
   my $sock = $_[0]->accept;
   my $iaddr = inet_aton($sock->peerhost); # or whatever address
-  my $peer  = gethostbyaddr($iaddr, AF_INET);
+  my $peer  = gethostbyaddr($iaddr, AF_INET) // $sock->peerhost;
   Irssi::print("Identd - handling connection from $peer") if VERBOSE;
-  return unless exists $connectrec->{$peer};
+#  return unless exists $connectrec->{$peer};
 
   my $username;
   my $username_mode = fc(Irssi::settings_get_str('identd_resolve_mode'));
@@ -82,7 +82,9 @@ sub handle_connection {
   $sock->autoflush(1);
   my $incoming = <$sock>;
   $incoming =~ s/\r\n//;
-  $incoming .= " : USERID : OTHER : " . $username . "\n";
+  $incoming =~ s/\s*//g;
+  $incoming .= ":USERID:UNIX:" . $username . "\n";
+#  $incoming .= " : USERID : OTHER : " . $username . "\n";
   print $sock $incoming;
   close $sock;
   chomp $incoming;
git clone https://git.99rst.org/PROJECT