aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypting.c11
-rw-r--r--crypting.h1
-rw-r--r--irc.c7
3 files changed, 7 insertions, 12 deletions
diff --git a/crypting.c b/crypting.c
index e46f0b92..50967e91 100644
--- a/crypting.c
+++ b/crypting.c
@@ -45,9 +45,6 @@ typedef struct irc
char *password;
} irc_t;
-#define set_add( a, b, c, d )
-#define set_find( a, b ) NULL
-
#include "md5.h"
#include "crypting.h"
#include <string.h>
@@ -68,9 +65,6 @@ typedef struct irc
Sets pass without checking */
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);
if (pass) {
@@ -81,11 +75,6 @@ void setpassnc (irc_t *irc, const char *pass)
}
}
-char *passchange (irc_t *irc, void *set, const char *value) {
- setpassnc (irc, value);
- return (NULL);
-}
-
int setpass (irc_t *irc, const char *pass, const char* md5sum)
{
md5_state_t md5state;
diff --git a/crypting.h b/crypting.h
index ab551ea3..58534c07 100644
--- a/crypting.h
+++ b/crypting.h
@@ -24,7 +24,6 @@
*/
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);
diff --git a/irc.c b/irc.c
index c80e138d..2f9c2b31 100644
--- a/irc.c
+++ b/irc.c
@@ -31,6 +31,12 @@ static gboolean irc_userping( gpointer _irc );
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 )
{
irc_t *irc = g_new0( irc_t, 1 );
@@ -128,6 +134,7 @@ irc_t *irc_new( int fd )
set_add( irc, "strip_html", "true", NULL );
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 );