Add support for passing channels as list

The list of channels for statusbot can get large and unweildy, making
reviewing additions ugly. Accept it as a list. However, because of
things using the old interface, support a comma separated string being
passed as well.

Change-Id: I5adad696707b987f0fee7211b89e340d265d6bd9
This commit is contained in:
Monty Taylor 2015-06-20 09:39:07 -04:00
parent 90de9b51d4
commit 3e21aaa7e8
2 changed files with 6 additions and 2 deletions

View File

@ -4,7 +4,7 @@ class statusbot(
$nick = '',
$password = '',
$server = '',
$channels = '',
$channels = [],
$auth_nicks = '',
$wiki_user = '',
$wiki_password = '',

View File

@ -3,7 +3,11 @@ nick=<%= nick %>
pass=<%= password %>
server=<%= server %>
port=6667
channels=<%= channels %>
<% if @channels.respond_to?('join') -%>
channels=<%= @channels.join(',') %>
<% else -%>
channels=<%= @channels %>
<% end -%>
nicks=<%= auth_nicks %>
lockfile=/var/run/statusbot/statusbot.pid
log_config=/etc/statusbot/logging.config