changeset 9471:37f7100e58e6

[gaim-migrate @ 10296] You can no longer try to send a message or do a command in a chat you've left, nor can you try to do a command in a conversation who's account is logged off. Hitting enter just has no effect, like it already did for sending a message in a logged off conversation. It might be desirable to be able to perform certain commands in a dead conversation. Someone who desires this should add a flag and register such commands with this flag, and make the commands be really careful. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Wed, 07 Jul 2004 05:18:55 +0000
parents 0e11618b37d7
children 362e92781b3f
files src/gtkconv.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Wed Jul 07 05:02:41 2004 +0000
+++ b/src/gtkconv.c	Wed Jul 07 05:18:55 2004 +0000
@@ -463,6 +463,12 @@
 	account = gaim_conversation_get_account(conv);
 	prefix = gaim_gtk_get_cmd_prefix();
 
+	if (!gaim_account_is_connected(account))
+		return;
+
+	if (gaim_conv_chat_has_left(GAIM_CONV_CHAT(conv)))
+		return;
+
 	if(gaim_prefs_get_bool("/gaim/gtk/conversations/enable_commands")) {
 		cmd = gtk_imhtml_get_text(GTK_IMHTML(gtkconv->entry), NULL, NULL);
 		if(cmd && (strncmp(cmd, prefix, strlen(prefix)) == 0)) {
@@ -529,9 +535,6 @@
 	}
 
 
-	if (!gaim_account_is_connected(account))
-		return;
-
 	buf = gtk_imhtml_get_markup(GTK_IMHTML(gtkconv->entry));
 	clean = gtk_imhtml_get_text(GTK_IMHTML(gtkconv->entry), NULL, NULL);