Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    Net::IRC3::Util 0.3

    Download button

    No screenshots available
    Downloads: 344  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Robin Redeker | More programs
    Perl Artistic License / FREE
    November 2nd, 2006, 03:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Net::IRC3::Util description

    Net::IRC3::Util are common utilities that help with IRC protocol handling.

    Net::IRC3::Util are common utilities that help with IRC protocol handling.

    SYNOPSIS

    use Net::IRC3 qw/parse_irc_msg mk_msg/;

    my $msgdata = mk_msg (undef, PRIVMSG

    FUNCTIONS

    These are some utility functions that might come in handy when handling the IRC protocol.

    You can export these with eg.:

    use Net::IRC3 qw/parse_irc_msg/;

    parse_irc_msg ($ircline)

    This method parses the $ircline, which is one line of the IRC protocol without the trailing "1512".

    It returns a hash which has the following entrys:

    prefix

    The message prefix.

    command

    The IRC command.

    params

    The parameters to the IRC command in a array reference, this includes the trailing parameter (the one after the ':' or the 14th parameter).

    trailing

    This is set if there was a trailing parameter (the one after the ':' or the 14th parameter).
    mk_msg ($prefix, $command, $trailing, @params)

    This function assembles a IRC message. The generated message will look like (pseudo code!)

    : :

    Please refer to RFC 2812 how IRC messages normally look like.

    The prefix and the trailing string will be omitted if they are undef.

    EXAMPLES:

    mk_msg (undef, "PRIVMSG", "you suck!", "magnus");
    # will return: "PRIVMSG magnus :you suck!1512"

    mk_msg (undef, "JOIN", undef, "#test");
    # will return: "JOIN #magnus1512"

    decode_ctcp ($ircmsg) or decode_ctcp ($line)

    split_prefix ($prefix)

    This function splits an IRC user prefix as described by RFC 2817 into the three parts: nickname, user and host. Which will be returned as a list with that order.

    $prefix can also be a hash like it is returned by parse_irc_msg.

    prefix_nick ($prefix)

    A shortcut to extract the nickname from the $prefix.

    $prefix can also be a hash like it is returned by parse_irc_msg.

    prefix_user ($prefix)

    A shortcut to extract the username from the $prefix.

    $prefix can also be a hash like it is returned by parse_irc_msg.

    prefix_host ($prefix)

    A shortcut to extract the hostname from the $prefix.

    $prefix can also be a hash like it is returned by parse_irc_msg.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    common utilities | IRC protocol | Perl module | Net::IRC3::Util | common | utilities

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM