commit - d93030ad27af9cd6a807de8f672ae73ec0e1dff8
commit + 71e9ac486f1bdbe7e14adc20969c065f6bbeafe4
blob - 0741aefa9622f02dc06439c63cba0142365d1f46
blob + 3a2a9affbe97d1dd80cea10c5abe4e784f117a86
--- src/ngircd/irc.c
+++ src/ngircd/irc.c
static char *Option_String PARAMS((CONN_ID Idx));
-static bool Send_Message PARAMS((CLIENT *Client, REQUEST *Req, int ForceType, bool SendErrors));
-static bool Send_Message_Mask PARAMS((CLIENT *from, char *targetMask, char *message, bool SendErrors));
+static bool Send_Message PARAMS((CLIENT *Client, REQUEST *Req, int ForceType,
+ bool SendErrors));
+static bool Send_Message_Mask PARAMS((CLIENT *from, char *command,
+ char *targetMask, char *message,
+ bool SendErrors));
GLOBAL bool
if (Client_Conn(from) > NONE) {
Conn_UpdateIdle(Client_Conn(from));
}
- if (!IRC_WriteStrClientPrefix(cl, from, "PRIVMSG %s :%s",
- Client_ID(cl), Req->argv[1]))
+ if (!IRC_WriteStrClientPrefix(cl, from, "%s %s :%s",
+ Req->command, Client_ID(cl),
+ Req->argv[1]))
return DISCONNECTED;
} else if (strchr("$#", currentTarget[0])
&& strchr(currentTarget, '.')) {
/* targetmask */
- if (!Send_Message_Mask(from, currentTarget,
+ if (!Send_Message_Mask(from, Req->command, currentTarget,
Req->argv[1], SendErrors))
return DISCONNECTED;
} else if ((chan = Channel_Search(currentTarget))) {
static bool
-Send_Message_Mask(CLIENT * from, char * targetMask, char * message, bool SendErrors)
+Send_Message_Mask(CLIENT * from, char * command, char * targetMask,
+ char * message, bool SendErrors)
{
CLIENT *cl;
bool client_match;
continue;
client_match = MatchCaseInsensitive(mask, Client_Hostname(cl));
if (client_match)
- if (!IRC_WriteStrClientPrefix(cl, from, "PRIVMSG %s :%s",
- Client_ID(cl), message))
+ if (!IRC_WriteStrClientPrefix(cl, from, "%s %s :%s",
+ command, Client_ID(cl), message))
return false;
}
} else {
client_match = MatchCaseInsensitive(mask,
Client_ID(Client_Introducer(cl)));
if (client_match)
- if (!IRC_WriteStrClientPrefix(cl, from, "PRIVMSG %s :%s",
- Client_ID(cl), message))
+ if (!IRC_WriteStrClientPrefix(cl, from, "%s %s :%s",
+ command, Client_ID(cl), message))
return false;
}
}