Skip to content

Instantly share code, notes, and snippets.

@mostlyobvious
Forked from LTe/gist:1653343
Created January 22, 2012 20:22
Show Gist options
  • Save mostlyobvious/1658645 to your computer and use it in GitHub Desktop.
Save mostlyobvious/1658645 to your computer and use it in GitHub Desktop.
# muzang.rb
require 'muzang'
require 'muzang-plugins'
class Bshellz
include Muzang::Plugins::Helpers
def initialize(bot)
@bot = bot
end
def call(connection, message)
on_join(connection, message) do
connection.msg(message.channel, '!keep rege')
connection.part(message.channel)
EM.stop # koniec event loop'a i głównego wątku
end
end
end
EM.run do
@bot = Muzang::Bot.new(irc_host: 'irc.freenode.net',
irc_port: 6667,
nick: 'rege',
channels: ['#bshellz'])
@bot.register_plugin(Bshellz)
@bot.start # start after register plugins
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment