IRC client framework (wrapper around libircclient library).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README 3.1KB

This is a modified version of the IRCClient framework by Nathan Ollerenshaw. I’ve rewritten it to allow robust support for arbitrary text encodings, and fixed various other problems. The original version is available here: http://sourceforge.net/projects/libircclient/ (distributed alongside the libircclient library).

- Said Achmiz

---

ADDING IRCCLIENT TO YOUR APPLICATION
(using Xcode)
(these instructions apply to Xcode 7.1.1, build 7B1005)

0. Build libircclient and add it to the IRCClient project (see file “README_libircclient” for details)

1. Place the entire IRCClient folder in your project folder

2. Using “File -> Add Files…”, add IRCClient.xcodeproj to your project

3. Build the IRCClient framework target

4. Make sure the “Header Search Paths” build setting of your project contains the following entry:

$(PROJECT_DIR)/

(non-recursive)

5. Configure the build phases for your application target thusly:

i. Add IRCClient.framework to “Link Binary With Libraries”
ii. Add IRCClient.framework to “Target Dependencies”
iii. Add a “Copy Files” build phase
iv. Set destination for the just-added “Copy Files” build phase to “Frameworks”
v. Add IRCClient.framework to the just-added “Copy Files” build phase

6. Import IRCClient’s API into your code using “#import <IRCClient/IRCClient.h>”

7. If you’re using Swift in your project, add “IRCClient/IRCClient.h” to the “Objective-C Bridging Header” build setting.

---

See the following header files for documentation:

IRCClientSession.h
IRCClientSessionDelegate.h
IRCClientChannel.h
IRCClientChannelDelegate.h

---

NOTE on strings:

IRCClient stores and passes all strings (messages, nicks, channel names, mode strings, channel topics, etc.) as NSData objects, which contain null-terminated C strings. Values passed to framework methods (such as the IRC commands) should also be in this format[1]. This means that IRCClient is encoding-agnostic[2]; it is up to you to pass it properly encoded C-string representations of your text strings, and it is also up to you to select an appropriate encoding for display or other handling of received strings, as necessary. The 'encoding' property of IRCClientSession and IRCClientChannel may be useful in this regard (i.e. for the convenience of associating a server's or channel's preferred encoding with the relevant server or channel object), although note that this property is almost entirely epiphenomenal[3].

[1] Although note that if you pass unterminated strings instead, IRCClient will add the null termination for you - but there is a slight performance penalty for this, so be sure to null-terminate the contents of your NSData objects, for optimal performance.

[2] Of course, IRCClient does not support UTF-16 nor any other non-8-bit encoding (since the byte representations of such encodings may contain nulls, and therefore cannot be used as C strings), but the IRC protocol does not support such encodings either.

[3] The 'encoding' property of IRCClientSession does have one effect: it controls the encoding used by replies to CTCP TIME requests.