public ChannelModeChangeEventArgs(User user, Channel channel, IEnumerable<ChannelModeInfo> modes, string raw)
 {
     User = user;
     Channel = channel;
     Modes = modes;
     Raw = raw;
 }
Ejemplo n.º 2
0
 public KickEventArgs(User user, Channel channel, string kickee, string reason)
 {
     User = user;
     Channel = channel;
     Kickee = kickee;
     Reason = reason;
 }
Ejemplo n.º 3
0
        public static void RemoveLoggable(Channel chan)
        {
            if (!ChannelExists(chan)) return;

            LogFiles[chan.Server.Url][chan.Name].Close();
            LogFiles[chan.Server.Url].Remove(chan.Name);
        }
Ejemplo n.º 4
0
        public ChannelForm(Channel channel, PluginManager pluginManager)
        {
            InitializeComponent();

            Channel = channel;

            HookEvents();

            nickListBox.UserList = Channel.Users;

            commandTextBox.Focus();
            _pluginManager = pluginManager;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Creates and displays a ChannelForm and adds a node to the WindowManagerTreeView under the appropriate server node
        /// </summary>
        /// <param name="channel"></param>
        public void CreateChannelForm(Channel channel)
        {
            if (InvokeRequired)
            {
                Invoke(new Action<Channel>(CreateChannelForm), new object[] { channel });
            }
            else
            {
                var newChannelForm = CompositionRoot.Resolve<ChannelForm>(new ConstructorArgument("channel", channel));
                ServerTreeNode node = windowManagerTreeView.GetServerNode(channel.Server);

                node.AddChannelNode(new ChannelTreeNode(newChannelForm));
                node.Expand();
                newChannelForm.MdiParent = this;

                newChannelForm.Show();
                newChannelForm.AddLine("Joined: " + channel.Name);

                newChannelForm.Enter += newForm_Enter;
            }
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Parts the specified channel
 /// </summary>
 /// <param name="context"></param>
 /// <param name="channel"></param>
 public void Execute(Channel context, ChannelInfo channel)
 {
     Execute(context.Server, channel, defaultMessage);
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Parts the specified channel with the specified message
 /// </summary>
 /// <param name="context"></param>
 /// <param name="channel"></param>
 /// <param name="message"></param>
 public void Execute(Channel context, ChannelInfo channel, string message)
 {
     Execute(context.Server, channel, message);
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Parts the current channel with a message
 /// </summary>
 /// <param name="context"></param>
 /// <param name="message"></param>
 public void Execute(Channel context, string message)
 {
     context.Part(message);
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Parts the current channel
 /// </summary>
 /// <param name="context"></param>
 public void Execute(Channel context)
 {
     Execute(context, defaultMessage);
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Sends a message to the current channel
 /// </summary>
 /// <param name="channel"></param>
 /// <param name="message"></param>
 public void Execute(Channel channel, string message)
 {
     channel.Say(message);
 }
Ejemplo n.º 11
0
        public Channel CreateChannel(string channelName)
        {
            if (_channels.ContainsKey(channelName))
            {
                return _channels[channelName];
            }

            if (!Rfc2812Util.IsValidChannelName(channelName))
                return null;

            var newChan = new Channel(this, channelName);
            _channels.Add(channelName, newChan);
            ChannelCreated.Fire(this, new ChannelEventArgs(newChan));

            return newChan;
        }
Ejemplo n.º 12
0
 public static void TextEntry(Channel chan, String text)
 {
     if (LoggerActive)
         TextLogger.TextEntry(chan, text);
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Joins you to the specified channel.
 /// </summary>
 public void Execute(Channel context, ChannelInfo channelToJoin)
 {
     Execute(context.Server, channelToJoin);
 }
Ejemplo n.º 14
0
 public void Setup()
 {
     Server serverMock = A.Fake<Server>();
     _channel = new Channel(serverMock, "#mutiny");
 }
Ejemplo n.º 15
0
 public PartEventArgs(User user, Channel channel, string reason)
 {
     User = user;
     Channel = channel;
     Reason = reason;
 }
Ejemplo n.º 16
0
 public static void AddLoggable(Channel chan)
 {
     // Add channel log to the structure
     LogFiles[chan.Server.Url].Add(chan.Name, new LoggedItem(chan.Name, chan.Server.Url));
 }
Ejemplo n.º 17
0
 private static bool ChannelExists(Channel chan)
 {
     return (NetworkExists(chan.Server) && LogFiles[chan.Server.Url].ContainsKey(chan.Name));
 }
Ejemplo n.º 18
0
 public static void TextEntry(Channel chan, String text)
 {
     WriteText(LogFiles[chan.Server.Url][chan.Name], text);
 }
Ejemplo n.º 19
0
 public ChannelMessageEventArgs(User user, Channel channel, string message)
 {
     User = user;
     Channel = channel;
     Message = message;
 }
Ejemplo n.º 20
0
 public ChannelEventArgs(Channel channel)
 {
     Channel = channel;
 }
Ejemplo n.º 21
0
 public void Teardown()
 {
     _channel = null;
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Changes your nick
 /// </summary>
 /// <param name="channel"></param>
 /// <param name="nick"></param>
 public void Execute(Channel channel, string nick)
 {
     Execute(channel.Server, nick);
 }