Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /src/common/inbound.c [r584] .. [r585] Maximize Restore

  Switch to side-by-side view

--- a/src/common/inbound.c
+++ b/src/common/inbound.c
@@ -164,7 +164,7 @@
 			}
 			set_topic (sess, ip);
 		}
-		inbound_chanmsg (serv, NULL, from, text, FALSE);
+		inbound_chanmsg (serv, NULL, NULL, from, text, FALSE);
 		return;
 	}
 
@@ -314,24 +314,26 @@
 }
 
 void
-inbound_chanmsg (server *serv, char *chan, char *from, char *text, char fromme)
+inbound_chanmsg (server *serv, session *sess, char *chan, char *from, char *text, char fromme)
 {
 	struct User *user;
-	session *sess;
 	int hilight = FALSE;
 	char nickchar[2] = "\000";
 
-	if (chan)
-	{
-		sess = find_channel (serv, chan);
-		if (!sess && !is_channel (serv, chan))
-			sess = find_dialog (serv, chan);
-	} else
-	{
-		sess = find_dialog (serv, from);
-	}
 	if (!sess)
-		return;
+	{
+		if (chan)
+		{
+			sess = find_channel (serv, chan);
+			if (!sess && !is_channel (serv, chan))
+				sess = find_dialog (serv, chan);
+		} else
+		{
+			sess = find_dialog (serv, from);
+		}
+		if (!sess)
+			return;
+	}
 
 	if (sess != current_tab)
 	{