def add_botmodule(botmodule)
raise TypeError, "Argument #{botmodule.inspect} is not of class BotModule" unless botmodule.kind_of?(BotModule)
kl = botmodule.botmodule_class
if @names_hash.has_key?(botmodule.to_sym)
case self[botmodule].botmodule_class
when kl
raise "#{kl} #{botmodule} already registered!"
else
raise "#{self[botmodule].botmodule_class} #{botmodule} already registered, cannot re-register as #{kl}"
end
end
@botmodules[kl] << botmodule
@names_hash[botmodule.to_sym] = botmodule
mark_priorities_dirty
end