Port to ObjC1.

FossilOrigin-Name: 7f37e545cfcebaba2be9b426cdd4fc2c425982278d1baf68da55458943ad606f
This commit is contained in:
Jonathan Schleifer 2012-10-30 20:27:20 +00:00
parent 279f33ec61
commit 9fbc9c9b30
7 changed files with 374 additions and 189 deletions

View file

@ -28,7 +28,7 @@
#import "IRCUser.h"
#import "IRCChannel.h"
@interface TestApp: OFObject <OFApplicationDelegate, IRCConnectionDelegate>
@interface TestApp: OFObject
@end
OF_APPLICATION_DELEGATE(TestApp)
@ -38,11 +38,11 @@ OF_APPLICATION_DELEGATE(TestApp)
{
IRCConnection *connection = [[IRCConnection alloc] init];
connection.server = @"irc.freenode.net";
connection.nickname = @"ObjIRC";
connection.username = @"ObjIRC";
connection.realname = @"ObjIRC";
connection.delegate = self;
[connection setServer: @"irc.freenode.net"];
[connection setNickname: @"ObjIRC"];
[connection setUsername: @"ObjIRC"];
[connection setRealname: @"ObjIRC"];
[connection setDelegate: self];
[connection connect];
[connection handleConnection];
@ -136,6 +136,6 @@ OF_APPLICATION_DELEGATE(TestApp)
- (void)connection: (IRCConnection*)connection
didReceiveNamesForChannel: (IRCChannel*)channel
{
of_log(@"Users in %@: %@", channel, channel.users);
of_log(@"Users in %@: %@", channel, [channel users]);
}
@end