Index: src/IRCConnection.h ================================================================== --- src/IRCConnection.h +++ src/IRCConnection.h @@ -68,10 +68,11 @@ didReceiveNotice: (OFString*)notice fromUser: (IRCUser*)user inChannel: (IRCChannel*)channel; - (void)connection: (IRCConnection*)connection didReceiveNamesForChannel: (IRCChannel*)channel; +- (void)connectionWasClosed: (IRCConnection*)connection; @end @interface IRCConnection: OFObject { OFTCPSocket *sock; Index: src/IRCConnection.m ================================================================== --- src/IRCConnection.m +++ src/IRCConnection.m @@ -167,10 +167,18 @@ { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init]; OFString *line; OFArray *split; OFString *action = nil; + + if (sock.atEndOfStream) { + if ([delegate respondsToSelector: + @selector(connectionWasClosed:)]) + [delegate connectionWasClosed: self]; + + return; + } @try { line = [sock tryReadLine]; } @catch (OFInvalidEncodingException *e) { line = [sock tryReadLineWithEncoding: Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -1,5 +1,9 @@ all: objfw-compile -Wall -g --lib 0.0 -o objirc *.m clean: rm -f *.o *.so *.dylib *.dll + +install: + cp *.h /usr/local/include/ObjIRC/ + cp libobjirc.dylib /usr/local/lib/