* Parse Numeric:432.
* Delete $botnick var on quit.
This commit is contained in:
1 parent
7b986d8d87
commit
387ab2393b
3 files changed
+19
-1
No files matched your search
@@ -88,5 +88,6 @@ sub quit
|
||||
}
|
||||
|
||||
delete $Parser::IRC::got_001{$svr} if (defined $Parser::IRC::got_001{$svr});
|
||||
delete $Parser::IRC::botnick{$svr} if (defined $Parser::IRC::botnick{$svr});
|
||||
}
|
||||
|
||||
+17
-1
@@ -7,11 +7,12 @@ package Parser::IRC;
|
||||
use strict;
|
||||
use warnings;
|
||||
use API::Std qw(conf_get);
|
||||
use API::IRC qw(cjoin nick);
|
||||
use API::IRC qw(cjoin nick quit);
|
||||
|
||||
# Raw parsing hash.
|
||||
our %RAWC = (
|
||||
'001' => \&num001,
|
||||
'432' => \&num432,
|
||||
'433' => \&num433,
|
||||
);
|
||||
|
||||
@@ -70,6 +71,21 @@ sub num001
|
||||
}
|
||||
}
|
||||
|
||||
# Parse: Numeric:432
|
||||
# Erroneous nickname.
|
||||
sub num432
|
||||
{
|
||||
my ($svr, undef) = @_;
|
||||
|
||||
if ($got_001{$svr}) {
|
||||
err(3, "Got error from server[".$svr."]: Erroneous nickname.", 0);
|
||||
}
|
||||
else {
|
||||
err(2, "Got error from server[".$svr."] before 001: Erroneous nickname. Closing connection.", 0);
|
||||
quit($svr, "An error occurred.");
|
||||
}
|
||||
}
|
||||
|
||||
# Parse: Numeric:433
|
||||
# Nickname is already in use.
|
||||
sub num433
|
||||
|
||||
Reference in new issue
Block a user