mirror of
https://github.com/osmarks/ngircd.git
synced 2025-11-07 01:03:00 +00:00
CONNECT, DISCONNECT: generate WALLOPS messages
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "imp.h"
|
#include "imp.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -206,6 +207,7 @@ IRC_RESTART( CLIENT *Client, REQUEST *Req )
|
|||||||
GLOBAL bool
|
GLOBAL bool
|
||||||
IRC_CONNECT(CLIENT * Client, REQUEST * Req)
|
IRC_CONNECT(CLIENT * Client, REQUEST * Req)
|
||||||
{
|
{
|
||||||
|
char msg[LINE_LEN + 64];
|
||||||
|
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
assert(Req != NULL);
|
assert(Req != NULL);
|
||||||
@@ -223,6 +225,10 @@ IRC_CONNECT(CLIENT * Client, REQUEST * Req)
|
|||||||
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||||
Client_ID(Client), Req->command);
|
Client_ID(Client), Req->command);
|
||||||
|
|
||||||
|
snprintf(msg, sizeof(msg), "Received CONNECT %s from %s",
|
||||||
|
Req->argv[0], Client_ID(Client));
|
||||||
|
IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), msg);
|
||||||
|
|
||||||
Log(LOG_NOTICE | LOG_snotice,
|
Log(LOG_NOTICE | LOG_snotice,
|
||||||
"Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(Client),
|
"Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(Client),
|
||||||
Req->argv[0]);
|
Req->argv[0]);
|
||||||
@@ -263,6 +269,7 @@ GLOBAL bool
|
|||||||
IRC_DISCONNECT(CLIENT * Client, REQUEST * Req)
|
IRC_DISCONNECT(CLIENT * Client, REQUEST * Req)
|
||||||
{
|
{
|
||||||
CONN_ID my_conn;
|
CONN_ID my_conn;
|
||||||
|
char msg[LINE_LEN + 64];
|
||||||
|
|
||||||
assert(Client != NULL);
|
assert(Client != NULL);
|
||||||
assert(Req != NULL);
|
assert(Req != NULL);
|
||||||
@@ -275,6 +282,10 @@ IRC_DISCONNECT(CLIENT * Client, REQUEST * Req)
|
|||||||
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
|
||||||
Client_ID(Client), Req->command);
|
Client_ID(Client), Req->command);
|
||||||
|
|
||||||
|
snprintf(msg, sizeof(msg), "Received DISCONNECT %s from %s",
|
||||||
|
Req->argv[0], Client_ID(Client));
|
||||||
|
IRC_SendWallops(Client_ThisServer(), Client_ThisServer(), msg);
|
||||||
|
|
||||||
Log(LOG_NOTICE | LOG_snotice,
|
Log(LOG_NOTICE | LOG_snotice,
|
||||||
"Got DISCONNECT command from \"%s\" for \"%s\".",
|
"Got DISCONNECT command from \"%s\" for \"%s\".",
|
||||||
Client_Mask(Client), Req->argv[0]);
|
Client_Mask(Client), Req->argv[0]);
|
||||||
|
|||||||
Reference in New Issue
Block a user