lib/cinch/plugins/links-tumblr/links-tumblr.rb in cinch-links-tumblr-0.0.2 vs lib/cinch/plugins/links-tumblr/links-tumblr.rb in cinch-links-tumblr-0.0.3
- old
+ new
@@ -17,15 +17,15 @@
def initialize(*args)
super
@storage = CinchStorage.new(config[:filename] || 'yaml/tumblr.yml')
@storage.data[:history] ||= Hash.new
- @hostname = config['hostname'] || nil
- @password = config['password'] || nil
- @creds = { :consumer_key => config['consumer_key'],
- :consumer_secret => config['consumer_secret'],
- :token => config['token'],
- :token_secret => config['token_secret'] }
+ @hostname = config[:hostname]
+ @password = config[:password]
+ @creds = { :consumer_key => config[:consumer_key],
+ :consumer_secret => config[:consumer_secret],
+ :token => config[:token],
+ :token_secret => config[:token_secret] }
end
def execute(m)
if m.channel.nil?
# Tumblr's are channel bound, so require the user to be in a channel