Index: crypting.c
===================================================================
--- crypting.c	(revision 7989fcf34257201f54538f289cce1c651341e142)
+++ crypting.c	(revision 8efa2f49816aaac986137a5da1f6c35425282195)
@@ -46,7 +46,4 @@
 } irc_t;
 
-#define set_add( a, b, c, d )
-#define set_find( a, b ) NULL
-
 #include "md5.h"
 #include "crypting.h"
@@ -69,7 +66,4 @@
 void setpassnc (irc_t *irc, const char *pass) 
 {
-	if (!set_find (irc, "password"))
-		set_add (irc, "password", NULL, passchange);
-	
 	if (irc->password) g_free (irc->password);
 	
@@ -82,10 +76,6 @@
 }
 
-char *passchange (irc_t *irc, void *set, char *value) {
-	setpassnc (irc, value);
-	return (NULL);
-}
-
-int setpass (irc_t *irc, const char *pass, char* md5sum) {
+int setpass (irc_t *irc, const char *pass, const char* md5sum) 
+{
 	md5_state_t md5state;
 	md5_byte_t digest[16];
Index: crypting.h
===================================================================
--- crypting.h	(revision 7989fcf34257201f54538f289cce1c651341e142)
+++ crypting.h	(revision 8efa2f49816aaac986137a5da1f6c35425282195)
@@ -25,6 +25,5 @@
 
 void setpassnc (irc_t *irc, const char *pass); /* USE WITH CAUTION! */
-char *passchange (irc_t *irc, void *set, char *value);
-int setpass (irc_t *irc, const char *pass, char* md5sum);
+int setpass (irc_t *irc, const char *pass, const char* md5sum);
 char *hashpass (irc_t *irc);
 char *obfucrypt (irc_t *irc, char *line);
Index: irc.c
===================================================================
--- irc.c	(revision 7989fcf34257201f54538f289cce1c651341e142)
+++ irc.c	(revision 8efa2f49816aaac986137a5da1f6c35425282195)
@@ -31,4 +31,10 @@
 
 GSList *irc_connection_list = NULL;
+
+char *passchange (irc_t *irc, void *set, char *value) 
+{
+	setpassnc (irc, value);
+	return (NULL);
+}
 
 irc_t *irc_new( int fd )
@@ -129,4 +135,5 @@
 	set_add( irc, "to_char", ": ", set_eval_to_char );
 	set_add( irc, "typing_notice", "false", set_eval_bool );
+	set_add( irc, "password", NULL, passchange);
 	
 	conf_loaddefaults( irc );
Index: nick.c
===================================================================
--- nick.c	(revision 7989fcf34257201f54538f289cce1c651341e142)
+++ nick.c	(revision 8efa2f49816aaac986137a5da1f6c35425282195)
@@ -27,5 +27,5 @@
 #include "bitlbee.h"
 
-void nick_set( irc_t *irc, char *handle, int proto, char *nick )
+void nick_set( irc_t *irc, const char *handle, int proto, const char *nick )
 {
 	nick_t *m = NULL, *n = irc->nicks;
@@ -56,5 +56,5 @@
 }
 
-char *nick_get( irc_t *irc, char *handle, int proto, const char *realname )
+char *nick_get( irc_t *irc, const char *handle, int proto, const char *realname )
 {
 	static char nick[MAX_NICK_LENGTH+1];
@@ -129,5 +129,5 @@
 }
 
-void nick_del( irc_t *irc, char *nick )
+void nick_del( irc_t *irc, const char *nick )
 {
 	nick_t *l = NULL, *n = irc->nicks;
@@ -176,7 +176,7 @@
 }
 
-int nick_ok( char *nick )
-{
-	char *s;
+int nick_ok( const char *nick )
+{
+	const char *s;
 	
 	/* Empty/long nicks are not allowed */
@@ -237,5 +237,5 @@
 }
 
-int nick_cmp( char *a, char *b )
+int nick_cmp( const char *a, const char *b )
 {
 	char aa[1024] = "", bb[1024] = "";
@@ -253,11 +253,6 @@
 }
 
-char *nick_dup( char *nick )
-{
-	char *cp;
-	
-	cp = g_new0 ( char, MAX_NICK_LENGTH + 1 );
-	strncpy( cp, nick, MAX_NICK_LENGTH );
-	
-	return( cp );
-}
+char *nick_dup( const char *nick )
+{
+	return g_strndup( nick, MAX_NICK_LENGTH );
+}
Index: nick.h
===================================================================
--- nick.h	(revision 7989fcf34257201f54538f289cce1c651341e142)
+++ nick.h	(revision 8efa2f49816aaac986137a5da1f6c35425282195)
@@ -32,12 +32,12 @@
 } nick_t;
 
-void nick_set( irc_t *irc, char *handle, int proto, char *nick );
-char *nick_get( irc_t *irc, char *handle, int proto, const char *realname );
-void nick_del( irc_t *irc, char *nick );
+void nick_set( irc_t *irc, const char *handle, int proto, const char *nick );
+char *nick_get( irc_t *irc, const char *handle, int proto, const char *realname );
+void nick_del( irc_t *irc, const char *nick );
 void nick_strip( char *nick );
 
-int nick_ok( char *nick );
+int nick_ok( const char *nick );
 int nick_lc( char *nick );
 int nick_uc( char *nick );
-int nick_cmp( char *a, char *b );
-char *nick_dup( char *nick );
+int nick_cmp( const char *a, const char *b );
+char *nick_dup( const char *nick );
Index: protocols/proxy.c
===================================================================
--- protocols/proxy.c	(revision 7989fcf34257201f54538f289cce1c651341e142)
+++ protocols/proxy.c	(revision 8efa2f49816aaac986137a5da1f6c35425282195)
@@ -50,14 +50,4 @@
 #define GAIM_ERR_COND   (G_IO_HUP | G_IO_ERR | G_IO_NVAL)
 
-/*FIXME*		
-	#ifndef _WIN32
-		if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) {
-			closesocket(fd);
-			g_free(phb);
-			return -1;
-		}
-		fcntl(fd, F_SETFL, 0);
-#endif*/
-
 char proxyhost[128] = "";
 int proxyport = 0;
@@ -83,5 +73,5 @@
 
 
-static struct sockaddr_in *gaim_gethostbyname(char *host, int port)
+static struct sockaddr_in *gaim_gethostbyname(const char *host, int port)
 {
 	static struct sockaddr_in sin;
@@ -154,5 +144,5 @@
 }
 
-static int proxy_connect_none(char *host, unsigned short port, struct PHB *phb)
+static int proxy_connect_none(const char *host, unsigned short port, struct PHB *phb)
 {
 	struct sockaddr_in *sin;
@@ -281,5 +271,5 @@
 }
 
-static int proxy_connect_http(char *host, unsigned short port, struct PHB *phb)
+static int proxy_connect_http(const char *host, unsigned short port, struct PHB *phb)
 {
 	phb->host = g_strdup(host);
@@ -365,5 +355,5 @@
 }
 
-static int proxy_connect_socks4(char *host, unsigned short port, struct PHB *phb)
+static int proxy_connect_socks4(const char *host, unsigned short port, struct PHB *phb)
 {
 	phb->host = g_strdup(host);
@@ -547,5 +537,5 @@
 }
 
-static int proxy_connect_socks5(char *host, unsigned short port, struct PHB *phb)
+static int proxy_connect_socks5(const char *host, unsigned short port, struct PHB *phb)
 {
 	phb->host = g_strdup(host);
@@ -588,5 +578,5 @@
 }
 
-int proxy_connect(char *host, int port, GaimInputFunction func, gpointer data)
+int proxy_connect(const char *host, int port, GaimInputFunction func, gpointer data)
 {
 	struct PHB *phb;
Index: protocols/proxy.h
===================================================================
--- protocols/proxy.h	(revision 7989fcf34257201f54538f289cce1c651341e142)
+++ protocols/proxy.h	(revision 8efa2f49816aaac986137a5da1f6c35425282195)
@@ -56,5 +56,5 @@
 G_MODULE_EXPORT void gaim_input_remove(gint);
 
-G_MODULE_EXPORT int proxy_connect(char *host, int port, GaimInputFunction func, gpointer data);
+G_MODULE_EXPORT int proxy_connect(const char *host, int port, GaimInputFunction func, gpointer data);
 
 #endif /* _PROXY_H_ */
