Skip to content
/ IRC Public

A fun Swift framework for interacting with IRC servers.

License

Notifications You must be signed in to change notification settings

sgoodwin/IRC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IRC

A Swift framework for interacting with IRC servers.

Supported Features

  • Connect to IRC servers
  • Join IRC Channels
  • Send and receieve messages to and from said channels

There's quite a bit more to IRC in general, but for now this is all we support. Feel free to file an issue to request anything else if you're trying to use this somewhere.

Usage

Connecting To A Server

let user = IRCUser(username: "sgoodwin", realName: "Samuel Goodwin", nick: "mukman")
let server = IRCServer.connect("127.0.0.1", port: 6667, user: user)

From here a connection is established. To receieve any messages from the server, such as the message of the day, you must adopt the IRCServerDelegate protocol with some object and assign it to the delegate property of the server.

Joining IRC Channels

let channel = server.join("clearlyafakechannel")

This will cause you to join the channel #clearlyafakechannel.

Receieving Channel Messages

To receieve messages from a channel, have one of your objects adopt the IRCChannelDelegate protocol and assign it to the delegate property of the channel.

Sending Channel Messages

channel.send("Hey sup")

This will send "Hey sup" for everyone in the channel to see.

FIN

That's it for now. There may be more functionality in the future, but this is enough to make a fun demo and show people. Most error conditions are also not considered, because demos don't need to care!

About

A fun Swift framework for interacting with IRC servers.

Resources

License

Stars

Watchers

Forks

Packages

No packages published