Created
December 18, 2009 12:25
-
-
Save eagletmt/259467 to your computer and use it in GitHub Desktop.
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
# TypableMap: 公式RT | |
Misuzilla::IronRuby::TypableMap.register("rt", "ReTweet Command") do |p, msg, status, args| | |
System::Diagnostics::Trace.WriteLine("RT: #{status.to_string}") | |
Session.RunCheck(Misuzilla::Applications::TwitterIrcGateway::Procedure.new{ | |
Session.twitter_service.POST("/statuses/retweet/#{status.id}.xml", System::Array[System::Byte].new(0)) | |
Session.send_channel_message("RT: #{status.text}") | |
}, System::Action[System::Exception].new{|ex| | |
Session.send_channel_message(msg.receiver, Server.server_nick, "メッセージ送信に失敗しました", false, false, true) | |
}) | |
true # true を返すとハンドルしたことになりステータス更新処理は行われない | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment