Open metaxis opened 11 years ago
The znc.conf.erb template needs just a little bit more to permit an optional channel options hash to be wired in. In the sample user below, if the second "channels" form is used only the channel names rendered out and the options are ignored.
"channels"
{ "id": "fred", "groups": "znc", "znc": { "nick": "fredique", "pass": "see_below" "alt_nick": fredique-z", "real_name": "Steve Urbane", "ident": "Wanda", "server": "something-like-irc.freenode.net", "channels": ["#chef", "#chef-hacking"], // or "channels": { "#chef": { "Buffer": 500, "KeepBuffer": true }, "#chef-hacking": {} }, "modules": ["nickserv"] } }
This change supports both arrays and option hash forms:
<% u['znc']['channels'].each do |chan,options| -%> <Chan <%= chan %>> <% options.each do |opt, val| -%> <%= opt %> = <%= val %> <% end -%> </Chan> <% end -%>
The znc.conf.erb template needs just a little bit more to permit an optional channel options hash to be wired in. In the sample user below, if the second
"channels"
form is used only the channel names rendered out and the options are ignored.This change supports both arrays and option hash forms: