|
From: <ria...@us...> - 2002-10-28 22:37:53
|
Update of /cvsroot/aquachat/AquaChat
In directory usw-pr-cvs1:/tmp/cvs-serv16595
Modified Files:
ACIncomingMessageParser.m ACOutgoingMessageParser.m
Log Message:
Index: ACIncomingMessageParser.m
===================================================================
RCS file: /cvsroot/aquachat/AquaChat/ACIncomingMessageParser.m,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ACIncomingMessageParser.m 27 Oct 2002 22:26:58 -0000 1.1
+++ ACIncomingMessageParser.m 28 Oct 2002 22:37:26 -0000 1.2
@@ -93,7 +93,8 @@
{
NSLog(@"*** -%@- NOTICE: %@", [delegate connectedServer], ACArrayContentsAsString(params));
[delegate displayText:
- [NSString stringWithFormat:@"*** -%@- NOTICE: %@\n", [delegate connectedServer], [params objectAtIndex:0]]
+ [NSString stringWithFormat:@"*** -%@- NOTICE: %@\n", [delegate connectedServer],
+ ACArrayContentsAsString(params)]
onTab:@"server"];
}
@@ -101,7 +102,7 @@
{
[delegate displayText:[NSString stringWithFormat:@"*** PING %@\n", [delegate connectedServer]]
onTab:@"server"];
- [delegate sendData:[NSString stringWithFormat:@"PONG :%@", [params objectAtIndex:0]]];
+ [delegate sendData:[NSString stringWithFormat:@"PONG :%@\r", [params objectAtIndex:0]]];
}
Index: ACOutgoingMessageParser.m
===================================================================
RCS file: /cvsroot/aquachat/AquaChat/ACOutgoingMessageParser.m,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ACOutgoingMessageParser.m 27 Oct 2002 22:26:58 -0000 1.1
+++ ACOutgoingMessageParser.m 28 Oct 2002 22:37:27 -0000 1.2
@@ -10,17 +10,15 @@
ACDefineOMA(join, delegate, params)
{
- NSString *str = [[NSString alloc] init];
NSString *chanString = [[NSString alloc] initWithString:[params objectAtIndex:0]];
NSArray *chanArray = [chanString componentsSeparatedByString:@","];
NSEnumerator *e;
NSString *currentString;
if ([params count] == 1)
- str = [NSString stringWithFormat:@"JOIN %@\r\n", chanString];
+ [delegate sendData:[NSString stringWithFormat:@"JOIN %@\r", chanString]];
else
- str = [NSString stringWithFormat:@"JOIN %@ %@\r\n", chanString, [params objectAtIndex:1]];
+ [delegate sendData:[NSString stringWithFormat:@"JOIN %@ %@\r", chanString, [params objectAtIndex:1]]];
- [delegate sendData:str];
if ([chanArray count] == 1)
[delegate addTab:[[ChannelTab alloc] initWithDelegate:nil andName:chanString]
forKey:chanString];
@@ -32,7 +30,6 @@
forKey:currentString];
}
- [str release];
[chanString release];
[chanArray release];
[e release];
@@ -49,9 +46,9 @@
ChannelTab *ctab;
if ([params count] == 1)
- str = [NSString stringWithFormat:@"PART %@\r\n", chanString];
+ str = [NSString stringWithFormat:@"PART %@\r", chanString];
else
- str = [NSString stringWithFormat:@"PART %@ %@\r\n", chanString, [params objectAtIndex:1]];
+ str = [NSString stringWithFormat:@"PART %@ %@\r", chanString, [params objectAtIndex:1]];
[delegate sendData:str];
@@ -84,7 +81,7 @@
{
NSString *nick = [[NSString alloc] initWithString:[params objectAtIndex:0]];
NSString *mesg = [[NSString alloc] initWithString:[params objectAtIndex:1]];
- [delegate sendData:[NSString stringWithFormat:@"PRIVMSG %@ :%@\r\n", nick, mesg]];
+ [delegate sendData:[NSString stringWithFormat:@"PRIVMSG %@ :%@\r", nick, mesg]];
[delegate displayText:[NSString stringWithFormat:@"msg to: %@ %@\n", nick, mesg]
onTab:[delegate connectedServer]];
@@ -96,7 +93,7 @@
{
NSString *targ = [[NSString alloc] initWithString:[params objectAtIndex:0]];
NSString *mesg = [[NSString alloc] initWithString:[params objectAtIndex:1]];
- [delegate sendData:[NSString stringWithFormat:@"NOTICE %@ %@\r\n", targ, mesg]];
+ [delegate sendData:[NSString stringWithFormat:@"NOTICE %@ %@\r", targ, mesg]];
if ([targ hasPrefix:@"@"] && isAChannel(targ))
[delegate displayText:[NSString stringWithFormat:@"*_@%@_* %@\n", targ, mesg]
onTab:[delegate connectedServer]];
@@ -119,8 +116,8 @@
ACDefineOMA(quote, delegate, params)
{
NSString *s = ACArrayContentsAsString(params);
- [delegate sendData:s];
- [delegate displayText:s onTab:[delegate connectedServer]];
+ [delegate sendData:[s stringByAppendingString:@"\r"]];
+ [delegate displayText:[s stringByAppendingString:@"\n"] onTab:[delegate connectedServer]];
[s release];
}
|