Add send_text() flag STXT_LOG
Eventually to replace the 'log' parameter to send_text().
This commit is contained in:
@@ -166,8 +166,9 @@ extern char thing_star[4];
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* send_text flag values */
|
/* send_text flag values */
|
||||||
#define STXT_NOTICE 0x0001U
|
#define STXT_NOTICE 0x0001U /* Send as a NOTICE rather than PRIVMSG. */
|
||||||
#define STXT_QUIET 0x0002U
|
#define STXT_QUIET 0x0002U /* Do not run hooks or screen output. */
|
||||||
|
#define STXT_LOG 0x0004U /* Add sent message to the log file. */
|
||||||
|
|
||||||
/* This section is for keeping track internally
|
/* This section is for keeping track internally
|
||||||
* the CVS revision info of the running client.
|
* the CVS revision info of the running client.
|
||||||
|
|||||||
@@ -3871,7 +3871,7 @@ int current_target = 0;
|
|||||||
void BX_send_text(const char *nick_list, const char *text, char *command, int hook, int log)
|
void BX_send_text(const char *nick_list, const char *text, char *command, int hook, int log)
|
||||||
{
|
{
|
||||||
static int sent_text_recursion = 0;
|
static int sent_text_recursion = 0;
|
||||||
unsigned flags = hook ? 0 : STXT_QUIET;
|
unsigned flags = (hook ? 0 : STXT_QUIET) | (log ? STXT_LOG : 0);
|
||||||
|
|
||||||
int i,
|
int i,
|
||||||
done_forward = 0,
|
done_forward = 0,
|
||||||
@@ -3989,7 +3989,7 @@ void BX_send_text(const char *nick_list, const char *text, char *command, int h
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* log it if logging on */
|
/* log it if logging on */
|
||||||
if (log)
|
if (flags & STXT_LOG)
|
||||||
logmsg(LOG_SEND_MSG, target[i].nick_list, 0, "%s", text);
|
logmsg(LOG_SEND_MSG, target[i].nick_list, 0, "%s", text);
|
||||||
/* save this for /oops */
|
/* save this for /oops */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user