Skip to content

Instantly share code, notes, and snippets.

@mayuki
Created August 5, 2009 17:15
Show Gist options
  • Save mayuki/162837 to your computer and use it in GitHub Desktop.
Save mayuki/162837 to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
import clr
from System import *
from System.Collections.Generic import *
from System.Diagnostics import Trace
import Misuzilla.Applications.TwitterIrcGateway
import Misuzilla.Applications.TwitterIrcGateway.AddIns
import Misuzilla.Applications.TwitterIrcGateway.AddIns.Console
from Misuzilla.Net.Irc import *
from Misuzilla.Applications.TwitterIrcGateway.AddIns import IConfiguration
from Misuzilla.Applications.TwitterIrcGateway.AddIns.Console import ConsoleAddIn, Console, Context
from Misuzilla.Applications.TwitterIrcGateway.AddIns.DLRIntegration import DLRIntegrationAddIn, DLRBasicConfiguration, DLRContextHelper
# メインチャンネルから除くユーザ
exclude_users = ["mayuki"]
def onPreSendGroupMessageTimelineStatus(sender, e):
if (e.Group.Name == CurrentSession.Config.ChannelName) and e.Status.User.ScreenName in exclude_users:
e.Cancel = True
def onBeforeUnload(sender, e):
CurrentSession.PreSendGroupMessageTimelineStatus -= onPreSendGroupMessageTimelineStatus
CurrentSession.PreSendGroupMessageTimelineStatus += onPreSendGroupMessageTimelineStatus
CurrentSession.AddInManager.GetAddIn[DLRIntegrationAddIn]().BeforeUnload += onBeforeUnload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment