Class: Cinch::Plugins::Rename

Inherits:
Object
  • Object
show all
Includes:
Cinch::Plugin
Defined in:
lib/cinch/plugins/rename.rb

Instance Method Summary collapse

Instance Method Details

#execute(m, nick) ⇒ Object



14
15
16
17
18
19
20
21
22
# File 'lib/cinch/plugins/rename.rb', line 14

def execute m, nick
  if config.key? "admin" and not config["admin"].include? m.user.nick
    return
  end

  return if @bot.nick == nick

  @bot.nick = nick
end