# Channels is the User on (of those the client is on too)?
# We may want this so that when a User leaves all Channels and he hasn't
# sent us privmsgs, we know we can remove him from the Server @users list
+# FIXME for the time being, we do it with a method that scans the server
+# (if defined), so the method is slow and should not be used frequently.
# * Maybe ChannelList and UserList should be HashesOf instead of ArrayOf?
# See items marked as TODO Ho.
# The framework to do this is now in place, thanks to the new [] method
include Singleton
def initialize
- super('rfc1459', "\x41-\x5e", "\x61-\x7e")
+ super('rfc1459', "\x41-\x5a\x7b-\x7e", "\x61-\x7a\x5b-\x5e")
end
end
include Singleton
def initialize
- super('strict-rfc1459', "\x41-\x5d", "\x61-\x7d")
+ super('strict-rfc1459', "\x41-\x5a\x7b-\x7d", "\x61-\x7a\x5b-\x5d")
end
end
raise "Can't resolve channel #{channel}"
end
end
+
+ def channels
+ if @server
+ @server.channels.select { |ch| ch.has_user?(self) }
+ else
+ Array.new
+ end
+ end
end