Index: bitlbee.c
===================================================================
--- bitlbee.c	(revision c3ffa45876c584d3e86c0796f2210538bcebc377)
+++ bitlbee.c	(revision 1eddf6b197ba5fbd3f1cce390396efc7d25c9de9)
@@ -244,5 +244,5 @@
 }
 
-int bitlbee_load( irc_t *irc, char* password )
+int bitlbee_load( irc_t *irc, const char* password )
 {
 	char s[512];
Index: bitlbee.h
===================================================================
--- bitlbee.h	(revision c3ffa45876c584d3e86c0796f2210538bcebc377)
+++ bitlbee.h	(revision 1eddf6b197ba5fbd3f1cce390396efc7d25c9de9)
@@ -127,5 +127,5 @@
 int root_command_string( irc_t *irc, user_t *u, char *command, int flags );
 int root_command( irc_t *irc, char *command[] );
-int bitlbee_load( irc_t *irc, char *password );
+int bitlbee_load( irc_t *irc, const char *password );
 int bitlbee_save( irc_t *irc );
 void bitlbee_shutdown( gpointer data );
Index: crypting.c
===================================================================
--- crypting.c	(revision c3ffa45876c584d3e86c0796f2210538bcebc377)
+++ crypting.c	(revision 1eddf6b197ba5fbd3f1cce390396efc7d25c9de9)
@@ -67,5 +67,6 @@
 /* USE WITH CAUTION!
    Sets pass without checking */
-void setpassnc (irc_t *irc, char *pass) {
+void setpassnc (irc_t *irc, const char *pass) 
+{
 	if (!set_find (irc, "password"))
 		set_add (irc, "password", NULL, passchange);
@@ -81,10 +82,11 @@
 }
 
-char *passchange (irc_t *irc, void *set, char *value) {
+char *passchange (irc_t *irc, void *set, const char *value) {
 	setpassnc (irc, value);
 	return (NULL);
 }
 
-int setpass (irc_t *irc, 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 c3ffa45876c584d3e86c0796f2210538bcebc377)
+++ crypting.h	(revision 1eddf6b197ba5fbd3f1cce390396efc7d25c9de9)
@@ -24,7 +24,7 @@
 */
 
-void setpassnc (irc_t *irc, char *pass); /* USE WITH CAUTION! */
-char *passchange (irc_t *irc, void *set, char *value);
-int setpass (irc_t *irc, char *pass, char* md5sum);
+void setpassnc (irc_t *irc, const char *pass); /* USE WITH CAUTION! */
+char *passchange (irc_t *irc, void *set, const char *value);
+int setpass (irc_t *irc, const char *pass, const char* md5sum);
 char *hashpass (irc_t *irc);
 char *obfucrypt (irc_t *irc, char *line);
Index: nick.c
===================================================================
--- nick.c	(revision c3ffa45876c584d3e86c0796f2210538bcebc377)
+++ nick.c	(revision 1eddf6b197ba5fbd3f1cce390396efc7d25c9de9)
@@ -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 c3ffa45876c584d3e86c0796f2210538bcebc377)
+++ nick.h	(revision 1eddf6b197ba5fbd3f1cce390396efc7d25c9de9)
@@ -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 );
