Index: protocols/msn/sb.c
===================================================================
--- protocols/msn/sb.c	(revision d323394cf97afa79bc2a75f5f2dd0f88bf1b8fa4)
+++ protocols/msn/sb.c	(revision 61ae52c5fbe8fbaf75adb148cd05c357590e8807)
@@ -184,9 +184,9 @@
 	/* Create the groupchat structure. */
 	g_snprintf( buf, sizeof( buf ), "MSN groupchat session %d", sb->session );
-	sb->chat = serv_got_joined_chat( ic, buf );
+	sb->chat = imcb_chat_new( ic, buf );
 	
 	/* Populate the channel. */
-	if( sb->who ) add_chat_buddy( sb->chat, sb->who );
-	add_chat_buddy( sb->chat, ic->acc->user );
+	if( sb->who ) imcb_chat_add_buddy( sb->chat, sb->who );
+	imcb_chat_add_buddy( sb->chat, ic->acc->user );
 	
 	/* And make sure the switchboard doesn't look like a regular chat anymore. */
@@ -232,5 +232,5 @@
 	if( sb->chat )
 	{
-		serv_got_chat_left( sb->chat );
+		imcb_chat_removed( sb->chat );
 	}
 	
@@ -374,5 +374,5 @@
 			{
 				g_snprintf( buf, sizeof( buf ), "MSN groupchat session %d", sb->session );
-				sb->chat = serv_got_joined_chat( ic, buf );
+				sb->chat = imcb_chat_new( ic, buf );
 				
 				g_free( sb->who );
@@ -380,9 +380,9 @@
 			}
 			
-			add_chat_buddy( sb->chat, cmd[4] );
+			imcb_chat_add_buddy( sb->chat, cmd[4] );
 			
 			if( num == tot )
 			{
-				add_chat_buddy( sb->chat, ic->acc->user );
+				imcb_chat_add_buddy( sb->chat, ic->acc->user );
 			}
 		}
@@ -462,9 +462,9 @@
 			msn_sb_to_chat( sb );
 			
-			add_chat_buddy( sb->chat, cmd[1] );
+			imcb_chat_add_buddy( sb->chat, cmd[1] );
 		}
 		else if( sb->chat )
 		{
-			add_chat_buddy( sb->chat, cmd[1] );
+			imcb_chat_add_buddy( sb->chat, cmd[1] );
 			sb->ready = 1;
 		}
@@ -516,5 +516,5 @@
 		else if( sb->chat )
 		{
-			remove_chat_buddy( sb->chat, cmd[1], "" );
+			imcb_chat_remove_buddy( sb->chat, cmd[1], "" );
 		}
 		else
@@ -611,5 +611,5 @@
 			else if( sb->chat )
 			{
-				serv_got_chat_in( sb->chat, cmd[1], 0, body, 0 );
+				imcb_chat_msg( sb->chat, cmd[1], body, 0, 0 );
 			}
 			else
@@ -670,5 +670,5 @@
 			else if( sb->chat )
 			{
-				serv_got_chat_in( sb->chat, cmd[1], 0, buf, 0 );
+				imcb_chat_msg( sb->chat, cmd[1], buf, 0, 0 );
 			}
 			else
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision d323394cf97afa79bc2a75f5f2dd0f88bf1b8fa4)
+++ protocols/nogaim.c	(revision 61ae52c5fbe8fbaf75adb148cd05c357590e8807)
@@ -686,5 +686,5 @@
 }
 
-void serv_got_chat_left( struct groupchat *c )
+void imcb_chat_removed( struct groupchat *c )
 {
 	struct im_connection *ic = c->ic;
@@ -723,5 +723,5 @@
 }
 
-void serv_got_chat_in( struct groupchat *c, char *who, int whisper, char *msg, time_t mtime )
+void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u_int32_t flags, time_t sent_at )
 {
 	struct im_connection *ic = c->ic;
@@ -744,5 +744,5 @@
 }
 
