* 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
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
|
|||||||
|
|
||||||
3.0 Indev
|
3.0 Indev
|
||||||
==================================================================
|
==================================================================
|
||||||
|
* Parse Numeric:432.
|
||||||
* Parse Numeric:433.
|
* Parse Numeric:433.
|
||||||
* Added nick() to API::IRC.
|
* Added nick() to API::IRC.
|
||||||
* Added %got_001 to Parser::IRC for checking if we've been
|
* Added %got_001 to Parser::IRC for checking if we've been
|
||||||
|
|||||||
@@ -88,5 +88,6 @@ sub quit
|
|||||||
}
|
}
|
||||||
|
|
||||||
delete $Parser::IRC::got_001{$svr} if (defined $Parser::IRC::got_001{$svr});
|
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 strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
use API::Std qw(conf_get);
|
use API::Std qw(conf_get);
|
||||||
use API::IRC qw(cjoin nick);
|
use API::IRC qw(cjoin nick quit);
|
||||||
|
|
||||||
# Raw parsing hash.
|
# Raw parsing hash.
|
||||||
our %RAWC = (
|
our %RAWC = (
|
||||||
'001' => \&num001,
|
'001' => \&num001,
|
||||||
|
'432' => \&num432,
|
||||||
'433' => \&num433,
|
'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
|
# Parse: Numeric:433
|
||||||
# Nickname is already in use.
|
# Nickname is already in use.
|
||||||
sub num433
|
sub num433
|
||||||
|
|||||||
Reference in new issue
Block a user