ソースを参照

Prep for future functionality; added comments

master
achmizs 4年前
コミット
d08c081729
1個のファイルの変更18行の追加8行の削除
  1. 18
    8
      IRCClient/IRCClientChannel.m

+ 18
- 8
IRCClient/IRCClientChannel.m ファイルの表示



-(instancetype) initWithName:(NSData *)name -(instancetype) initWithName:(NSData *)name
andIRCSession:(irc_session_t *)irc_session { andIRCSession:(irc_session_t *)irc_session {
self = [super init];
if (!self) return nil;
if (!(self = [super init]))
return nil;


_irc_session = irc_session; _irc_session = irc_session;


-(void) userParted:(NSData *)nick -(void) userParted:(NSData *)nick
withReason:(NSData *)reason withReason:(NSData *)reason
us:(BOOL)wasItUs { us:(BOOL)wasItUs {
if (!wasItUs)
if (!wasItUs) {
[_nicks removeObject:nick]; [_nicks removeObject:nick];
// TODO: but what if it was us? the delegate handles it...? or do we do
// something here?
} else {
// NOTE: When the channel object receives this message, and wasItUs
// is true, its session has already removed the channel from its list
// of channels.
// TODO: but what if it was us? the delegate handles it...? or do we do
// something here?
}


[_delegate userParted:nick [_delegate userParted:nick
channel:self channel:self
withReason:(NSData *)reason withReason:(NSData *)reason
by:(NSData *)byNick by:(NSData *)byNick
us:(BOOL)wasItUs { us:(BOOL)wasItUs {
if (!wasItUs)
if (!wasItUs) {
[_nicks removeObject:nick]; [_nicks removeObject:nick];
// TODO: but what if it was us? the delegate handles it...? or do we do
// something here?
} else {
// NOTE: When the channel object receives this message, and wasItUs
// is true, its session has already removed the channel from its list
// of channels.
// TODO: but what if it was us? the delegate handles it...? or do we do
// something here?
}


[_delegate userKicked:nick [_delegate userKicked:nick
fromChannel:self fromChannel:self

読み込み中…
キャンセル
保存