Created
April 26, 2010 05:36
-
-
Save mashiro/379008 to your computer and use it in GitHub Desktop.
公式RTに♺をつける
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
| import re | |
| from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRIntegrationAddIn | |
| rt_symbol = unichr(0x267A) | |
| rt_color = 10 | |
| def color(str, num): | |
| return '%c%s %s' % (chr(0x03), num, str) | |
| def OnPreSendMessageTimelineStatus(sender, e): | |
| if hasattr(e.Status, "RetweetedStatus"): | |
| if e.Status.RetweetedStatus != None: | |
| e.Text = "%s %s" % (color(rt_symbol, rt_color), color(e.Text, 1)) | |
| def OnBeforeUnload(sender, e): | |
| CurrentSession.PreSendMessageTimelineStatus -= OnPreSendMessageTimelineStatus | |
| CurrentSession.PreSendMessageTimelineStatus += OnPreSendMessageTimelineStatus | |
| CurrentSession.AddInManager.GetAddIn(DLRIntegrationAddIn).BeforeUnload += OnBeforeUnload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RTしてもRetweetedStatusがないっぽいのが謎
Coreのバージョン変えたんだっけかなー覚えてない