Esempio n. 1
0
 private static void HandleEventLoop(IrcDotNet.IrcClient client)
 {
     bool isExit = false;
     while (!isExit)
     {
         Console.Write ("> ");
         var command = Console.ReadLine();
         switch (command)
         {
             case "exit":
                 isExit = true;
                 break;
             default:
                 if (!string.IsNullOrEmpty(command))
                 {
                     if (command.StartsWith("/") && command.Length > 1)
                     {
                         client.SendRawMessage(command.Substring(1));
                     }
                     else
                     {
                         Console.WriteLine("unknown command '{0}'", command);
                     }
                 }
                 break;
         }
     }
     client.Disconnect();
 }
Esempio n. 2
0
        protected override void OnClientRegistered(IrcDotNet.IrcClient client)
        {
            //client.SendRawMessage("MSG nickserv register temp123! [email protected]");
            client.SendRawMessage("MSG nickserv identify temp123!");

            client.Channels.Join(ChannelName);
        }