Skip to content

Instantly share code, notes, and snippets.

@penguin2716
Last active August 29, 2015 14:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save penguin2716/0657d5c897ea4491f081 to your computer and use it in GitHub Desktop.
Save penguin2716/0657d5c897ea4491f081 to your computer and use it in GitHub Desktop.
自分で "abort-mikutter" とツイートすると,mikutterをリモートで終了させるmikutterプラグイン
#-*- 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