lib/ayadn/databases.rb in ayadn-1.2.10 vs lib/ayadn/databases.rb in ayadn-1.3.0
- old
+ new
@@ -59,10 +59,13 @@
ids = {}
user_ids.each {|id| ids[id] = @nicerank[id]}
ids
end
+ def self.add_user_to_blacklist(target)
+ target.each {|username| @blacklist["-#{username.downcase}"] = :user}
+ end
def self.add_mention_to_blacklist(target)
target.each {|username| @blacklist[username.downcase] = :mention}
end
def self.add_client_to_blacklist(target)
target.each {|source| @blacklist[source.downcase] = :client}
@@ -92,9 +95,21 @@
@aliases[channel_alias] = channel_id
end
def self.delete_alias(channel_alias)
@aliases.delete(channel_alias)
+ end
+
+ def self.clear_aliases
+ @aliases.clear
+ end
+
+ def self.clear_blacklist
+ @blacklist.clear
+ end
+
+ def self.clear_bookmarks
+ @bookmarks.clear
end
def self.get_channel_id(channel_alias)
@aliases[channel_alias]
end