public ChannelModeChangeEventArgs(User user, Channel channel, IEnumerable<ChannelModeInfo> modes, string raw)
 {
     User = user;
     Channel = channel;
     Modes = modes;
     Raw = raw;
 }
Exemple #2
0
 public KickEventArgs(User user, Channel channel, string kickee, string reason)
 {
     User = user;
     Channel = channel;
     Kickee = kickee;
     Reason = reason;
 }
Exemple #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);
        }
Exemple #4
0
        public ChannelForm(Channel channel, PluginManager pluginManager)
        {
            InitializeComponent();

            Channel = channel;

            HookEvents();

            nickListBox.UserList = Channel.Users;

            commandTextBox.Focus();
            _pluginManager = pluginManager;
        }
Exemple #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;
            }
        }
Exemple #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);
 }
Exemple #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);
 }
Exemple #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);
 }
Exemple #9
0
 /// <summary>
 /// Parts the current channel
 /// </summary>
 /// <param name="context"></param>
 public void Execute(Channel context)
 {
     Execute(context, defaultMessage);
 }
Exemple #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);
 }
Exemple #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;
        }
 public static void TextEntry(Channel chan, String text)
 {
     if (LoggerActive)
         TextLogger.TextEntry(chan, text);
 }
Exemple #13
0
 /// <summary>
 /// Joins you to the specified channel.
 /// </summary>
 public void Execute(Channel context, ChannelInfo channelToJoin)
 {
     Execute(context.Server, channelToJoin);
 }
Exemple #14
0
 public void Setup()
 {
     Server serverMock = A.Fake<Server>();
     _channel = new Channel(serverMock, "#mutiny");
 }
Exemple #15
0
 public PartEventArgs(User user, Channel channel, string reason)
 {
     User = user;
     Channel = channel;
     Reason = reason;
 }
Exemple #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));
 }
Exemple #17
0
 private static bool ChannelExists(Channel chan)
 {
     return (NetworkExists(chan.Server) && LogFiles[chan.Server.Url].ContainsKey(chan.Name));
 }
Exemple #18
0
 public static void TextEntry(Channel chan, String text)
 {
     WriteText(LogFiles[chan.Server.Url][chan.Name], text);
 }
 public ChannelMessageEventArgs(User user, Channel channel, string message)
 {
     User = user;
     Channel = channel;
     Message = message;
 }
 public ChannelEventArgs(Channel channel)
 {
     Channel = channel;
 }
Exemple #21
0
 public void Teardown()
 {
     _channel = null;
 }
Exemple #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);
 }