ObjIRC  Check-in [aa89dd371b]

Overview
Comment:Cleaner PONG
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: aa89dd371b37464a34e19a8b50e5cf9c63362ba9db7a1322c1a3453b34a37e2b
User & Date: js on 2016-05-07 11:23:50
Other Links: manifest | tags
Context
2016-05-07
11:45
Update copyright check-in: 85f791ce81 user: js tags: trunk
11:23
Cleaner PONG check-in: aa89dd371b user: js tags: trunk
11:21
Adjust to ObjFW changes check-in: e7f0831117 user: js tags: trunk
Changes

Modified src/IRCConnection.m from [59f01b1597] to [b787e38849].

228
229
230
231
232
233
234
235
236


237
238
239
240
241
242
243
228
229
230
231
232
233
234


235
236
237
238
239
240
241
242
243







-
-
+
+








	components = [line componentsSeparatedByString: @" "];

	/* PING */
	if ([components count] == 2 &&
	    [[components firstObject] isEqual: @"PING"]) {
		OFMutableString *s = [[line mutableCopy] autorelease];
		[s replaceOccurrencesOfString: @"PING"
				   withString: @"PONG"];
		[s replaceCharactersInRange: of_range(0, 4)
				 withString: @"PONG"];
		[self sendLine: s];

		return;
	}

	action = [[components objectAtIndex: 1] uppercaseString];