Index: bitlbee.h
===================================================================
--- bitlbee.h	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ bitlbee.h	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -159,5 +159,5 @@
 gboolean bitlbee_io_current_client_write( gpointer data, gint source, b_input_condition cond );
 
-//void root_command_string( irc_t *irc, user_t *u, char *command, int flags );
+void root_command_string( irc_t *irc, char *command );
 void root_command( irc_t *irc, char *command[] );
 gboolean bitlbee_shutdown( gpointer data, gint fd, b_input_condition cond );
Index: irc.c
===================================================================
--- irc.c	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ irc.c	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -25,4 +25,5 @@
 
 #include "bitlbee.h"
+#include "ipc.h"
 
 GSList *irc_connection_list;
Index: irc_channel.c
===================================================================
--- irc_channel.c	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ irc_channel.c	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -139,8 +139,11 @@
 static gboolean control_channel_privmsg( irc_channel_t *ic, const char *msg )
 {
+	char cmd[strlen(msg)+1];
+	
 	g_free( ic->irc->last_root_cmd );
 	ic->irc->last_root_cmd = g_strdup( ic->name );
 	
-	root_command_string( ic->irc, msg );
+	strcpy( cmd, msg );
+	root_command_string( ic->irc, cmd );
 	
 	return TRUE;
Index: irc_commands.c
===================================================================
--- irc_commands.c	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ irc_commands.c	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -39,5 +39,5 @@
 		   out we don't require it, which will break this feature.)
 		   Try to identify using the given password. */
-		/*return root_command( irc, send_cmd );*/
+		return root_command( irc, send_cmd );
 	}
 	/* Handling in pre-logged-in state, first see if this server is
Index: irc_user.c
===================================================================
--- irc_user.c	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ irc_user.c	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -121,8 +121,11 @@
 static gboolean root_privmsg( irc_user_t *iu, const char *msg )
 {
+	char cmd[strlen(msg)+1];
+	
 	g_free( iu->irc->last_root_cmd );
 	iu->irc->last_root_cmd = g_strdup( iu->nick );
 	
-	root_command_string( iu->irc, msg );
+	strcpy( cmd, msg );
+	root_command_string( iu->irc, cmd );
 	
 	return TRUE;
Index: protocols/account.c
===================================================================
--- protocols/account.c	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ protocols/account.c	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -217,5 +217,4 @@
 {
 	account_t *a, *l = NULL;
-	struct chat *c, *nc;
 	
 	if( acc->ic )
Index: protocols/bee.h
===================================================================
--- protocols/bee.h	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ protocols/bee.h	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -91,5 +91,5 @@
 /* Not implemented yet! */ G_MODULE_EXPORT void imcb_buddy_times( struct im_connection *ic, const char *handle, time_t login, time_t idle );
 /* Call when a handle says something. 'flags' and 'sent_at may be just 0. */
-G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at );
+G_MODULE_EXPORT void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, guint32 flags, time_t sent_at );
 
 #endif /* __BEE_H__ */
Index: protocols/bee_user.c
===================================================================
--- protocols/bee_user.c	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ protocols/bee_user.c	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -92,6 +92,8 @@
 		msg = buf;
 	}
-	
-	st = bu->ic->acc->prpl->buddy_msg( bu->ic, bu->handle, msg, flags );
+	else
+		buf = g_strdup( msg );
+	
+	st = bu->ic->acc->prpl->buddy_msg( bu->ic, bu->handle, buf, flags );
 	g_free( buf );
 	
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision e63507a356ac94085bcd00048b81d3ce2f27f287)
+++ protocols/nogaim.c	(revision fb117aee274bccfb6528288599ef81fe72191e12)
@@ -37,6 +37,4 @@
 #include "nogaim.h"
 #include "chat.h"
-
-static int remove_chat_buddy_silent( struct groupchat *b, const char *handle );
 
 GSList *connections;
@@ -475,4 +473,5 @@
 };
 
+#if 0
 static void imcb_ask_auth_cb_no( void *data )
 {
@@ -494,4 +493,5 @@
 	g_free( cbd );
 }
+#endif
 
 void imcb_ask_auth( struct im_connection *ic, const char *handle, const char *realname )
@@ -516,4 +516,5 @@
 
 
+#if 0
 static void imcb_ask_add_cb_no( void *data )
 {
@@ -530,4 +531,5 @@
 	return imcb_ask_add_cb_no( data );
 }
+#endif
 
 void imcb_ask_add( struct im_connection *ic, const char *handle, const char *realname )
@@ -597,4 +599,5 @@
 	return c;
 #endif
+	return NULL;
 }
 
@@ -783,7 +786,7 @@
 }
 
+#if 0
 static int remove_chat_buddy_silent( struct groupchat *b, const char *handle )
 {
-#if 0
 	GList *i;
 	
@@ -801,8 +804,8 @@
 		i = i->next;
 	}
-#endif
 	
 	return 0;
 }
+#endif
 
 
