Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'cinch'
- module Cinch::Plugins
- class Oper
- include Cinch::Plugin
- match /oper/
- def check_user(user)
- user.refresh
- %w[Auth Auth1].include? user.authname
- end
- def execute(m)
- if m.channel
- unless check_user(m.user)
- m.reply Format(:red, "You are not authorized to use this command!")
- return;
- end
- bot.info("Received valid oper command from #{m.user.nick}")
- m.reply Format(:green, "Oper Up!")
- bot.irc.send ("OPER NAME PASS")
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement