NAME

Bot::Cobalt::IRC::Event::Mode - IRC Event subclass for mode changes

SYNOPSIS

  unless ( $mode_ev->is_umode ) {
    my $channel = $mode_ev->channel;
    my $modestr = $mode_ev->mode;
    my $args    = $mode_ev->args;
    my $parsed  = $mode_ev->hash;
  }

DESCRIPTION

This is the Bot::Cobalt::IRC::Event subclass for mode changes, both user and channel.

mode

Returns the mode change as a string.

is_umode

Returns a boolean value indicating whether or not this appears to be a umode change on ourselves.

target

Returns the target of the mode change; this may be a channel or our nickname.

channel

If "is_umode" is false, channel will return the same value as "target".

args

Returns a List::Objects::WithUtils::Array containing any parameters for the mode change.

hash

Returns a List::Objects::WithUtils::Hash containing the hashref generated by "parse_mode_line" in IRC::Utils.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>

http://www.cobaltirc.org