Skip to content

Instantly share code, notes, and snippets.

@morygonzalez
Forked from siyo/takagi.rb
Created July 5, 2012 01:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morygonzalez/3050550 to your computer and use it in GitHub Desktop.
Save morygonzalez/3050550 to your computer and use it in GitHub Desktop.
高木っぽいRT plugin.rb
# -*- coding: utf-8 -*-
# takagi RT
#
# e.g. :takagi $xx
#
Earthquake.init do
command %r|^:takagi\s+(\d+)$|, :as => :takagi do |m|
st = cache.read("status:" + m[1])
text = sprintf("だったら黙ってろクソが RT @%s %s" % [st["user"]["screen_name"], st["text"]])
async_e { twitter.update(text, :in_reply_to_status_id => m[1]) } if confirm("update '#{text}'")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment