diff options
author | David Phillips <david@sighup.nz> | 2019-06-23 14:35:00 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-06-23 14:35:00 +1200 |
commit | 932c71ff21720227faf0d489555d1e242199eecf (patch) | |
tree | 54b951efa98f22464d30b6332686fe34dc203b4f /Plugin | |
parent | cc32474c98aa46b69856e276a46f325e29588f93 (diff) | |
download | idalius-932c71ff21720227faf0d489555d1e242199eecf.tar.xz |
Add IRC codes to special events
Diffstat (limited to 'Plugin')
-rw-r--r-- | Plugin/Autojoin.pm | 2 | ||||
-rw-r--r-- | Plugin/Log.pm | 16 |
2 files changed, 8 insertions, 10 deletions
diff --git a/Plugin/Autojoin.pm b/Plugin/Autojoin.pm index 73155ab..4288c42 100644 --- a/Plugin/Autojoin.pm +++ b/Plugin/Autojoin.pm @@ -15,7 +15,7 @@ sub configure { return $self; } -sub on_welcome { +sub on_001_welcome { my ($self, $logger, $server, $message, $irc) = @_; $irc->yield(join => $_) for @{$config->{channels}}; return; diff --git a/Plugin/Log.pm b/Plugin/Log.pm index a993d3f..dc2c6d3 100644 --- a/Plugin/Log.pm +++ b/Plugin/Log.pm @@ -33,25 +33,25 @@ sub configure { } # IRC 001 -sub on_welcome { +sub on_001_welcome { my ($self, $logger, $server, $message, $irc) = @_; $logger->("$t{info}Connected to $t{host}$server$t{info} --- \"$t{message}$message$t{info}\"$t{reset}"); } # IRC 002 -sub on_your_host { +sub on_002_your_host { my ($self, $logger, $message, $irc) = @_; $logger->("$t{info} --- \"$t{message}$message$t{info}\"$t{reset}"); } # IRC 003 -sub on_created { +sub on_003_created { my ($self, $logger, $message, $irc) = @_; $logger->("$t{info} --- \"$t{message}$message$t{info}\"$t{reset}"); } # IRC 004 -sub on_my_info { +sub on_004_my_info { my ($self, $logger, $message, $irc) = @_; $logger->("$t{info} --- \"$t{message}$message$t{info}\"$t{reset}"); } @@ -86,7 +86,6 @@ sub on_255_user_me { $logger->("$t{info}Online: \"$t{message}$message$t{info}\"$t{reset}"); } - sub on_message { my ($self, $logger, $who, $where, $raw_what, $what, $irc) = @_; $logger->("$t{bracket}\[$t{channel}$where->[0]$t{bracket}\] $t{nick}$who: $t{message}$what$t{reset}"); @@ -151,22 +150,21 @@ sub on_ping { return; } -sub on_motd_content { +sub on_372_motd_content { my ($self, $logger, $server, $motd, $irc) = @_; $logger->("$t{info}MOTD: $t{message}$motd$t{reset}"); return; } -sub on_motd_begin { +sub on_375_motd_begin { my ($self, $logger, $server, $message, $irc) = @_; $logger->("$t{info}$message$t{reset}"); return; } -sub on_motd_end { +sub on_376_motd_end { my ($self, $logger, $server, $message, $irc) = @_; $logger->("$t{info}$message$t{reset}"); return; } - 1; |