diff --git a/src/IRCConnection.h b/src/IRCConnection.h index 02c7149..f787ed5 100644 --- a/src/IRCConnection.h +++ b/src/IRCConnection.h @@ -98,5 +98,9 @@ toChannel: (IRCChannel*)channel; - (void)sendMessage: (OFString*)msg toUser: (IRCUser*)user; +- (void)sendNotice: (OFString*)notice + toUser: (IRCUser*)user; +- (void)sendNotice: (OFString*)notice + toChannel: (IRCChannel*)channel; - (void)handleConnection; @end diff --git a/src/IRCConnection.m b/src/IRCConnection.m index f1062d7..5c4d657 100644 --- a/src/IRCConnection.m +++ b/src/IRCConnection.m @@ -138,6 +138,18 @@ [self sendLineWithFormat: @"PRIVMSG %@ :%@", user.nickname, msg]; } +- (void)sendNotice: (OFString*)notice + toUser: (IRCUser*)user +{ + [self sendLineWithFormat: @"NOTICE %@ :%@", user.nickname, notice]; +} + +- (void)sendNotice: (OFString*)notice + toChannel: (IRCChannel*)channel +{ + [self sendLineWithFormat: @"NOTICE %@ :%@", channel.name, notice]; +} + - (void)handleConnection { OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];