-
Notifications
You must be signed in to change notification settings - Fork 1
/
channel_status.rb
28 lines (22 loc) · 924 Bytes
/
channel_status.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'cinch'
require 'cinch/extensions/authentication'
require_relative 'plugins'
bot = Cinch::Bot.new do
configure do |c|
c.server = 'irc.freenode.org'
c.channels = ['#cinch-authentication']
# Global configuration. This means that all plugins / matchers that
# implement authentication make use of the :channel_status strategy, with a
# user level of voice or higher.
c.authentication = Cinch::Configuration::Authentication.new
c.authentication.strategy = :channel_status
c.authentication.level = :v
# Plugin-specific configuration. This means that for the Admin plugin, a
# user level of operator or higher is required. The strategy is inherited
# from the global configuration.
c.plugins.plugins << Admin
c.plugins.options[Admin][:authentication_level] = :o
c.plugins.plugins << Quote
end
end
bot.start