Indentation fixes and code cleanup.
This commit is contained in:
parent
7101b7b864
commit
5e240eb259
|
@ -1493,6 +1493,9 @@ irc_inline (server *serv, char *buf, int len)
|
||||||
|
|
||||||
if (buf[0] == ':')
|
if (buf[0] == ':')
|
||||||
{
|
{
|
||||||
|
int eat1;
|
||||||
|
int eat2;
|
||||||
|
|
||||||
/* find a context for this message */
|
/* find a context for this message */
|
||||||
if (is_channel (serv, word[3]))
|
if (is_channel (serv, word[3]))
|
||||||
{
|
{
|
||||||
|
@ -1507,10 +1510,11 @@ irc_inline (server *serv, char *buf, int len)
|
||||||
word[0] = type;
|
word[0] = type;
|
||||||
word_eol[1] = buf; /* keep the ":" for plugins */
|
word_eol[1] = buf; /* keep the ":" for plugins */
|
||||||
|
|
||||||
/* don't use || here, since it might short-circuit */
|
eat1 = plugin_emit_server (sess, type, word, word_eol);
|
||||||
if (plugin_emit_server (sess, type, word, word_eol)
|
eat2 = plugin_emit_server_attrs (sess, type, word, word_eol,
|
||||||
+ plugin_emit_server_attrs (sess, type, word, word_eol,
|
tags_data.timestamp);
|
||||||
tags_data.timestamp))
|
|
||||||
|
if (eat1 || eat2)
|
||||||
goto xit;
|
goto xit;
|
||||||
|
|
||||||
word[1]++;
|
word[1]++;
|
||||||
|
@ -1518,12 +1522,16 @@ irc_inline (server *serv, char *buf, int len)
|
||||||
|
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
int eat1;
|
||||||
|
int eat2;
|
||||||
|
|
||||||
word[0] = type = word[1];
|
word[0] = type = word[1];
|
||||||
|
|
||||||
/* don't use || here, since it might short-circuit */
|
eat1 = plugin_emit_server (sess, type, word, word_eol);
|
||||||
if (plugin_emit_server (sess, type, word, word_eol)
|
eat2 = plugin_emit_server_attrs (sess, type, word, word_eol,
|
||||||
+ plugin_emit_server_attrs (sess, type, word, word_eol,
|
tags_data.timestamp);
|
||||||
tags_data.timestamp))
|
|
||||||
|
if (eat1 || eat2)
|
||||||
goto xit;
|
goto xit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2070,6 +2070,8 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d,
|
||||||
int i;
|
int i;
|
||||||
unsigned int stripcolor_args = (chanopt_is_set (prefs.hex_text_stripcolor_msg, sess->text_strip) ? 0xFFFFFFFF : 0);
|
unsigned int stripcolor_args = (chanopt_is_set (prefs.hex_text_stripcolor_msg, sess->text_strip) ? 0xFFFFFFFF : 0);
|
||||||
char tbuf[NICKLEN + 4];
|
char tbuf[NICKLEN + 4];
|
||||||
|
int eat1;
|
||||||
|
int eat2;
|
||||||
|
|
||||||
if (prefs.hex_text_color_nicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG))
|
if (prefs.hex_text_color_nicks && (index == XP_TE_CHANACTION || index == XP_TE_CHANMSG))
|
||||||
{
|
{
|
||||||
|
@ -2086,9 +2088,11 @@ text_emit (int index, session *sess, char *a, char *b, char *c, char *d,
|
||||||
for (i = 5; i < PDIWORDS; i++)
|
for (i = 5; i < PDIWORDS; i++)
|
||||||
word[i] = "\000";
|
word[i] = "\000";
|
||||||
|
|
||||||
|
eat1 = plugin_emit_print (sess, word);
|
||||||
|
eat2 = plugin_emit_print_attrs (sess, word, timestamp);
|
||||||
|
|
||||||
/* don't use || here, since it might short-circuit */
|
/* don't use || here, since it might short-circuit */
|
||||||
if (plugin_emit_print (sess, word)
|
if (eat1 || eat2)
|
||||||
+ plugin_emit_print_attrs (sess, word, timestamp))
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* If a plugin's callback executes "/close", 'sess' may be invalid */
|
/* If a plugin's callback executes "/close", 'sess' may be invalid */
|
||||||
|
|
Loading…
Reference in New Issue