diff options
-rw-r--r-- | lib/rbot/irc.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/rbot/irc.rb b/lib/rbot/irc.rb index 89bf5521..206cc98f 100644 --- a/lib/rbot/irc.rb +++ b/lib/rbot/irc.rb @@ -1336,6 +1336,21 @@ module Irc @mode[sym.to_sym] = kl.new(self)
end
+ def modes_of(user)
+ l = []
+ @mode.map { |s, m|
+ l << s if (m.class <= UserMode and m.list[user])
+ }
+ l
+ end
+
+ def has_op?(user)
+ @mode.has_key?(:o) and @mode[:o].list[user]
+ end
+
+ def has_voice?(user)
+ @mode.has_key?(:v) and @mode[:v].list[user]
+ end
end
|