diff --git a/doc/CHANGELOG b/doc/CHANGELOG index ef0193c..d57afb4 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev ================================================================== + * Parse numerics 465, 471-475 and 477. * Added an optional @args onto event_run() for sending @args to the subs that have hooked onto the event. * Parse the channels the bot is in. diff --git a/src/Parser/IRC.pm b/src/Parser/IRC.pm index 779a0d6..454787e 100644 --- a/src/Parser/IRC.pm +++ b/src/Parser/IRC.pm @@ -15,6 +15,12 @@ our %RAWC = ( '432' => \&num432, '433' => \&num433, '438' => \&num438, + '465' => \&num465, + '471' => \&num471, + '473' => \&num473, + '474' => \&num474, + '475' => \&num475, + '477' => \&num477, 'JOIN' => \&cjoin, 'NICK' => \&nick, ); @@ -123,6 +129,60 @@ sub num438 } } +# Parse: Numeric:465 +# You're banned creep! +sub num465 +{ + my ($svr, undef) = @_; + + err(3, "Banned from ".$svr."! Closing link...", 0); +} + +# Parse: Numeric:471 +# Cannot join channel: Channel is full. +sub num471 +{ + my ($svr, (undef, undef, undef, $chan)) = @_; + + err(3, "Cannot join channel ".$chan." on ".$svr.": Channel is full.", 0); +} + +# Parse: Numeric:473 +# Cannot join channel: Channel is invite-only. +sub num473 +{ + my ($svr, (undef, undef, undef, $chan)) = @_; + + err(3, "Cannot join channel ".$chan." on ".$svr.": Channel is invite-only.", 0); +} + +# Parse: Numeric:474 +# Cannot join channel: Banned from channel. +sub num474 +{ + my ($svr, (undef, undef, undef, $chan)) = @_; + + err(3, "Cannot join channel ".$chan." on ".$svr.": Banned from channel.", 0); +} + +# Parse: Numeric:475 +# Cannot join channel: Bad key. +sub num475 +{ + my ($svr, (undef, undef, undef, $chan)) = @_; + + err(3, "Cannot join channel ".$chan." on ".$svr.": Bad key.", 0); +} + +# Parse: Numeric:477 +# Cannot join channel: Need registered nickname. +sub num473 +{ + my ($svr, (undef, undef, undef, $chan)) = @_; + + err(3, "Cannot join channel ".$chan." on ".$svr.": Need registered nickname.", 0); +} + # Parse: JOIN sub cjoin {