Skip to content

Commit

Permalink
server/base: reimplemented modes
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Jul 18, 2011
1 parent ac425f3 commit 3305251
Show file tree
Hide file tree
Showing 12 changed files with 879 additions and 767 deletions.
2 changes: 1 addition & 1 deletion lib/failirc/common/modes/can.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def method_missing (name, *args)


modes.to_hash.values.uniq.select {|mode| modes.to_hash.values.uniq.select {|mode|
mode.enabled? mode.enabled?
}.any? { }.any? {|mode|
mode.powers.include?(name) mode.powers.include?(name)
} }
end end
Expand Down
1 change: 1 addition & 0 deletions lib/failirc/common/modes/mode.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module IRC; class Modes
class Mode class Mode
extend Forwardable extend Forwardable


attr_reader :definition
attr_accessor :value attr_accessor :value
def_delegators :@definition, :name, :code def_delegators :@definition, :name, :code


Expand Down
4 changes: 1 addition & 3 deletions lib/failirc/server/dispatcher/client.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module IRC; class Server; class Dispatcher
class Client < IO class Client < IO
extend Forwardable 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_delegators :@connected_to, :server, :dispatcher, :options


def initialize (connected_to, socket) def initialize (connected_to, socket)
Expand All @@ -36,8 +36,6 @@ def initialize (connected_to, socket)
@host = @socket.peeraddr[2] rescue nil @host = @socket.peeraddr[2] rescue nil
@port = @socket.addr[1] rescue nil @port = @socket.addr[1] rescue nil


@data = InsensitiveStruct.new

super(@socket.to_i) super(@socket.to_i)
end end


Expand Down
Loading

0 comments on commit 3305251

Please sign in to comment.