Created
February 10, 2014 09:28
-
-
Save penguin2716/8912876 to your computer and use it in GitHub Desktop.
「はい」を全て「拝承」に書き換えてからツイートするmikutterプラグイン
This file contains 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
# -*- coding: utf-8 -*- | |
Plugin.create :haishou do | |
filter_gui_postbox_post do |gui_postbox| | |
text = Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text.gsub(/はい/, "拝承") | |
Service.primary.post :message => text | |
Plugin.call(:before_postbox_post, text) | |
Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text = '' | |
Plugin.filter_cancel! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment