Adjust to recent ObjFW changes.
FossilOrigin-Name: b2ebf6b9e50512a49a644e6329b96d1facf3075506bf78673d69dc94b161ea2d
This commit is contained in:
parent
779f6cdbed
commit
787adc6c9d
2 changed files with 11 additions and 11 deletions
|
@ -71,6 +71,6 @@
|
||||||
- (void)leaveChannel: (IRCChannel*)channel
|
- (void)leaveChannel: (IRCChannel*)channel
|
||||||
withReason: (OFString*)reason;
|
withReason: (OFString*)reason;
|
||||||
- (void)sendLine: (OFString*)line;
|
- (void)sendLine: (OFString*)line;
|
||||||
- (void)sendLineWithFormat: (OFString*)line, ...;
|
- (void)sendLineWithFormat: (OFConstantString*)line, ...;
|
||||||
- (void)handleConnection;
|
- (void)handleConnection;
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -58,7 +58,7 @@
|
||||||
|
|
||||||
sock = [[OFTCPSocket alloc] init];
|
sock = [[OFTCPSocket alloc] init];
|
||||||
[sock connectToHost: server
|
[sock connectToHost: server
|
||||||
onPort: port];
|
port: port];
|
||||||
|
|
||||||
[self sendLineWithFormat: @"NICK %@", nickname];
|
[self sendLineWithFormat: @"NICK %@", nickname];
|
||||||
[self sendLineWithFormat: @"USER %@ * 0 :%@", username, realname];
|
[self sendLineWithFormat: @"USER %@ * 0 :%@", username, realname];
|
||||||
|
@ -110,7 +110,7 @@
|
||||||
[sock writeLine: line];
|
[sock writeLine: line];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sendLineWithFormat: (OFString*)format, ...
|
- (void)sendLineWithFormat: (OFConstantString*)format, ...
|
||||||
{
|
{
|
||||||
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
|
OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
|
||||||
OFString *line;
|
OFString *line;
|
||||||
|
@ -180,10 +180,10 @@
|
||||||
IRCUser *user;
|
IRCUser *user;
|
||||||
IRCChannel *channel;
|
IRCChannel *channel;
|
||||||
|
|
||||||
who = [who substringFromIndex: 1
|
who = [who substringWithRange:
|
||||||
toIndex: who.length];
|
of_range(1, who.length - 1)];
|
||||||
where = [where substringFromIndex: 1
|
where = [where substringWithRange:
|
||||||
toIndex: where.length];
|
of_range(1, where.length - 1)];
|
||||||
|
|
||||||
user = [IRCUser IRCUserWithString: who];
|
user = [IRCUser IRCUserWithString: who];
|
||||||
|
|
||||||
|
@ -215,10 +215,10 @@
|
||||||
[[splitted objectAtIndex: 1] length] + 1 +
|
[[splitted objectAtIndex: 1] length] + 1 +
|
||||||
to.length;
|
to.length;
|
||||||
|
|
||||||
from = [from substringFromIndex: 1
|
from = [from substringWithRange:
|
||||||
toIndex: from.length];
|
of_range(1, from.length - 1)];
|
||||||
msg = [line substringFromIndex: pos + 2
|
msg = [line substringWithRange:
|
||||||
toIndex: line.length];
|
of_range(pos + 2, line.length - pos - 2)];
|
||||||
|
|
||||||
user = [IRCUser IRCUserWithString: from];
|
user = [IRCUser IRCUserWithString: from];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue