You need to check the IRC protocol a bit; your IRC session is not considered connected (server) until certain actions are performed that the server will inform your client about the use of IRC protocol codes. And if the server or network is busy when you connect, it will take longer to complete these steps.
, MOTD ( ), . MOTD 376 , IRC , IRC, : (, join).
RECV , IRC 376, , Perl :
sub chan_join{
while(my $input = <SOCK>){
if($input =~ /376/){
my $talk = "JOIN $channel";
&send_data($talk);
&monitor;
}
else { print "$input"; }
}
}
, ? ( , 376, , , PING)