CwIRC.Interface.NICK C# (CSharp) Method

NICK() public method

Sends the NICK message to the IRC server, with the specified desired nickname.
public NICK ( string p_name ) : void
p_name string The desired nickname.
return void
        public void NICK(string p_name)
        {
            SendData("NICK " + p_name);
        }

Usage Example

コード例 #1
0
ファイル: MoronBot.cs プロジェクト: StarlitGhost/MoronBot
        /// <summary>
        /// Constructor for MoronBot.
        /// This is where:
        ///  - All of the Bot's Functions are loaded.
        ///  - Settings is initialized from xml.
        ///  - The initial connection to the server is made.
        /// </summary>
        public MoronBot()
        {
            if (!LoadXML("settings.xml"))
            {
                SaveXML("settings.xml");
            }

            LoadFunctions();

            //PluginLoader.WatchDirectory(Settings.Instance.FunctionPath, FuncDirChanged);

            Nick = Settings.Instance.Nick;

            cwIRC = CwIRC.Interface.Instance;

            cwIRC.MessageReceived += CwIRC_MessageReceived;
            cwIRC.Connect(Settings.Instance.Server, Settings.Instance.Port);
            cwIRC.NICK(Nick);
            cwIRC.USER(Nick, "Nope", "Whatever", "MoronBot 0.1.6");
            cwIRC.SendData("PASS mOrOnBoTuS");
            Say("identify mOrOnBoTuS", "NickServ");

            cwIRC.JOIN(Settings.Instance.Channel);

            connectionTimer.Elapsed += new System.Timers.ElapsedEventHandler(connectionTimer_Elapsed);
            connectionTimer.Interval = 120000;
            connectionTimer.Enabled  = true;
        }
All Usage Examples Of CwIRC.Interface::NICK