-struct groupchat *serv_got_joined_chat( struct im_connection *ic, char *handle )
+struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle )
 {
 	struct groupchat *c;
@@ -771,5 +771,5 @@
 /* buddy_chat.c */
 
-void add_chat_buddy( struct groupchat *b, char *handle )
+void imcb_chat_add_buddy( struct groupchat *b, char *handle )
 {
 	user_t *u = user_findhandle( b->ic, handle );
@@ -805,5 +805,5 @@
 }
 
-void remove_chat_buddy( struct groupchat *b, char *handle, char *reason )
+void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason )
 {
 	user_t *u;
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision d323394cf97afa79bc2a75f5f2dd0f88bf1b8fa4)
+++ protocols/nogaim.h	(revision 61ae52c5fbe8fbaf75adb148cd05c357590e8807)
@@ -94,5 +94,4 @@
 };
 
-/* struct buddy_chat went away and got merged with this. */
 struct groupchat {
 	struct im_connection *ic;
@@ -191,13 +190,4 @@
 G_MODULE_EXPORT void imcb_ask_add( struct im_connection *ic, char *handle, const char *realname );
 
-/* Groupchats */
-G_MODULE_EXPORT void add_chat_buddy( struct groupchat *b, char *handle );
-G_MODULE_EXPORT void remove_chat_buddy( struct groupchat *b, char *handle, char *reason );
-G_MODULE_EXPORT void serv_got_chat_invite( struct im_connection *ic, char *handle, char *who, char *msg, GList *data );
-G_MODULE_EXPORT struct groupchat *serv_got_joined_chat( struct im_connection *ic, char *handle );
-G_MODULE_EXPORT void serv_got_chat_in( struct groupchat *c, char *who, int whisper, char *msg, time_t mtime );
-G_MODULE_EXPORT void serv_got_chat_left( struct groupchat *c );
-struct groupchat *chat_by_channel( char *channel );
-
 /* Buddy management */
 G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, char *handle, char *group );
@@ -212,4 +202,13 @@
 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, u_int32_t flags );
 
+/* Groupchats */
+G_MODULE_EXPORT void imcb_chat_invited( struct im_connection *ic, char *handle, char *who, char *msg, GList *data );
+G_MODULE_EXPORT struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle );
+G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, char *handle );
+G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason );
+G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, u_int32_t flags, time_t sent_at );
+G_MODULE_EXPORT void imcb_chat_removed( struct groupchat *c );
+struct groupchat *chat_by_channel( char *channel );
+
 /* Actions, or whatever. */
 int imc_set_away( struct im_connection *ic, char *away );
Index: protocols/oscar/oscar.c
===================================================================
--- protocols/oscar/oscar.c	(revision d323394cf97afa79bc2a75f5f2dd0f88bf1b8fa4)
+++ protocols/oscar/oscar.c	(revision 61ae52c5fbe8fbaf75adb148cd05c357590e8807)
@@ -750,5 +750,5 @@
 	chatcon = find_oscar_chat_by_conn(ic, fr->conn);
 	chatcon->id = id;
-	chatcon->cnv = serv_got_joined_chat(ic, chatcon->show);
+	chatcon->cnv = imcb_chat_new(ic, chatcon->show);
 	chatcon->cnv->data = chatcon;
 
@@ -1461,5 +1461,5 @@
 
 	for (i = 0; i < count; i++)
-		add_chat_buddy(c->cnv, info[i].sn);
+		imcb_chat_add_buddy(c->cnv, info[i].sn);
 
 	return 1;
@@ -1484,5 +1484,5 @@
 
 	for (i = 0; i < count; i++)
-		remove_chat_buddy(c->cnv, info[i].sn, NULL);
+		imcb_chat_remove_buddy(c->cnv, info[i].sn, NULL);
 
 	return 1;
