summaryrefslogtreecommitdiffstats
path: root/plugins-scripts/check_ircd.pl
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-10-15 20:07:33 (GMT)
committerLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-10-15 20:07:33 (GMT)
commit685c2931dfc3cb67b7605eba143598512a66c037 (patch)
tree4d73bf71eb19e7c63f3d649fa969c63104a4b456 /plugins-scripts/check_ircd.pl
parent0875351a8385d6587133c2af541d102f31c17a46 (diff)
parentbf70f5f847e3407af572d1768cca747af270b993 (diff)
downloadmonitoring-plugins-685c2931dfc3cb67b7605eba143598512a66c037.tar.gz
Merge branch 'master' into dev/check_ssh-patches
Diffstat (limited to 'plugins-scripts/check_ircd.pl')
-rwxr-xr-xplugins-scripts/check_ircd.pl4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins-scripts/check_ircd.pl b/plugins-scripts/check_ircd.pl
index 84f2022..4822fe6 100755
--- a/plugins-scripts/check_ircd.pl
+++ b/plugins-scripts/check_ircd.pl
@@ -146,7 +146,6 @@ sub bindRemote ($$)
146{ 146{
147 my ($in_remotehost, $in_remoteport) = @_; 147 my ($in_remotehost, $in_remoteport) = @_;
148 my $proto = getprotobyname('tcp'); 148 my $proto = getprotobyname('tcp');
149 my $sockaddr;
150 my $that; 149 my $that;
151 my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost); 150 my ($name, $aliases,$type,$len,$thataddr) = gethostbyname($in_remotehost);
152 151
@@ -154,8 +153,7 @@ sub bindRemote ($$)
154 print "IRCD UNKNOWN: Could not start socket ($!)\n"; 153 print "IRCD UNKNOWN: Could not start socket ($!)\n";
155 exit $ERRORS{"UNKNOWN"}; 154 exit $ERRORS{"UNKNOWN"};
156 } 155 }
157 $sockaddr = 'S n a4 x8'; 156 $that = pack_sockaddr_in ($in_remoteport, $thataddr);
158 $that = pack($sockaddr, AF_INET, $in_remoteport, $thataddr);
159 if (!connect(ClientSocket, $that)) { 157 if (!connect(ClientSocket, $that)) {
160 print "IRCD UNKNOWN: Could not connect socket ($!)\n"; 158 print "IRCD UNKNOWN: Could not connect socket ($!)\n";
161 exit $ERRORS{"UNKNOWN"}; 159 exit $ERRORS{"UNKNOWN"};