lib/robut/room.rb in sclemmer-robut-0.5.4 vs lib/robut/room.rb in sclemmer-robut-0.6.0

- old
+ new

@@ -15,25 +15,16 @@ def join # Add the callback from messages that occur inside the room muc.on_message do |time, nick, message| plugins = Robut::Plugin.plugins.map { |p| p.new(self) } - handle_message(plugins, time, nick, message) + handle_message(plugins, time, nick, message, name) end muc.join(self.name + '/' + connection.config.nick) end # Send +message+ to the room we're currently connected to def reply(message, to) - msg = Jabber::Message.new(muc.room) - if message =~ /</ - msg.xhtml_body = message - else - msg.body = message - end - $stderr.puts 'msg: %s' % msg.inspect - $stderr.puts 'msg.body: %s' % msg.body.inspect - $stderr.puts 'msg.xhtml_body: %s' % msg.xhtml_body.inspect - muc.send(msg) + muc.send(Jabber::Message.new(muc.room, message)) end end