#include "imp.h"
#include <assert.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
GLOBAL bool
IRC_CONNECT(CLIENT * Client, REQUEST * Req)
{
+ char msg[LINE_LEN + 64];
assert(Client != NULL);
assert(Req != NULL);
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
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,
"Got CONNECT command from \"%s\" for \"%s\".", Client_Mask(Client),
Req->argv[0]);
IRC_DISCONNECT(CLIENT * Client, REQUEST * Req)
{
CONN_ID my_conn;
+ char msg[LINE_LEN + 64];
assert(Client != NULL);
assert(Req != NULL);
return IRC_WriteStrClient(Client, ERR_NEEDMOREPARAMS_MSG,
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,
"Got DISCONNECT command from \"%s\" for \"%s\".",
Client_Mask(Client), Req->argv[0]);