From: Giuseppe Bilotta Date: Sun, 16 Sep 2007 06:44:17 +0000 (+0000) Subject: twitter plugin: set update source to 'rbot' X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=5e3643de09d3b32c68f218ce11ded2f412f6cba5;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git twitter plugin: set update source to 'rbot' Since September 17 Twitter.com supports us as an 'official' client, and we can use 'rbot' as the source for updates coming from rbot. --- diff --git a/data/rbot/plugins/twitter.rb b/data/rbot/plugins/twitter.rb index 25ceb63a..ef0d05b6 100644 --- a/data/rbot/plugins/twitter.rb +++ b/data/rbot/plugins/twitter.rb @@ -7,6 +7,7 @@ # Author:: Giuseppe "Oblomov" Bilotta # # Copyright:: (C) 2007 Carter Parks +# Copyright:: (C) 2007 Giuseppe Bilotta # # Users can setup their twitter username and password and then begin updating # twitter whenever @@ -110,7 +111,9 @@ class TwitterPlugin < Plugin m.reply "your status message is longer than 140 characters, which is not optimal, but I'm going to update anyway" end - body = "status=#{CGI.escape(msg)}" + source = "source=rbot" + msg = "status=#{CGI.escape(msg)}" + body = [source,msg].join("&") response = @bot.httputil.post(uri, body, :headers => @header) debug response