Skip to content

Commit

Permalink
Added irc_chan_mode event to ::State so that everyone can enjoy State…
Browse files Browse the repository at this point in the history
…'s internal mode parsing
  • Loading branch information
The Kinky Black Goat committed Jun 1, 2006
1 parent 90da946 commit 735abbb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ Revision history for Perl extension POE::Component::IRC.
- Documentation tweaks to ::State by Kinks
- Channel topic support added to ::State. Added the method
channel_topic to return a hashref of topic data - Kinks
- Changed 'Time' keys for channel lists and topic to 'SetAt'
- Added irc_chan_mode event to ::State to allow everyone
to enjoy the mode parsing State does internally - Kinks

4.90 Mon May 22 13:23:09 BST 2006
- Missed the Filter::Stackable in plugins Console and Proxy.
Expand Down
8 changes: 8 additions & 0 deletions lib/POE/Component/IRC/State.pm
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,9 @@ sub S_mode {
while ( my $mode = shift ( @{ $parsed_mode->{modes} } ) ) {
my $arg;
$arg = shift ( @{ $parsed_mode->{args} } ) if ( $mode =~ /^(.[$alwaysarg]|\+[$chanmodes->[2]])/ );

$self->_send_event( 'irc_chan_mode', $who, $channel, $mode, $arg );

SWITCH: {
if ( $mode =~ /\+([$statmodes])/ ) {
my $flag = $1;
Expand Down Expand Up @@ -1095,6 +1098,11 @@ Sent whenever the component has completed synchronising a channel that it has jo
Sent whenever the component has completed synchronising a user who has joined a channel the component is on.
ARG0 is the user's nickname.
=item irc_chan_mode
This is almost identical to irc_mode, except that it's sent once for each individual mode with it's respective
argument if it has one (ie. the banmask if it's +b or -b). However, this event is only sent for channel modes.
=back
The following two 'irc_*' events are the same as their L<POE::Component::IRC|POE::Component::IRC> counterparts,
Expand Down

0 comments on commit 735abbb

Please sign in to comment.