@@ -31,11 +31,11 @@ #import #import "IRCUser.h" @implementation IRCUser -+ IRCUserWithString: (OFString*)string ++ (instancetype)IRCUserWithString: (OFString*)string { return [[[self alloc] initWithString: string] autorelease]; } - initWithString: (OFString*)string @@ -47,23 +47,21 @@ @try { char *tmp; if ((tmp2 = strdup([string UTF8String])) == NULL) @throw [OFOutOfMemoryException - exceptionWithClass: [self class] - requestedSize: [string UTF8StringLength]]; + exceptionWithRequestedSize: + [string UTF8StringLength]]; if ((tmp = strchr(tmp2, '@')) == NULL) - @throw [OFInvalidFormatException - exceptionWithClass: [self class]]; + @throw [OFInvalidFormatException exception]; *tmp = '\0'; _hostname = [[OFString alloc] initWithUTF8String: tmp + 1]; if ((tmp = strchr(tmp2, '!')) == NULL) - @throw [OFInvalidFormatException - exceptionWithClass: [self class]]; + @throw [OFInvalidFormatException exception]; *tmp = '\0'; _username = [[OFString alloc] initWithUTF8String: tmp + 1]; _nickname = [[OFString alloc] initWithUTF8String: tmp2]; @@ -87,21 +85,21 @@ [super dealloc]; } - (OFString*)username { - OF_GETTER(_username, YES) + OF_GETTER(_username, true) } - (OFString*)nickname { - OF_GETTER(_nickname, YES) + OF_GETTER(_nickname, true) } - (OFString*)hostname { - OF_GETTER(_hostname, YES) + OF_GETTER(_hostname, true) } - copy { return [self retain];