Skip to content

Instantly share code, notes, and snippets.

@liliakai
Last active March 10, 2020 20:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liliakai/6e9684eb72f2a878ed218bae3859c12a to your computer and use it in GitHub Desktop.
Save liliakai/6e9684eb72f2a878ed218bae3859c12a to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'cinch'
bot = Cinch::Bot.new do
configure do |c|
c.server = "irc.hackint.org"
c.channels = ["##hack-adm"]
c.nick = "beamerbot"
#c.plugins.plugins = [Tell]
end
on :channel, /bb vlc (.*)/i do |m|
error = `cvlc -f #{m.message.split.last}`
if error
m.reply error
else
m.reply "done"
end
end
end
bot.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment