/// <summary> /// Initializes a new instance of the <see cref="IRC"/> class. /// </summary> /// <param name="nick">Bot Nickname</param> /// <param name="realname">Realname</param> /// <param name="username">Username</param> /// <param name="server">Irc Host Address</param> /// <param name="port">Port</param> /// <param name="lastknown">Last known IRC Reply Code</param> /// <param name="colour">Console Color</param> /// <param name="channel">Starting channel</param> /// <param name="key">Starting channel's Key</param> /// <param name="owner">Bot Owner</param> /// <param name="debug">Debug Channel</param> public Irc( string nick, string realname, string username, string nickPass, string server, string serverPassword, int port, ReplyCode lastknown, ConsoleColor colour, string channel, string key = "", string owner = "", string debug = "", string debkey = "" ) { settings = new Settings ( ); this.nick = nick; this.realname = realname; this.username = username; this.host = server; this.port = port; this.code = lastknown; this.colour = colour; this.__nspass = nickPass; this._srvPass = serverPassword; _owner = owner; _dbgchan = debug; _dbkey = debkey; channelBuffer = new Stack<ChannelData> ( ); if ( !string.IsNullOrEmpty ( channel ) ) startchan = channel; if ( !string.IsNullOrEmpty ( key ) ) startkey = key; songman = new LastFMSongManager ( ); //songman.Listen ( ); }
private static void Main ( string[] args ) { if ( !SanityCheck ( ) ) { Console.WriteLine ( "The bot has failed to complete its sanity check...\r\nPlease press any key to exit the Bot..." ); Console.ReadKey ( true ); return; } // Start the timer on ground zero global::BlizzetaZero.Kernel.Global.BeginUptime ( ); // Auth.Authenticate(); Thread t = new Thread ( new ThreadStart ( LaunchGamePanel ) ); // t.Start ( ); Console.Title = Global.Title; Console.WindowWidth += 60; _settings = new Settings ( ); CoreCommands.IncludeBuiltInCommands ( ); SetCharSet ( ); CarpeDiem ( ); Irc irc = new Irc ( Global.Nick, Global.Realname, Global.Username, "", Global.IrcServer, Global.ServerPassword, Global.Port, RFC1459.ReplyCode.ERR_UNKNOWNMODE, ConsoleColor.Green, "#blizzardothegreat", "", "blizzardothegreat", "#blizzetabot", "" ); try { irc.OnMotd += irc_OnMotd; irc.Connect ( irc.Host ); } catch ( Exception e ) { Console.WriteLine ( e.Message ); } }