Class: Admin::Autojoin

Inherits:
Object
  • Object
show all
Includes:
Cinch::Helpers, Cinch::Plugin
Defined in:
lib/Zeta/admin/autojoin.rb

Instance Method Summary collapse

Methods included from Cinch::Plugin

#check?, #log2chan

Instance Method Details

#invited(m) ⇒ Object

Methods



10
11
12
13
14
15
16
17
18
19
20
# File 'lib/Zeta/admin/autojoin.rb', line 10

def invited(m)
  puts "triggered"
  if Config.options.dig :join_on_invite
    return false if Blacklist.users.include? m.user.nick.to_s
    return false if Blacklist.channels.include? m.channel.to_s

    log2chan("#{m.user.nick} has requested me join #{m.channel}", :notice)

    Channel(m.channel).join
  end
end