Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.
/ IRC_Library Public archive

Simple Object-oriented C# IRC Client Library. Can be used for both bots and clients.

Notifications You must be signed in to change notification settings

AbitTheGray/IRC_Library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IRC_Library

Simple Object-oriented C# IRC Client Library. Can be used for both bots and clients.

Simple Client

Create simple IRC client. This code works like telnet (after connecting to server) so you have to write full IRC commands but it is useful for testing.

Code

Console.WriteLine("Starting...");

IRC irc = new IRC("<server>", 6667);

irc.RawMessageReceived += Console.WriteLine;

Console.CancelKeyPress += (sender, e) =>
{
    if (irc.Connected)
        irc.Quit();
    Environment.Exit(1);
};

Console.WriteLine("Connecting...");

irc.Connect("<nick>", "<username>", "<real_name>");

Console.WriteLine("Connected");

while (true)
{
    string line = Console.ReadLine();
    if (string.IsNullOrWhiteSpace(line))
        break;
    irc.SendRawMessage(line);
}

if (irc.Connected)
    irc.Close();

About

Simple Object-oriented C# IRC Client Library. Can be used for both bots and clients.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages