Why not adopt me?
NAME
IRC::Toolkit::Numerics - Modern IRC numeric responses
SYNOPSIS
use IRC::Toolkit::Numerics;
my $rpl = name_from_numeric( '001' ); # 'RPL_WELCOME'
my $num = numeric_from_name( 'RPL_USERSDONTMATCH' ); # '502'
DESCRIPTION
A pair of functions for translating IRC numerics into their "RPL" or "ERR" name and back again.
The included list attempts to be as complete as possible.
In cases where there is a conflict (typically between RFC2812, ircu, and hybrid/ratbox derivatives), modern ratbox labels are preferred, ratbox derivatives being the most prevalent across large networks.
In cases where that turns out not to be true, please send patches ;-)
name_from_numeric
Given a numeric, name_from_numeric returns its proper RPL name.
numeric_from_name
Given a RPL name, numeric_from_name returns its assigned command numeric.
export
my $hash = IRC::Toolkit::Numerics->export;
Exports a List::Objects::WithUtils::Hash mapping numerics to RPL/ERR names.
export_by_name
Like "export", but returns the reversed hash (mapping RPL/ERR names to numerics).
AUTHOR
Jon Portnoy <avenj@cobaltirc.org>, based on the AnyEvent::IRC list present in IRC::Utils and review of the charybdis include/numeric.h
header.
Requested by <matthew@alphachat.org>