#define REPLYTYPE_NOTICE 0x04
static void funcmd_reply(struct funcmd_header_info *header, const char *text, int type, ...) {
if (!(header->client->flags & SOCKET_FLAG_CONNECTED)) return;
+ struct ClientSocket *client = header->client;
const char *reply_format = get_language_string((header->null_language ? NULL : header->user), text);
if(reply_format)
text = reply_format;
sprintf(formatBuf, "PRIVMSG %s :\001ACTION %s\001", header->chan->name, text);
else
sprintf(formatBuf, "PRIVMSG %s :%s", header->chan->name, text);
+ if(!isUserOnChan(client->user, header->chan) && isModeSet(header->chan->modes, 'n'))
+ client = getChannelBot(header->chan, 0);
}
va_list arg_list;
char sendBuf[MAXLEN];
if (pos < 0 || pos > (MAXLEN - 2)) pos = MAXLEN - 2;
sendBuf[pos] = '\n';
sendBuf[pos+1] = '\0';
- write_socket(header->client, sendBuf, pos+1);
+ write_socket(client, sendBuf, pos+1);
}
static char* getSetting(struct UserNode *user, struct ChanNode *chan, const char *setting) {