diff options
| author | Nakidai <nakidai@disroot.org> | 2026-01-30 18:16:25 +0300 |
|---|---|---|
| committer | Nakidai <nakidai@disroot.org> | 2026-01-30 18:16:25 +0300 |
| commit | 60d94739ecaafe02591ac63451293b7e2e7c30a7 (patch) | |
| tree | 0da74ba25864676812db0564884387f5761f8915 /handle.c | |
| parent | 70ad717a796405abd13811370abcd1dc96984943 (diff) | |
| download | libreircd-60d94739ecaafe02591ac63451293b7e2e7c30a7.tar.gz libreircd-60d94739ecaafe02591ac63451293b7e2e7c30a7.zip | |
Add support for NOTICE
Well, it's the same as PRIVMSG but different name
Diffstat (limited to 'handle.c')
| -rw-r--r-- | handle.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/handle.c b/handle.c index 74e354c..1b9f8e6 100644 --- a/handle.c +++ b/handle.c @@ -179,10 +179,13 @@ privmsg(struct Message *msg, struct Peer *peer) writechanf( peer, &channels[i], - ":%s!%s@%s PRIVMSG %s :%s", + ":%s!%s@%s %s %s :%s", peer->nick, peer->user, peer->host, + *msg->command == 'P' + ? "PRIVMSG" + : "NOTICE", msg->params[0], msg->params[1] ); @@ -199,10 +202,13 @@ privmsg(struct Message *msg, struct Peer *peer) writef( peers[i].fd, - ":%s!%s@%s PRIVMSG %s :%s", + ":%s!%s@%s %s %s :%s", peer->nick, peer->user, peer->host, + *msg->command == 'P' + ? "PRIVMSG" + : "NOTICE", msg->params[0], msg->params[1] ); @@ -266,6 +272,7 @@ static struct Handler { { "join", join }, { "mode", mode }, { "nick", nick }, + { "notice", privmsg }, { "part", part }, { "privmsg", privmsg }, { "quit", quit }, |