Index: protocols/jabber/jabber.h
===================================================================
--- protocols/jabber/jabber.h	(revision f5d1b3185140e690a6503b9e68c7ea28655b405e)
+++ protocols/jabber/jabber.h	(revision c6ca3ee33e27feefb8cae0dc1d55a7239baf43cb)
@@ -29,4 +29,5 @@
 #include "xmltree.h"
 #include "bitlbee.h"
+#include "md5.h"
 
 extern GSList *jabber_connections;
Index: protocols/msn/msn.c
===================================================================
--- protocols/msn/msn.c	(revision f5d1b3185140e690a6503b9e68c7ea28655b405e)
+++ protocols/msn/msn.c	(revision c6ca3ee33e27feefb8cae0dc1d55a7239baf43cb)
@@ -26,4 +26,8 @@
 #include "nogaim.h"
 #include "msn.h"
+
+int msn_chat_id;
+GSList *msn_connections;
+GSList *msn_switchboards;
 
 static char *msn_set_display_name( set_t *set, char *value );
Index: protocols/msn/msn.h
===================================================================
--- protocols/msn/msn.h	(revision f5d1b3185140e690a6503b9e68c7ea28655b405e)
+++ protocols/msn/msn.h	(revision c6ca3ee33e27feefb8cae0dc1d55a7239baf43cb)
@@ -133,5 +133,5 @@
 #define STATUS_SB_CHAT_SPARE	8	/* Same, but also for groupchats (not used yet). */
 
-int msn_chat_id;
+extern int msn_chat_id;
 extern const struct msn_away_state msn_away_state_list[];
 extern const struct msn_status_code msn_status_code_list[];
@@ -142,6 +142,6 @@
    connection), the callback should check whether it's still listed here
    before doing *anything* else. */
-GSList *msn_connections;
-GSList *msn_switchboards;
+extern GSList *msn_connections;
+extern GSList *msn_switchboards;
 
 /* ns.c */
Index: protocols/nogaim.c
===================================================================
--- protocols/nogaim.c	(revision f5d1b3185140e690a6503b9e68c7ea28655b405e)
+++ protocols/nogaim.c	(revision c6ca3ee33e27feefb8cae0dc1d55a7239baf43cb)
@@ -352,5 +352,5 @@
 /* list.c */
 
-void imcb_add_buddy( struct im_connection *ic, char *handle, char *group )
+void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group )
 {
 	user_t *u;
@@ -426,5 +426,5 @@
 }
 
-void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname )
+void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname )
 {
 	user_t *u = user_findhandle( ic, handle );
@@ -443,5 +443,5 @@
 }
 
-void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group )
+void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group )
 {
 	user_t *u;
@@ -628,5 +628,5 @@
 }
 
-void imcb_buddy_msg( struct im_connection *ic, char *handle, char *msg, uint32_t flags, time_t sent_at )
+void imcb_buddy_msg( struct im_connection *ic, const char *handle, char *msg, uint32_t flags, time_t sent_at )
 {
 	irc_t *irc = ic->irc;
@@ -695,5 +695,5 @@
 }
 
-struct groupchat *imcb_chat_new( struct im_connection *ic, char *handle )
+struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle )
 {
 	struct groupchat *c;
@@ -761,5 +761,5 @@
 }
 
-void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at )
+void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at )
 {
 	struct im_connection *ic = c->ic;
@@ -833,5 +833,5 @@
 /* buddy_chat.c */
 
-void imcb_chat_add_buddy( struct groupchat *b, char *handle )
+void imcb_chat_add_buddy( struct groupchat *b, const char *handle )
 {
 	user_t *u = user_findhandle( b->ic, handle );
@@ -868,5 +868,5 @@
 
 /* This function is one BIG hack... :-( EREWRITE */
-void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason )
+void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason )
 {
 	user_t *u;
Index: protocols/nogaim.h
===================================================================
--- protocols/nogaim.h	(revision f5d1b3185140e690a6503b9e68c7ea28655b405e)
+++ protocols/nogaim.h	(revision c6ca3ee33e27feefb8cae0dc1d55a7239baf43cb)
@@ -43,5 +43,4 @@
 #include "proxy.h"
 #include "query.h"
-#include "md5.h"
 
 #define BUDDY_ALIAS_MAXLEN 388   /* because MSN names can be 387 characters */
@@ -264,8 +263,8 @@
  * user, usually after a login, or if the user added a buddy and the IM
  * server confirms that the add was successful. Don't forget to do this! */
-G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, char *handle, char *group );
-G_MODULE_EXPORT void imcb_remove_buddy( struct im_connection *ic, char *handle, char *group );
+G_MODULE_EXPORT void imcb_add_buddy( struct im_connection *ic, const char *handle, const char *group );
+G_MODULE_EXPORT void imcb_remove_buddy( struct im_connection *ic, const char *handle, char *group );
 G_MODULE_EXPORT struct buddy *imcb_find_buddy( struct im_connection *ic, char *handle );
-G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, char *handle, char *realname );
+G_MODULE_EXPORT void imcb_rename_buddy( struct im_connection *ic, const char *handle, const char *realname );
 G_MODULE_EXPORT void imcb_buddy_nick_hint( struct im_connection *ic, char *handle, char *nick );
 
@@ -278,5 +277,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, 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, uint32_t flags, time_t sent_at );
 G_MODULE_EXPORT void imcb_buddy_typing( struct im_connection *ic, char *handle, uint32_t flags );
 G_MODULE_EXPORT void imcb_clean_handle( struct im_connection *ic, char *handle );
@@ -290,10 +289,10 @@
  *   the user her/himself. At that point the group chat will be visible to the
  *   user, too. */
-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 struct groupchat *imcb_chat_new( struct im_connection *ic, const char *handle );
+G_MODULE_EXPORT void imcb_chat_add_buddy( struct groupchat *b, const char *handle );
 /* To remove a handle from a group chat. Reason can be NULL. */
-G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, char *handle, char *reason );
+G_MODULE_EXPORT void imcb_chat_remove_buddy( struct groupchat *b, const char *handle, const char *reason );
 /* To tell BitlBee 'who' said 'msg' in 'c'. 'flags' and 'sent_at' can be 0. */
-G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, char *who, char *msg, uint32_t flags, time_t sent_at );
+G_MODULE_EXPORT void imcb_chat_msg( struct groupchat *c, const char *who, char *msg, uint32_t flags, time_t sent_at );
 /* System messages specific to a groupchat, so they can be displayed in the right context. */
 G_MODULE_EXPORT void imcb_chat_log( struct groupchat *c, char *format, ... ) G_GNUC_PRINTF( 2, 3 );
