Improve README

This commit is contained in:
Drew DeVault 2015-07-31 19:53:43 -04:00
parent 00cccb986d
commit a50bfb9300
1 changed files with 26 additions and 4 deletions

View File

@ -2,15 +2,20 @@
A C# library for chatting on an IRC (Internet Relay Protocol) network.
Supports a lot of RFC 1459 and a little of 2812. Should be sufficient for most of your IRC bot-making needs.
Supports a lot of RFC 1459 and a little of 2812.
## Example
```csharp
var client = new IrcClient("irc.freenode.net", new IrcUser("ChatSharp", "ChatSharp"));
client.ConnectionComplete += (s, e) => client.JoinChannel("#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 "))
@ -24,12 +29,29 @@ client.ChannelMessageRecieved += (s, e) =>
client.WhoIs(target, whois => channel.Ban("*!*@" + whois.User.Hostname));
}
};
client.ConnectAsync();
while (true) ; // Do nothing
while (true) ; // Waste CPU cycles
```
## Development
## Compiling
On Linux/Mac:
xbuild /p:Configuration=Release
On Windows, use Visual Studio or similar and build in Release mode.
Regardless of platform, you'll receive binaries in `ChatSharp/bin/Release/`.
ChatSharp has no dependencies.
## Support
Open a [Github issue](https://github.com/SirCmpwn/ChatSharp/issues) describing
your problem.
## Development / Contributing
ChatSharp is developed with the following workflow: