Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require "cinch"
- require "cinch/plugins/identify"
- $admin = ["comfyasfuck", "ewhal4"]
- class Autovoice
- include Cinch::Plugin
- listen_to :join
- match /comf autovoice (on|off)$/, use_prefix: false
- def listen(m)
- unless m.user.nick == bot.nick
- m.channel.voice(m.user) if @autovoice
- end
- end
- def execute(m, option)
- @autovoice = option == "on"
- m.reply "Autovoice is now #{@autovoice ? 'enabled' : 'disabled'}."
- end
- end
- bot = Cinch::Bot.new do
- configure do |c|
- c.server = "irc.rizon.net"
- c.channels = ["#comfortable", "#pasta"]
- c.nick = "comfybot"
- c.verbose = true
- c.plugins.plugins = [Autovoice, Cinch::Plugins::Identify]
- c.plugins.options[Cinch::Plugins::Identify] = {
- :username => "",
- :password => 'RudyRudy2by4',
- :type => :nickserv,
- }
- end
- helpers do
- def is_admin?(user)
- true if $admin.include? user.nick
- end
- end
- on :message, /comf spam (.+?) (.+)/ do |m, who, text|
- horizNum = who.split('x',2).first.to_i
- vertiNum = who.split('x',2).last.to_i
- whileNum = 1
- spamText = "#{text} "
- if is_admin?(m.user)
- while whileNum <= horizNum
- if whileNum == horizNum
- whileNum = 1
- while whileNum <= vertiNum
- m.reply spamText.upcase
- whileNum += 1
- end
- end
- whileNum += 1
- spamText = spamText + "#{text} "
- end
- end
- end
- on :message, "comf rules" do |m|
- m.reply "Rules: "
- m.reply "0. This is not a democracy, this is not a constitutional republic."
- m.reply "1. comfy has supreme power in this channel and ewhal4 has secondary power."
- m.reply "2. installgen2 and other highups from #pasta are not allowed in here."
- m.reply "3. Political dissent will be silenced."
- end
- on :join do |m|
- unless m.user.nick == bot.nick # No voicing or talking to self
- unless m.user.nick == "vitimiti"
- m.reply "Hello, and welcome to #{m.channel}, #{m.user.nick}! Get comfy <3333."
- end
- end
- end
- on :message, /comf help/ do |m|
- m.reply "Commands: "
- m.reply "comf tell _nick_ like it is"
- m.reply "comf rules - they apply to #comfortable only"
- m.reply "comf join _channel_ and comf leave _channel_"
- m.reply "comf send (nick or channel) _message_"
- end
- on :message, /.bots/ do |m|
- m.reply "Reporting in! [Ruby] Do comf help for more info."
- end
- on :message, /comf tell (.+?) like it is/ do |m, who|
- if is_admin?(m.user)
- m.reply "YOU LITTLE STUPID ASS #{who} I AINT FUCKIN WHICHUUUUU".upcase
- end
- end
- on :message, /can confirm/ do |m|
- m.reply "can confirm"
- end
- on :message, /comf join (.+)/ do |m, channel|
- bot.join(channel) if is_admin?(m.user)
- end
- on :message, /comf leave (.+)/ do |m, channel|
- channel = channel || m.channel
- if channel
- bot.part(channel) if is_admin?(m.user)
- end
- end
- on :message, /comf send (.+?) (.+)/ do |m, who, text|
- if is_admin?(m.user)
- Channel("#{who}").send "#{text}"
- end
- end
- on :message, /;-;/ do |m|
- m.reply "Stop acting like a little bitch, #{m.user.nick}."
- end
- end
- bot.start
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement