| 1 | package Bot::Cobalt::Plugin::OutputFilters::StripFormat; | ||||||||||
| 2 | 1 | $Bot::Cobalt::Plugin::OutputFilters::StripFormat::VERSION = '0.021003'; | |||||||||
| 3 | |||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use Object::Pluggable::Constants qw/ :ALL /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | use IRC::Utils qw/ strip_formatting /; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | sub new { bless [], shift } | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 13 | |||||||||||
| 14 | 0 | ▶ | sub Cobalt_register { | ||||||||
|
Subroutine
Cobalt_register: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 15 | 0 | my ($self, $core) = splice @_, 0, 2; | |||||||||
| 16 | |||||||||||
| 17 | 0 | $core->plugin_register( $self, 'USER', | |||||||||
| 18 | 'message', 'notice', 'ctcp', | ||||||||||
| 19 | ); | ||||||||||
| 20 | |||||||||||
| 21 | 0 | $core->log->info("Registered, filtering FORMATTING"); | |||||||||
| 22 | |||||||||||
| 23 | 0 | return PLUGIN_EAT_NONE | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub Cobalt_unregister { | ||||||||
|
Subroutine
Cobalt_unregister: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 27 | 0 | my ($self, $core) = splice @_, 0, 2; | |||||||||
| 28 | |||||||||||
| 29 | 0 | $core->log->info("Unregistered"); | |||||||||
| 30 | |||||||||||
| 31 | 0 | return PLUGIN_EAT_NONE | |||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | 0 | ▶ | sub Outgoing_message { | ||||||||
|
Subroutine
Outgoing_message: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 35 | 0 | my ($self, $core) = splice @_, 0, 2; | |||||||||
| 36 | |||||||||||
| 37 | 0 | ${$_[2]} = strip_formatting(${$_[2]}); | |||||||||
| 38 | |||||||||||
| 39 | 0 | return PLUGIN_EAT_NONE | |||||||||
| 40 | } | ||||||||||
| 41 | |||||||||||
| 42 | 0 | ▶ | sub Outgoing_notice { Outgoing_message(@_) } | ||||||||
|
Subroutine
Outgoing_notice: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 43 | |||||||||||
| 44 | 0 | ▶ | sub Outgoing_ctcp { | ||||||||
|
Subroutine
Outgoing_ctcp: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 45 | 0 | my ($self, $core) = splice @_, 0, 2; | |||||||||
| 46 | 0 | my $type = ${$_[1]}; | |||||||||
| 47 | |||||||||||
| 48 | 0 | ▶ | return PLUGIN_EAT_NONE unless uc($type) eq 'ACTION'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 49 | |||||||||||
| 50 | 0 | ${$_[3]} = strip_formatting(${$_[3]}); | |||||||||
| 51 | |||||||||||
| 52 | 0 | return PLUGIN_EAT_NONE | |||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 1 | 1; | |||||||||
| 56 | __END__ | ||||||||||