Exemplo n.º 1
0
        public static void TurnOn()
        {
            Server.ChannelCreated += ChannelManager_ElementCreated;
            Server.ChannelRemoved += ChannelManager_ElementRemoved;

            ServerManager.Instance.ServerAdded   += ServerManager_ElementCreated;
            ServerManager.Instance.ServerRemoved += ServerManager_ElementRemoved;

            foreach (Server ntw in ServerManager.Instance.ServerList)
            {
                TextLogger.AddLoggable(ntw);

                foreach (Channel chan in ntw.Channels.Values)
                {
                    TextLogger.AddLoggable(chan);
                }
            }
        }
Exemplo n.º 2
0
 private static void ChannelManager_ElementCreated(object sender, ChannelEventArgs args)
 {
     TextLogger.AddLoggable(args.Channel);
 }
Exemplo n.º 3
0
 private static void ServerManager_ElementCreated(object sender, ServerEventArgs args)
 {
     TextLogger.AddLoggable(args.Server);
 }