Add support for sending notices.

FossilOrigin-Name: 84aa37ee2ebcf403cbbaea796a48c5af26d800bd7db673ff7894f5ca8a685bbd
This commit is contained in:
Jonathan Schleifer 2011-09-10 19:59:12 +00:00
parent b0ef070c32
commit 842476ea96
2 changed files with 16 additions and 0 deletions

View file

@ -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

View file

@ -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];