diff --git a/src/IRCConnection.h b/src/IRCConnection.h index f787ed5..c7c250c 100644 --- a/src/IRCConnection.h +++ b/src/IRCConnection.h @@ -85,6 +85,8 @@ @property (copy) OFString *nickname, *username, *realname; @property (retain) id delegate; +- (void)sendLine: (OFString*)line; +- (void)sendLineWithFormat: (OFConstantString*)line, ...; - (void)connect; - (void)disconnect; - (void)disconnectWithReason: (OFString*)reason; @@ -92,8 +94,6 @@ - (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 @@ -102,5 +102,8 @@ toUser: (IRCUser*)user; - (void)sendNotice: (OFString*)notice toChannel: (IRCChannel*)channel; +- (void)kickUser: (IRCUser*)user + fromChannel: (IRCChannel*)channel + withReason: (OFString*)reason; - (void)handleConnection; @end diff --git a/src/IRCConnection.m b/src/IRCConnection.m index 5c4d657..afb597b 100644 --- a/src/IRCConnection.m +++ b/src/IRCConnection.m @@ -150,6 +150,14 @@ [self sendLineWithFormat: @"NOTICE %@ :%@", channel.name, notice]; } +- (void)kickUser: (IRCUser*)user + fromChannel: (IRCChannel*)channel + withReason: (OFString*)reason +{ + [self sendLineWithFormat: @"KICK %@ %@ :%@", + channel.name, user.nickname, reason]; +} + - (void)handleConnection { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];