Permalink
Browse files

server/base: reimplemented modes

  • Loading branch information...
meh committed Jul 18, 2011
1 parent ac425f3 commit 3305251a39ebe9d92ec3fdb7381b6a5ecfc71992
@@ -31,7 +31,7 @@ def method_missing (name, *args)
modes.to_hash.values.uniq.select {|mode|
mode.enabled?
- }.any? {
+ }.any? {|mode|
mode.powers.include?(name)
}
end
@@ -22,6 +22,7 @@ module IRC; class Modes
class Mode
extend Forwardable
+ attr_reader :definition
attr_accessor :value
def_delegators :@definition, :name, :code
@@ -22,7 +22,7 @@ module IRC; class Server; class Dispatcher
class Client < IO
extend Forwardable
- attr_reader :connected_to, :socket, :ip, :host, :port, :data
+ attr_reader :connected_to, :socket, :ip, :host, :port
def_delegators :@connected_to, :server, :dispatcher, :options
def initialize (connected_to, socket)
@@ -36,8 +36,6 @@ def initialize (connected_to, socket)
@host = @socket.peeraddr[2] rescue nil
@port = @socket.addr[1] rescue nil
- @data = InsensitiveStruct.new
-
super(@socket.to_i)
end
Oops, something went wrong.

0 comments on commit 3305251

Please sign in to comment.