Sha256: a1116cfb5f1f8ba9e85ffcccb9efd68b4b4a68b5dcc315debd4c54bea6c33335
Contents?: true
Size: 714 Bytes
Versions: 32
Compression:
Stored size: 714 Bytes
Contents
BlackListStruct = Struct.new :channels, :users, :plugins, :urls, :masks # Load Cached if File.exists?(File.join(Dir.home, '.zeta', 'cache', 'blacklist.rb')) File.open(File.join(Dir.home, '.zeta', 'cache', 'blacklist.rb')) do |file| Blacklist = Marshal.load(file) end else Blacklist = BlackListStruct.new([], [], [], [], []) end ## Methods def save_blacklist() File.open(File.join(Dir.home, '.zeta', 'cache', 'blacklist.rb'), 'w+') do |file| Marshal.dump(Blacklist, file) end end def clear_blacklist() Blacklist.users = [] Blacklist.plugins = [] Blacklist.channels = [] Blacklist.urls = [] Blacklist.masks = [] File.delete(File.join(Dir.home, '.zeta', 'cache', 'blacklist.rb')) end
Version data entries
32 entries across 32 versions & 1 rubygems