ObjIRC  Diff

Differences From Artifact [a1343091ca]:

To Artifact [3f5ec0521c]:


44
45
46
47
48
49
50
51
52
53
54
55

56
57
58
59
60
61

62
63
64
65
66
67
68
	self = [super init];

	@try {
		char *tmp;

		if ((tmp2 = strdup([string UTF8String])) == NULL)
			@throw [OFOutOfMemoryException
			     newWithClass: isa
			    requestedSize: [string UTF8StringLength]];

		if ((tmp = strchr(tmp2, '@')) == NULL)
			@throw [OFInvalidFormatException newWithClass: isa];


		*tmp = '\0';
		hostname = [[OFString alloc] initWithUTF8String: tmp + 1];

		if ((tmp = strchr(tmp2, '!')) == NULL)
			@throw [OFInvalidFormatException newWithClass: isa];


		*tmp = '\0';
		username = [[OFString alloc] initWithUTF8String: tmp + 1];

		nickname = [[OFString alloc] initWithUTF8String: tmp2];
	} @catch (id e) {
		[self release];







|
|


|
>





|
>







44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
	self = [super init];

	@try {
		char *tmp;

		if ((tmp2 = strdup([string UTF8String])) == NULL)
			@throw [OFOutOfMemoryException
			     exceptionWithClass: isa
				  requestedSize: [string UTF8StringLength]];

		if ((tmp = strchr(tmp2, '@')) == NULL)
			@throw [OFInvalidFormatException
			    exceptionWithClass: isa];

		*tmp = '\0';
		hostname = [[OFString alloc] initWithUTF8String: tmp + 1];

		if ((tmp = strchr(tmp2, '!')) == NULL)
			@throw [OFInvalidFormatException
			    exceptionWithClass: isa];

		*tmp = '\0';
		username = [[OFString alloc] initWithUTF8String: tmp + 1];

		nickname = [[OFString alloc] initWithUTF8String: tmp2];
	} @catch (id e) {
		[self release];