ObjIRC  Diff

Differences From Artifact [1929310778]:

To Artifact [20dac0f662]:


213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
					  didSeeUser: user
					 joinChannel: channel];

			continue;
		}

		/* PART */
		if ([action isEqual: @"part"] && split.count >= 3) {
			OFString *who = [split objectAtIndex: 0];
			OFString *where = [split objectAtIndex: 2];
			IRCUser *user;
			IRCChannel *channel;
			OFString *reason = nil;
			size_t pos = who.length + 1 +
			    [[split objectAtIndex: 1] length] + 1 +







|







213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
					  didSeeUser: user
					 joinChannel: channel];

			continue;
		}

		/* PART */
		if ([action isEqual: @"PART"] && split.count >= 3) {
			OFString *who = [split objectAtIndex: 0];
			OFString *where = [split objectAtIndex: 2];
			IRCUser *user;
			IRCChannel *channel;
			OFString *reason = nil;
			size_t pos = who.length + 1 +
			    [[split objectAtIndex: 1] length] + 1 +
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
			    [[split objectAtIndex: 1] length] + 1 +
			    to.length;

			from = [from substringWithRange:
			    of_range(1, from.length - 1)];
			msg = [line substringWithRange:
			    of_range(pos + 2, line.length - pos - 2)];

			user = [IRCUser IRCUserWithString: from];

			if (![to isEqual: nickname]) {
				IRCChannel *channel;

				channel = [channels objectForKey: to];








<







302
303
304
305
306
307
308

309
310
311
312
313
314
315
			    [[split objectAtIndex: 1] length] + 1 +
			    to.length;

			from = [from substringWithRange:
			    of_range(1, from.length - 1)];
			msg = [line substringWithRange:
			    of_range(pos + 2, line.length - pos - 2)];

			user = [IRCUser IRCUserWithString: from];

			if (![to isEqual: nickname]) {
				IRCChannel *channel;

				channel = [channels objectForKey: to];

326
327
328
329
330
331
332













































333
334
335
336
337
338
339
				     @selector(connection:
				     didReceivePrivateMessage:fromUser:)])
					[delegate
					    connection: self
					    didReceivePrivateMessage: msg
					    fromUser: user];
			}














































			continue;
		}

		[pool releaseObjects];
	}








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
				     @selector(connection:
				     didReceivePrivateMessage:fromUser:)])
					[delegate
					    connection: self
					    didReceivePrivateMessage: msg
					    fromUser: user];
			}

			continue;
		}

		/* NOTICE */
		if ([action isEqual: @"NOTICE"] && split.count >= 4) {
			OFString *from = [split objectAtIndex: 0];
			OFString *to = [split objectAtIndex: 2];
			IRCUser *user = nil;
			OFString *notice;
			size_t pos = from.length + 1 +
			    [[split objectAtIndex: 1] length] + 1 +
			    to.length;

			from = [from substringWithRange:
			    of_range(1, from.length - 1)];
			notice = [line substringWithRange:
			    of_range(pos + 2, line.length - pos - 2)];

			if (![from containsString: @"!"] || [to isEqual: @"*"])
				/* System message - ignore for now */
				continue;

			user = [IRCUser IRCUserWithString: from];

			if (![to isEqual: nickname]) {
				IRCChannel *channel;

				channel = [channels objectForKey: to];

				if ([delegate respondsToSelector:
				    @selector(connection:didReceiveNotice:
				    fromUser:inChannel:)])
					[delegate connection: self
					    didReceiveNotice: notice
						    fromUser: user
						   inChannel: channel];
			} else {
				if ([delegate respondsToSelector:
				    @selector(connection:didReceiveNotice:
				    fromUser:)])
					[delegate connection: self
					    didReceiveNotice: notice
						    fromUser: user];
			}

			continue;
		}

		[pool releaseObjects];
	}