Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Patching Cinch to write out action messages from Message.

  • Loading branch information...
commit f9f67ce9124641c7c15ab6cef8b1fd623b0ea56d 1 parent 856302f
@wilkie authored
Showing with 16 additions and 1 deletion.
  1. +16 −1 lib/xombot.rb
View
17 lib/xombot.rb
@@ -1,6 +1,15 @@
require 'bundler'
Bundler.require
+# allow sending of actions
+module Cinch
+ class Message
+ def emote(m)
+ reply "\001ACTION #{m}\001"
+ end
+ end
+end
+
require 'xombot/plugin'
# Place all plugins into a module
@@ -9,6 +18,8 @@
end
module XOmBot
+ NAME = "XOmBot-test"
+
class << self
attr_reader :plugins
@@ -20,13 +31,17 @@ def add_plugin plugin
def load_plugins
end
+ def name
+ NAME
+ end
+
def start
bot = Cinch::Bot.new do
configure do |c|
c.server = "irc.freenode.org"
c.port = 6697
c.ssl.use = true
- c.nick = "XOmBot-test"
+ c.nick = NAME
c.channels = ["#XOmBot"]
c.plugins.plugins = XOmBot::Plugins.constants.map do |plugin|
XOmBot::Plugins.const_get(plugin)
Please sign in to comment.
Something went wrong with that request. Please try again.