Class: Plugins::Movie

Inherits:
Object
  • Object
show all
Includes:
Cinch::Helpers, Cinch::Plugin
Defined in:
lib/Zeta/plugins/movie.rb

Instance Method Summary collapse

Methods included from Cinch::Plugin

#check?, #log2chan

Instance Method Details

#find_movie(m, movie) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/Zeta/plugins/movie.rb', line 15

def find_movie(m, movie)
  data = query_movie(movie)
  if data && data.response == 'True'
    m.reply "Movie ⊥ #{data.title} (#{data.year}) <#{data.rated}> #{data.plot.to_s.strip[0..800]} [www.imdb.com/title/#{data.imdbid}/]"
  elsif data && data.response == 'False'
    m.reply data.error
  else
    m.reply 'Unable to find movie!'
  end
end