X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Ftube.rb;h=bbae5c59684bbb82b0cf78a425082d956a00238d;hb=890cd1f8817a7ff8ad995d78091696429730a7c7;hp=165622743b0ed1512a7d2c9f6ab96b22ec4b5cb5;hpb=b11c3c4042b03e36639370002ecf86c44f7ddde4;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/tube.rb b/data/rbot/plugins/tube.rb index 16562274..bbae5c59 100644 --- a/data/rbot/plugins/tube.rb +++ b/data/rbot/plugins/tube.rb @@ -1,15 +1,11 @@ #Tube Status Enquiry plugin for rbot #Plugin by Colm Linehan -require 'rexml/document' -require 'uri/common' - class TubePlugin < Plugin - include REXML def help(plugin, topic="") "tube [district|circle|metropolitan|central|jubilee|bakerloo|waterlooandcity|hammersmithandcity|victoria|eastlondon|northern|piccadilly] => display tube service status for the specified line(Docklands Light Railway is not currently supported)" # , tube stations => list tube stations (not lines) with problems" end - + def tube(m, params) line = params[:line] tube_page = @bot.httputil.get('http://www.tfl.gov.uk/tfl/livetravelnews/realtime/tube/default.html') @@ -49,7 +45,7 @@ class TubePlugin < Plugin stations_array.push $1 end } - if stations_array.empty? + if stations_array.empty? m.reply "There are no station-specific announcements" return else