summary refs log tree commit diff stats
path: root/src/common/proto-irc.c
diff options
context:
space:
mode:
authorDiogo Sousa <diogogsousa@gmail.com>2013-07-10 00:42:34 +0100
committerDiogo Sousa <diogogsousa@gmail.com>2013-07-10 00:42:34 +0100
commit5e240eb259c473dd5ef25a5d11ef5ad574470f3a (patch)
treebfe0c309fc051ef79f3933e87e7a8da35c992ec4 /src/common/proto-irc.c
parent7101b7b864df280059750c0de4d6b9d41e907122 (diff)
Indentation fixes and code cleanup.
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r--src/common/proto-irc.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c
index 07c2b696..128c0c85 100644
--- a/src/common/proto-irc.c
+++ b/src/common/proto-irc.c
@@ -1493,6 +1493,9 @@ irc_inline (server *serv, char *buf, int len)
 
 	if (buf[0] == ':')
 	{
+		int eat1;
+		int eat2;
+
 		/* find a context for this message */
 		if (is_channel (serv, word[3]))
 		{
@@ -1507,10 +1510,11 @@ irc_inline (server *serv, char *buf, int len)
 		word[0] = type;
 		word_eol[1] = buf;	/* keep the ":" for plugins */
 
-		/* don't use || here, since it might short-circuit */
-		if (plugin_emit_server (sess, type, word, word_eol)
-			+ plugin_emit_server_attrs (sess, type, word, word_eol, 
-										tags_data.timestamp))
+		eat1 = plugin_emit_server (sess, type, word, word_eol);
+		eat2 = plugin_emit_server_attrs (sess, type, word, word_eol, 
+										 tags_data.timestamp);
+
+		if (eat1 || eat2)
 			goto xit;
 
 		word[1]++;
@@ -1518,12 +1522,16 @@ irc_inline (server *serv, char *buf, int len)
 
 	} else
 	{
+		int eat1;
+		int eat2;
+
 		word[0] = type = word[1];
 
-		/* don't use || here, since it might short-circuit */
-		if (plugin_emit_server (sess, type, word, word_eol)
-			+ plugin_emit_server_attrs (sess, type, word, word_eol,
-										tags_data.timestamp))
+		eat1 = plugin_emit_server (sess, type, word, word_eol);
+		eat2 = plugin_emit_server_attrs (sess, type, word, word_eol,
+										 tags_data.timestamp);
+
+		if (eat1 || eat2)
 			goto xit;
 	}