diff --git a/src/IRCUser.h b/src/IRCUser.h index 08c8306..936194f 100644 --- a/src/IRCUser.h +++ b/src/IRCUser.h @@ -31,6 +31,6 @@ @property (copy, readonly) OFString *nickname, *username, *hostname; -+ IRCUserWithString: (OFString*)str; -- initWithString: (OFString*)str; ++ IRCUserWithString: (OFString*)string; +- initWithString: (OFString*)string; @end diff --git a/src/IRCUser.m b/src/IRCUser.m index 557a84c..3718ac8 100644 --- a/src/IRCUser.m +++ b/src/IRCUser.m @@ -32,12 +32,12 @@ @implementation IRCUser @synthesize username, nickname, hostname; -+ IRCUserWithString: (OFString*)str ++ IRCUserWithString: (OFString*)string { - return [[[self alloc] initWithString: str] autorelease]; + return [[[self alloc] initWithString: string] autorelease]; } -- initWithString: (OFString*)str +- initWithString: (OFString*)string { char *tmp2 = NULL; @@ -46,24 +46,24 @@ @try { char *tmp; - if ((tmp2 = strdup(str.cString)) == NULL) + if ((tmp2 = strdup([string UTF8String])) == NULL) @throw [OFOutOfMemoryException newWithClass: isa - requestedSize: str.cStringLength]; + requestedSize: [string UTF8StringLength]]; if ((tmp = strchr(tmp2, '@')) == NULL) @throw [OFInvalidFormatException newWithClass: isa]; *tmp = '\0'; - hostname = [[OFString alloc] initWithCString: tmp + 1]; + hostname = [[OFString alloc] initWithUTF8String: tmp + 1]; if ((tmp = strchr(tmp2, '!')) == NULL) @throw [OFInvalidFormatException newWithClass: isa]; *tmp = '\0'; - username = [[OFString alloc] initWithCString: tmp + 1]; + username = [[OFString alloc] initWithUTF8String: tmp + 1]; - nickname = [[OFString alloc] initWithCString: tmp2]; + nickname = [[OFString alloc] initWithUTF8String: tmp2]; } @catch (id e) { [self release]; @throw e;