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
# -*- coding: utf-8 -*- | |
# byun tweet / earthquake plugin | |
# | |
# e.g. :byun hoge # => update '=͟͟͞͞h=͟͟͞͞o=͟͟͞͞g=͟͟͞͞e' [Yn] | |
# | |
Earthquake.init do | |
command %r|^:byun\s*(\d+)*\s+(.+)$|, :as => :byun do |m| | |
cmd = m[1] ? ":reply #{m[1]}" : ":update" | |
input("%s %s" % [cmd, m[2].each_char.inject(""){|s,c| s << "=͟͟͞͞#{c}"}]) |