Improve README
This commit is contained in:
parent
00cccb986d
commit
a50bfb9300
30
README.md
30
README.md
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue