Skip to content
Extraits de code Groupes Projets
Valider 511f5a01 rédigé par Alexandre Morignot's avatar Alexandre Morignot
Parcourir les fichiers

Message avec les informations suite à un lien

parent 6b2e5e4c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -38,7 +38,7 @@ class PlayBot < IRCBot ...@@ -38,7 +38,7 @@ class PlayBot < IRCBot
@nick_paswd = options.delete[:nick_passwd] @nick_paswd = options.delete[:nick_passwd]
end end
options[:username] = BOTNAME options[:username] = BOTNAME
options[:realname] = BOTNAME options[:realname] = BOTNAME
super(options) super(options)
...@@ -73,7 +73,6 @@ class PlayBot < IRCBot ...@@ -73,7 +73,6 @@ class PlayBot < IRCBot
return if event.pm? return if event.pm?
url = URI.extract(event.message, ['http', 'https']).first url = URI.extract(event.message, ['http', 'https']).first
puts "url = #{url}"
handler = SitePlugin.for_site(url) handler = SitePlugin.for_site(url)
return if handler.nil? return if handler.nil?
...@@ -81,6 +80,7 @@ class PlayBot < IRCBot ...@@ -81,6 +80,7 @@ class PlayBot < IRCBot
handler = handler.new handler = handler.new
content = handler.get(url) content = handler.get(url)
#TODO: use this content... msg(event.channel, "#{content[:title]} | #{content[:author]}")
end
end end
end end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter