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

            Channel = channel;

            HookEvents();

            nickListBox.UserList = Channel.Users;

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