# HG changeset patch # User Evan Schoenberg # Date 1209440858 0 # Node ID e1012f92ba3bbe761fe3f8ae6d1c02124686ea97 # Parent 1517d3c763fcab012a7be1c5575fdeb10fd1b7d4# Parent b30516259a8a7f056c929769abce3d7939826a11 merge of '3498a4993b3d552319e5122278d620287093fd20' and '69e8be0fb082209074a78effd111c372b9de6603' diff -r b30516259a8a -r e1012f92ba3b configure.ac diff -r b30516259a8a -r e1012f92ba3b libpurple/conversation.c --- a/libpurple/conversation.c Tue Apr 29 03:47:25 2008 +0000 +++ b/libpurple/conversation.c Tue Apr 29 03:47:38 2008 +0000 @@ -2368,12 +2368,6 @@ purple_value_new(PURPLE_TYPE_SUBTYPE, PURPLE_SUBTYPE_CONVERSATION)); - purple_signal_register(handle, "chat-join-failed", - purple_marshal_VOID__POINTER_POINTER, NULL, 2, - purple_value_new(PURPLE_TYPE_SUBTYPE, - PURPLE_SUBTYPE_CONNECTION), - purple_value_new(PURPLE_TYPE_STRING)); - purple_signal_register(handle, "chat-left", purple_marshal_VOID__POINTER, NULL, 1, purple_value_new(PURPLE_TYPE_SUBTYPE, diff -r b30516259a8a -r e1012f92ba3b libpurple/protocols/jabber/chat.c --- a/libpurple/protocols/jabber/chat.c Tue Apr 29 03:47:25 2008 +0000 +++ b/libpurple/protocols/jabber/chat.c Tue Apr 29 03:47:38 2008 +0000 @@ -222,39 +222,33 @@ if(!handle) handle = js->user->node; - tmp = g_strdup_printf("%s@%s", room, server); - room_jid = g_strdup(jabber_normalize(NULL, tmp)); - g_free(tmp); - if(!jabber_nodeprep_validate(room)) { char *buf = g_strdup_printf(_("%s is not a valid room name"), room); purple_notify_error(gc, _("Invalid Room Name"), _("Invalid Room Name"), buf); - serv_got_join_chat_failed(gc, room_jid); - g_free(room_jid); g_free(buf); return; } else if(!jabber_nameprep_validate(server)) { char *buf = g_strdup_printf(_("%s is not a valid server name"), server); purple_notify_error(gc, _("Invalid Server Name"), _("Invalid Server Name"), buf); - serv_got_join_chat_failed(gc, room_jid); - g_free(room_jid); g_free(buf); return; } else if(!jabber_resourceprep_validate(handle)) { char *buf = g_strdup_printf(_("%s is not a valid room handle"), handle); purple_notify_error(gc, _("Invalid Room Handle"), _("Invalid Room Handle"), buf); - serv_got_join_chat_failed(gc, room_jid); g_free(buf); - g_free(room_jid); return; } if(jabber_chat_find(js, room, server)) return; + tmp = g_strdup_printf("%s@%s", room, server); + room_jid = g_strdup(jabber_normalize(NULL, tmp)); + g_free(tmp); + chat = g_new0(JabberChat, 1); chat->js = gc->proto_data; diff -r b30516259a8a -r e1012f92ba3b libpurple/protocols/jabber/presence.c --- a/libpurple/protocols/jabber/presence.c Tue Apr 29 03:47:25 2008 +0000 +++ b/libpurple/protocols/jabber/presence.c Tue Apr 29 03:47:38 2008 +0000 @@ -575,7 +575,6 @@ serv_got_chat_left(js->gc, chat->id); } else { title = g_strdup_printf(_("Error joining chat %s"), from); - serv_got_join_chat_failed(js->gc, room_jid); } purple_notify_error(js->gc, title, title, msg); g_free(title); diff -r b30516259a8a -r e1012f92ba3b libpurple/server.c --- a/libpurple/server.c Tue Apr 29 03:47:25 2008 +0000 +++ b/libpurple/server.c Tue Apr 29 03:47:38 2008 +0000 @@ -967,12 +967,6 @@ purple_signal_emit(purple_conversations_get_handle(), "chat-left", conv); } -void serv_got_join_chat_failed(PurpleConnection *gc, const char *name) -{ - purple_signal_emit(purple_conversations_get_handle(), "chat-join-failed", - gc, name); -} - void serv_got_chat_in(PurpleConnection *g, int id, const char *who, PurpleMessageFlags flags, const char *message, time_t mtime) { diff -r b30516259a8a -r e1012f92ba3b libpurple/server.h --- a/libpurple/server.h Tue Apr 29 03:47:25 2008 +0000 +++ b/libpurple/server.h Tue Apr 29 03:47:38 2008 +0000 @@ -166,15 +166,6 @@ PurpleConversation *serv_got_joined_chat(PurpleConnection *gc, int id, const char *name); -/** - * Called by a prpl when an attempt to join a chat via serv_join_chat() - * fails. - * - * @param gc The connection on which chat joining failed - * @param name The name of the chat which we did not join - */ -void serv_got_join_chat_failed(PurpleConnection *gc, const char *name); - void serv_got_chat_left(PurpleConnection *g, int id); void serv_got_chat_in(PurpleConnection *g, int id, const char *who, PurpleMessageFlags flags, const char *message, time_t mtime);