Last active
August 29, 2015 14:07
-
-
Save penguin2716/0657d5c897ea4491f081 to your computer and use it in GitHub Desktop.
自分で "abort-mikutter" とツイートすると,mikutterをリモートで終了させる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 :security_crash do | |
# キーワードを設定 | |
UserConfig[:security_crash_keyword] ||= 'abort-mikutter' | |
# TLに流れてきたすべてのツイートを監視 | |
on_appear do |ms| | |
ms.each do |m| | |
# 投稿者が自分で,上記のキーワードと一致しているか確認 | |
if m.user.is_me? and m.to_s == UserConfig[:security_crash_keyword] | |
# mikutterを終了させる | |
Gtk.main_quit | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment