aboutsummaryrefslogtreecommitdiff
path: root/Plugin/Autojoin.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Plugin/Autojoin.pm')
-rw-r--r--Plugin/Autojoin.pm23
1 files changed, 23 insertions, 0 deletions
diff --git a/Plugin/Autojoin.pm b/Plugin/Autojoin.pm
new file mode 100644
index 0000000..0620ecd
--- /dev/null
+++ b/Plugin/Autojoin.pm
@@ -0,0 +1,23 @@
+package Plugin::Autojoin;
+
+use strict;
+use warnings;
+
+my $config;
+
+sub configure {
+ my $self = shift;
+ shift; # cmdref
+ shift; # run_command
+ $config = shift;
+ shift; # root config
+
+ return $self;
+}
+
+sub on_001 {
+ my ($self, $logger, $server, $message, $irc) = @_;
+ $irc->yield(join => $_) for @{$config->{channels}};
+ return;
+}
+1;