diff options
author | David Phillips <david@sighup.nz> | 2019-06-22 23:04:09 +1200 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2019-06-22 23:53:33 +1200 |
commit | 8c862af5a181a601e871cff8244d164da743a8f7 (patch) | |
tree | 61ae7d6937d042bb20c7a275b8098ec95b187ba1 /Plugin/Autojoin.pm | |
parent | a76c61351eabb72f5dbb5f75394850e06f558487 (diff) | |
download | idalius-8c862af5a181a601e871cff8244d164da743a8f7.tar.xz |
Evict auto-joining of channels to module
Diffstat (limited to 'Plugin/Autojoin.pm')
-rw-r--r-- | Plugin/Autojoin.pm | 23 |
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; |