public void Initialize(Block config, IrcClient client) { client.ConnectionEstablishedEvent += OnClientConnect; for (int i = 0; i < config.CountBlock("channel"); ++i) { Block c = config.GetBlock("channel", i); string channel = c.GetString("name"); if (string.IsNullOrEmpty(channel)) continue; channels.Add(channel); } }
public void Initialize(Block config, IrcClient client) { client.ConnectionEstablishedEvent += OnClientConnect; for (int i = 0; i < config.CountBlock("command"); ++i) { Block cmd = config.GetBlock("command", i); string exec = cmd.GetString("exec"); if (!String.IsNullOrEmpty(exec)) { commands.Enqueue(exec); } } }
public static void Main(string[] args) { Console.Title = "Atlantis.Net.Irc.IrcClient TestApp"; Console.WriteLine("[*] Setting IrcClient up."); IrcClient c = new IrcClient(); c.Host = "irc.unifiedtech.org"; c.Port = new PortInfo(6667, false); c.Nick = "irctest"; c.IsBackgroundThread = false; c.WriteLog = true; c.ConnectionEstablishedEvent += (s, e) => { Console.WriteLine("[*] Connected to IRC - Joining #unifiedtech"); ((IrcClient)s).Send("JOIN #unifiedtech"); }; c.ChannelMessageReceivedEvent += (s, e) => { var client = ((IrcClient)s); string[] toks = e.Message.Split(' '); if (toks[0].EqualsIgnoreCase("!test")) { Console.WriteLine("[*] Test command initiated - Starting 100 lines of text using Queue."); for (Int32 i = 0; i < 101; ++i) { var chan = client.GetChannel("#unifiedtech"); chan.Message("Test #{0} - Timestamp: {1} - User Count: {2}", i, DateTime.Now.ToShortTimeString(), chan.Users.Count); } } }; c.Start(); Console.ReadLine(); }
internal Channel(IrcClient client, string channelName) : this() { this.client = client; Name = channelName; }
public void Initialize(Block config, IrcClient client) { Rehash(config); // TODO: Initialize }
public PrefixListComparer(IrcClient client) { _client = client; }
protected RfcCommand(IrcClient origin) { this.origin = origin; }
public PrefixList(IrcClient client) { _client = client; prefixes = new char[client.Prefixes.Length]; }