http://www.perlmonks.org?node_id=453451

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Anyone out there familiar with Net::IRC and familiar know your away around IRC/MIRC? My question is, I want my bot to do a specific action when the bot is slapped (ie: /me slaps Wizard). I'm sure my regex is fine but I think the reason it's not reading in the action is because it's not being read as "on_public" text..

Everything else in the on_public is working, just not the actions.

sub on_public { my ($conn, $event) = @_; my $nick = $event->{nick}; . . . elsif ($text =~ m/slaps Wizard/i) { $conn->privmsg($conn->{channel}, "Hey, don't slap me!"); } . . . }
I tried looking on Google but it doesn't say anything about reading user actions. Any ideas?