Index: protocols/jabber/jabber.c
===================================================================
--- protocols/jabber/jabber.c	(revision c495217e7c02c908d831645b033cf115ccdc3d6d)
+++ protocols/jabber/jabber.c	(revision 03f38289e15c27b93f8fdecf22a03353e4d01096)
@@ -441,5 +441,5 @@
 }
 
-static struct groupchat *jabber_chat_join_( struct im_connection *ic, const char *room, const char *nick, const char *password )
+static struct groupchat *jabber_chat_join_( struct im_connection *ic, const char *room, const char *nick, const char *password, set_t **sets )
 {
 	if( strchr( room, '@' ) == NULL )
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision c495217e7c02c908d831645b033cf115ccdc3d6d)
+++ protocols/nogaim.h	(revision 03f38289e15c27b93f8fdecf22a03353e4d01096)
@@ -212,5 +212,6 @@
 	 * not implement this. */
 	struct groupchat *
-	     (* chat_join)	(struct im_connection *, const char *room, const char *nick, const char *password);
+	     (* chat_join)	(struct im_connection *, const char *room,
+	                         const char *nick, const char *password, set_t **sets);
 	/* Change the topic, if supported. Note that BitlBee expects the IM
 	   server to confirm the topic change with a regular topic change
@@ -219,4 +220,9 @@
 	void (* chat_topic)	(struct groupchat *, char *topic);
 	
+	/* If your protocol module needs any special info for joining chatrooms
+	   other than a roomname + nickname, add them here. */
+	void (* chat_add_settings)	(account_t *acc, set_t **head);
+	void (* chat_free_settings)	(account_t *acc, set_t **head);
+	
 	/* You can tell what away states your protocol supports, so that
 	 * BitlBee will try to map the IRC away reasons to them. If your
@@ -234,4 +240,11 @@
 	/* Incoming transfer request */
 	void (* transfer_request) (struct im_connection *, file_transfer_t *ft, char *handle );
+	
+	/* Some placeholders so eventually older plugins may cooperate with newer BitlBees. */
+	void *resv1;
+	void *resv2;
+	void *resv3;
+	void *resv4;
+	void *resv5;
 };
 
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision c495217e7c02c908d831645b033cf115ccdc3d6d)
+++ protocols/oscar/oscar.c	(revision 03f38289e15c27b93f8fdecf22a03353e4d01096)
@@ -2506,5 +2506,6 @@
 }
 
-struct groupchat *oscar_chat_join(struct im_connection * ic, const char * room, const char * nick, const char * password )
+struct groupchat *oscar_chat_join_internal(struct im_connection *ic, const char *room,
+	const char *nick, const char *password, int exchange_number)
 {
 	struct oscar_data * od = (struct oscar_data *)ic->proto_data;
@@ -2514,5 +2515,5 @@
 		int st;
 		
-		st = aim_chatnav_createroom(od->sess, cur, room, 4);
+		st = aim_chatnav_createroom(od->sess, cur, room, exchange_number);
 		
 		return NULL;
@@ -2520,5 +2521,5 @@
 		struct create_room * cr = g_new0(struct create_room, 1);
 		
-		cr->exchange = 4;
+		cr->exchange = exchange_number;
 		cr->name = g_strdup(room);
 		od->create_rooms = g_slist_append(od->create_rooms, cr);
@@ -2529,4 +2530,10 @@
 }
 
+struct groupchat *oscar_chat_join(struct im_connection *ic, const char *room,
+	const char *nick, const char *password, set_t **sets)
+{
+	return oscar_chat_join_internal(ic, room, nick, password, set_getint(sets, "exchange_number"));
+}
+
 struct groupchat *oscar_chat_with(struct im_connection * ic, char *who)
 {
@@ -2545,5 +2552,5 @@
 	
 	c = imcb_chat_new(ic, chatname);
-	ret = oscar_chat_join(ic, chatname, NULL, NULL);
+	ret = oscar_chat_join_internal(ic, chatname, NULL, NULL, 4);
 	aim_chat_invite(od->sess, od->conn, who, "", 4, chatname, 0x0);
 
@@ -2557,5 +2564,5 @@
 	struct aim_chat_invitation * inv = data;
 	
-	oscar_chat_join(inv->ic, inv->name, NULL, NULL);
+	oscar_chat_join_internal(inv->ic, inv->name, NULL, NULL, 4);
 	g_free(inv->name);
 	g_free(inv);
@@ -2568,4 +2575,14 @@
 	g_free(inv->name);
 	g_free(inv);
+}
+
+void oscar_chat_add_settings(account_t *acc, set_t **head)
+{
+	set_add(head, "exchange_number", "4", set_eval_int, NULL);
+}
+
+void oscar_chat_free_settings(account_t *acc, set_t **head)
+{
+	set_del(head, "exchange_number");
 }
 
@@ -2590,4 +2607,6 @@
 	ret->chat_with = oscar_chat_with;
 	ret->chat_join = oscar_chat_join;
+	ret->chat_add_settings = oscar_chat_add_settings;
+	ret->chat_free_settings = oscar_chat_free_settings;
 	ret->add_permit = oscar_add_permit;
 	ret->add_deny = oscar_add_deny;
