Created
March 20, 2012 15:24
-
-
Save penguin2716/2136970 to your computer and use it in GitHub Desktop.
診断メーカーで「ぷくぷく」に当たった人をふぁぼってRTして「おめぷく!」って返すmikutterプラグイン
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Plugin.create :omepuku do | |
| on_appear do |ms| | |
| ms.each do |m| | |
| if m.message.to_s =~ /ぷくぷく https?:\/\/\S+ / | |
| msg = m.message | |
| if msg.retweet? | |
| msg = msg.retweet_source(true) | |
| end | |
| Service.primary.post :message => "@#{msg.user.to_s} おめぷく!", :replyto => msg | |
| msg.retweet | |
| msg.favorite(true) | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment