Giter Club home page Giter Club logo

chatsharp's Introduction

ChatSharp

A C# library for chatting on an IRC (Internet Relay Protocol) network.

Supports most of RFC 1459 and a little of 2812.

ChatSharp is still a young project. You should expect many things not to work, some features to be missing, and some things to change later on.

Example

Here's an example of using this library:

var client = new IrcClient("irc.freenode.net", new IrcUser("ChatSharp", "ChatSharp"));
client.ConnectionComplete += (s, e) => client.Join("#botwar");
client.ChannelMessageRecieved += (s, e) =>
{
	var channel = client.Channels[e.PrivateMessage.Source];
	// Respond to a few commands
	if (e.PrivateMessage.Message == ".list")
		channel.SendMessage(string.Join(", ", channel.Users.Select(u => u.Nick)));
	else if (e.PrivateMessage.Message.StartsWith(".ban "))
	{
		if (!channel.Operators.Contains(client.User))
		{
			channel.SendMessage("I'm not an op here!");
			return;
		}
		var target = e.PrivateMessage.Message.Substring(5);
		client.WhoIs(target, whois => channel.Ban("*!*@" + whois.User.Hostname));
	}
};
client.Connect();

while (true) ; // Do nothing

Compiling

To compile ChatSharp on Windows, add C:\Windows\Microsoft.NET\Framework\v4.0.30319 to your PATH. Then, from the root of the ChatSharp repository, run this:

msbuild

On Linux and Mac, install Mono, then run this from the root of the CraftSharp repository:

xbuild

Getting Help

If you find a bug or wish to request a feature, create a GitHub issue. You may also create an issue to simply ask a question.

Licensing

ChatSharp uses the permissive MIT license.

In a nutshell:

  • You are not restricted on usage of ChatSharp; commercial, private, etc, all fine.
  • The developers are not liable for what you do with it.
  • ChatSharp is provided "as is" with no warranty.

chatsharp's People

Contributors

ddevault avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.