From 6ff355d5d40e165b3e2992d30b54f5684d07f5d2 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 5 Feb 2007 23:11:41 +0000 Subject: New IRC Framework: add missing accessors for channel modes --- lib/rbot/irc.rb | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib/rbot') diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb index 0cf70d5a..e6262522 100644 --- a/lib/rbot/irc.rb +++ b/lib/rbot/irc.rb @@ -854,6 +854,7 @@ module Irc # Mode on a Channel # class Mode + attr_reader :channel def initialize(ch) @channel = ch end @@ -866,6 +867,7 @@ module Irc # Example: b (banlist) # class ModeTypeA < Mode + attr_reader :list def initialize(ch) super @list = NetmaskList.new @@ -894,6 +896,11 @@ module Irc @arg = nil end + def status + @arg + end + alias :value :status + def set(val) @arg = val end @@ -911,6 +918,8 @@ module Irc # modes of type A # class UserMode < ModeTypeB + attr_reader :list + alias :users :list def initialize(ch) super @list = UserList.new @@ -937,19 +946,20 @@ module Irc class ModeTypeC < Mode def initialize(ch) super - @arg = false + @arg = nil end def status @arg end + alias :value :status def set(val) @arg = val end def reset - @arg = false + @arg = nil end end -- cgit v1.2.3