@@ -1535,5 +1535,5 @@
 	tmp = g_malloc(BUF_LONG);
 	g_snprintf(tmp, BUF_LONG, "%s", msg);
-	serv_got_chat_in(ccon->cnv, info->sn, 0, tmp, time((time_t)NULL));
+	imcb_chat_msg(ccon->cnv, info->sn, tmp, 0, 0);
 	g_free(tmp);
 
@@ -2513,5 +2513,5 @@
 
 	/* Notify the conversation window that we've left the chat */
-	serv_got_chat_left(cc->cnv);
+	imcb_chat_removed(cc->cnv);
 
 	/* Destroy the chat_connection */
Index: protocols/yahoo/yahoo.c
===================================================================
--- protocols/yahoo/yahoo.c	(revision d323394cf97afa79bc2a75f5f2dd0f88bf1b8fa4)
+++ protocols/yahoo/yahoo.c	(revision 61ae52c5fbe8fbaf75adb148cd05c357590e8807)
@@ -146,5 +146,5 @@
 	
 	while( ic->conversations )
-		serv_got_chat_left( ic->conversations );
+		imcb_chat_removed( ic->conversations );
 	
 	for( l = yd->buddygroups; l; l = l->next )
@@ -318,5 +318,5 @@
 	
 	yahoo_conference_logoff( yd->y2_id, NULL, c->data, c->title );
-	serv_got_chat_left( c );
+	imcb_chat_removed( c );
 }
 
@@ -330,6 +330,6 @@
 	roomname = g_strdup_printf( "%s-Bee-%d", ic->acc->user, byahoo_chat_id );
 	
-	c = serv_got_joined_chat( ic, roomname );
-	add_chat_buddy( c, ic->acc->user );
+	c = imcb_chat_new( ic, roomname );
+	imcb_chat_add_buddy( c, ic->acc->user );
 	
 	/* FIXME: Free this thing when the chat's destroyed. We can't *always*
@@ -790,5 +790,5 @@
 {
 	yahoo_conference_logon( inv->yid, NULL, inv->members, inv->name );
-	add_chat_buddy( inv->c, inv->ic->acc->user );
+	imcb_chat_add_buddy( inv->c, inv->ic->acc->user );
 	g_free( inv->name );
 	g_free( inv );
@@ -798,5 +798,5 @@
 {
 	yahoo_conference_decline( inv->yid, NULL, inv->members, inv->name, "User rejected groupchat" );
-	serv_got_chat_left( inv->c );
+	imcb_chat_removed( inv->c );
 	g_free( inv->name );
 	g_free( inv );
@@ -814,5 +814,5 @@
 	memset( inv, 0, sizeof( struct byahoo_conf_invitation ) );
 	inv->name = g_strdup( room );
-	inv->c = serv_got_joined_chat( ic, (char*) room );
+	inv->c = imcb_chat_new( ic, (char*) room );
 	inv->c->data = members;
 	inv->yid = id;
@@ -822,5 +822,5 @@
 	for( m = members; m; m = m->next )
 		if( g_strcasecmp( m->data, ic->acc->user ) != 0 )
-			add_chat_buddy( inv->c, m->data );
+			imcb_chat_add_buddy( inv->c, m->data );
 	
 	g_snprintf( txt, 1024, "Got an invitation to chatroom %s from %s: %s", room, who, msg );
@@ -844,5 +844,5 @@
 	
 	if( c )
-		add_chat_buddy( c, (char*) who );
+		imcb_chat_add_buddy( c, (char*) who );
 }
 
@@ -856,5 +856,5 @@
 	
 	if( c )
-		remove_chat_buddy( c, (char*) who, "" );
+		imcb_chat_remove_buddy( c, (char*) who, "" );
 }
 
@@ -868,5 +868,5 @@
 	
 	if( c )
-		serv_got_chat_in( c, (char*) who, 0, (char*) m, 0 );
+		imcb_chat_msg( c, (char*) who, (char*) m, 0, 0 );
 	g_free( m );
 }
