aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Log.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Plugin/Log.pm')
-rw-r--r--Plugin/Log.pm73
1 files changed, 71 insertions, 2 deletions
diff --git a/Plugin/Log.pm b/Plugin/Log.pm
index 135cd85..a5dee69 100644
--- a/Plugin/Log.pm
+++ b/Plugin/Log.pm
@@ -31,12 +31,61 @@ sub configure {
return $self;
}
-# FIXME Not triggered yet
-sub on_001 {
+# IRC 001
+sub on_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 {
+ my ($self, $logger, $message, $irc) = @_;
+ $logger->("$t{info} --- \"$t{message}$message$t{info}\"$t{reset}");
+}
+
+# IRC 003
+sub on_created {
+ my ($self, $logger, $message, $irc) = @_;
+ $logger->("$t{info} --- \"$t{message}$message$t{info}\"$t{reset}");
+}
+
+# IRC 004
+sub on_my_info {
+ my ($self, $logger, $message, $irc) = @_;
+ $logger->("$t{info} --- \"$t{message}$message$t{info}\"$t{reset}");
+}
+
+# IRC 251
+sub on_251_user_client {
+ my ($self, $logger, $message, $irc) = @_;
+ $logger->("$t{info}Online: \"$t{message}$message$t{info}\"$t{reset}");
+}
+
+# IRC 252
+sub on_252_user_op {
+ my ($self, $logger, $count, $message, $irc) = @_;
+ $logger->("$t{info}Online: \"$t{message}$count $message$t{info}\"$t{reset}");
+}
+
+# IRC 253
+sub on_253_user_unknown {
+ my ($self, $logger, $count, $message, $irc) = @_;
+ $logger->("$t{info}Online: \"$t{message}$count $message$t{info}\"$t{reset}");
+}
+
+# IRC 254
+sub on_254_user_channels {
+ my ($self, $logger, $count, $message, $irc) = @_;
+ $logger->("$t{info}Online: \"$t{message}$count $message$t{info}\"$t{reset}");
+}
+
+# IRC 255
+sub on_255_user_me {
+ my ($self, $logger, $message, $irc) = @_;
+ $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}");
@@ -92,5 +141,25 @@ sub on_topic {
sub on_ping {
my ($self, $logger, $server, $irc) = @_;
$logger->("$t{misc}IRC ping from $server$t{reset}");
+ return;
+}
+
+sub on_motd_content {
+ my ($self, $logger, $server, $motd, $irc) = @_;
+ $logger->("$t{info}MOTD: $t{message}$motd$t{reset}");
+ return;
}
+
+sub on_motd_begin {
+ my ($self, $logger, $server, $message, $irc) = @_;
+ $logger->("$t{info}$message$t{reset}");
+ return;
+}
+
+sub on_motd_end {
+ my ($self, $logger, $server, $message, $irc) = @_;
+ $logger->("$t{info}$message$t{reset}");
+ return;
+}
+
1;