diff src/conversation.c @ 516:ee4e18868584

[gaim-migrate @ 526] Make it obvious that it happens. committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 21 Jul 2000 18:08:00 +0000
parents b33ed0a7f49b
children fd6a3294366f
line wrap: on
line diff
--- a/src/conversation.c	Fri Jul 21 06:01:35 2000 +0000
+++ b/src/conversation.c	Fri Jul 21 18:08:00 2000 +0000
@@ -150,7 +150,28 @@
 	}
 	return t;
 }
-	
+
+void make_direct(struct conversation *c, gboolean direct, struct aim_conn_t *conn, gint watcher)
+{
+	char buf[BUF_LONG];
+	if (c == NULL) return;
+	c->is_direct = direct;
+	if (direct) {
+		c->conn = conn;
+		c->watcher = watcher;
+		g_snprintf(buf, sizeof buf, _("<HR><B>Direct Connection with %s established.</B><BR><HR>"),
+			c->name);
+		write_to_conv(c, buf, WFLAG_SYSTEM, NULL);
+	} else {
+		c->conn = NULL;
+		gdk_input_remove(c->watcher);
+		c->watcher = -1;
+		g_snprintf(buf, sizeof buf, _("<HR><B>Direct Connection with %s closed.</B><BR><HR>"),
+			c->name);
+		write_to_conv(c, buf, WFLAG_SYSTEM, NULL);
+	}
+}
+
 /* ---------------------------------------------------
  * Function to remove a log file entry
  * ---------------------------------------------------