ObjIRC  Check-in [a372ef7d50]

Overview
Comment:Add support for sending messages.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a372ef7d502ced8bb8228baed8f1fbaef3452b6de1efd0f5106e4e673d3384a2
User & Date: js on 2011-09-09 17:00:22
Other Links: manifest | tags
Context
2011-09-09
20:13
Make command parsing case-insensitive. check-in: f816d8f084 user: js tags: trunk
17:00
Add support for sending messages. check-in: a372ef7d50 user: js tags: trunk
16:53
Revert "fix" for parsing JOIN as it broke stuff. check-in: 960f920c6d user: js tags: trunk
Changes

Modified src/IRCConnection.h from [7255dcdba9] to [6e7b90df78].

75
76
77
78
79
80
81




82
83
75
76
77
78
79
80
81
82
83
84
85
86
87







+
+
+
+


- (void)disconnectWithReason: (OFString*)reason;
- (void)joinChannel: (OFString*)channelName;
- (void)leaveChannel: (IRCChannel*)channel;
- (void)leaveChannel: (IRCChannel*)channel
	  withReason: (OFString*)reason;
- (void)sendLine: (OFString*)line;
- (void)sendLineWithFormat: (OFConstantString*)line, ...;
- (void)sendMessage: (OFString*)msg
	  toChannel: (IRCChannel*)channel;
- (void)sendMessage: (OFString*)msg
	     toUser: (IRCUser*)user;
- (void)handleConnection;
@end

Modified src/IRCConnection.m from [32c0490d1d] to [5c9189780c].

121
122
123
124
125
126
127












128
129
130
131
132
133
134
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146







+
+
+
+
+
+
+
+
+
+
+
+







				       arguments: args] autorelease];
	va_end(args);

	[self sendLine: line];

	[pool release];
}

- (void)sendMessage: (OFString*)msg
	  toChannel: (IRCChannel*)channel
{
	[self sendLineWithFormat: @"PRIVMSG %@ :%@", channel.name, msg];
}

- (void)sendMessage: (OFString*)msg
	     toUser: (IRCUser*)user
{
	[self sendLineWithFormat: @"PRIVMSG %@ :%@", user.nickname, msg];
}

- (void)handleConnection
{
	OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
	OFString *line;
	OFArray *split;