class Object

Constants

BlackListStruct
Blacklist
Bot
Config

Initialize Config

ConfigStruct

Public Instance Methods

clear_blacklist() click to toggle source
# File lib/Zeta/blacklist.rb, line 20
def clear_blacklist()
  Blacklist.users = []
  Blacklist.plugins = []
  Blacklist.channels = []
  Blacklist.urls = []
  Blacklist.masks = []
  File.delete(File.join(Dir.home, '.zeta', 'cache', 'blacklist.rb'))
end
load_locale(file) click to toggle source
# File lib/Zeta/locale.rb, line 1
def load_locale(file)
  Config.locale ||= 'en' # Default to english

  if File.exists?( File.join(Dir.home, '.zeta', 'locale', Config.locale, "#{file}.yml") )
    ## Overide included library if file exists
    YAML::load_file(
        File.join(Dir.home, '.zeta', 'locale', Config.locale, "#{file}.yml")
    )
  else
    YAML::load_file(
        File.join(File.dirname(__FILE__), 'locale', Config.locale, "#{file}.yml")
    )

  end


end
save_blacklist() click to toggle source

Methods

# File lib/Zeta/blacklist.rb, line 14
def save_blacklist()
  File.open(File.join(Dir.home, '.zeta', 'cache', 'blacklist.rb'), 'w+') do |file|
    Marshal.dump(Blacklist, file)
  end
end