diff --git a/GNUmakefile b/GNUmakefile
index 0f5b734..4cbcdd6 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -10,9 +10,8 @@ LD := $(CC)
MV := mv
RANLIB := ranlib
CFLAGS += -pipe -Wall
-USE_SSL ?= NO
+USE_SSL ?= YES
USE_BIGENDIAN ?= AUTO
-USE_PLUGINS ?= YES
BITS ?= AUTO
SILENT ?= YES
TERSE ?= NO
@@ -43,7 +42,6 @@ UHUB_PREFIX ?= c:/uhub/
CFLAGS += -mno-cygwin
LDFLAGS += -mno-cygwin
BIN_EXT ?= .exe
-USE_PLUGINS := NO
else
DESTDIR ?= /
UHUB_CONF_DIR ?= $(DESTDIR)/etc/uhub
@@ -121,11 +119,7 @@ CFLAGS += -DSSL_SUPPORT
LDLIBS += -lssl
endif
-ifeq ($(USE_PLUGINS),YES)
-CFLAGS += -DPLUGIN_SUPPORT
LDLIBS += -ldl
-endif
-
GIT_VERSION=$(shell git describe --tags 2>/dev/null || echo "")
GIT_REVISION=$(shell git show --abbrev-commit 2>/dev/null | head -n 1 | cut -f 2 -d " " || echo "")
@@ -243,7 +237,7 @@ endif
%.o: %.c version.h revision.h
$(MSG_CC) $(CC) -fPIC -c $(CFLAGS) -o $@ $<
-all: $(uhub_BINARY)
+all: $(uhub_BINARY) plugins
plugins: $(uhub_BINARY) $(all_plugins)
diff --git a/src/adc/sid.c b/src/adc/sid.c
index 85f43bb..f334516 100644
--- a/src/adc/sid.c
+++ b/src/adc/sid.c
@@ -120,7 +120,6 @@ void sid_pool_destroy(struct sid_pool* pool)
sid_t sid_alloc(struct sid_pool* pool, struct hub_user* user)
{
sid_t n;
-
if (pool->count >= (pool->max - pool->min))
{
#ifdef DEBUG_SID
@@ -129,8 +128,7 @@ sid_t sid_alloc(struct sid_pool* pool, struct hub_user* user)
return 0;
}
- n = ++pool->count;
-
+ n = (++pool->count);
for (; (pool->map[n % pool->max]); n++) ;
#ifdef DEBUG_SID
diff --git a/src/adc/sid.h b/src/adc/sid.h
index e2e30d6..0def755 100644
--- a/src/adc/sid.h
+++ b/src/adc/sid.h
@@ -25,7 +25,6 @@
struct sid_pool;
struct hub_user;
-extern const char* BASE32_ALPHABET;
extern char* sid_to_string(sid_t sid_);
extern sid_t string_to_sid(const char* sid);
diff --git a/src/core/commands.c b/src/core/commands.c
index c86fe2f..678cb45 100644
--- a/src/core/commands.c
+++ b/src/core/commands.c
@@ -1,6 +1,6 @@
/*
* uhub - A tiny ADC p2p connection hub
- * Copyright (C) 2007-2010, Jan Vidar Krey
+ * Copyright (C) 2007-2011, Jan Vidar Krey
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -732,15 +732,22 @@ static int command_register(struct hub_info* hub, struct hub_user* user, struct
data.password[MAX_PASS_LEN] = '\0';
data.credentials = auth_cred_user;
- if (acl_register_user(hub, &data))
+ if (hub->config->register_self)
{
- sprintf(tmp, "User \"%s\" registered.", user->id.nick);
- return command_status(hub, user, cmd, tmp);
+ if (acl_register_user(hub, &data))
+ {
+ sprintf(tmp, "User \"%s\" registered.", user->id.nick);
+ return command_status(hub, user, cmd, tmp);
+ }
+ else
+ {
+ sprintf(tmp, "Unable to register user \"%s\".", user->id.nick);
+ return command_status(hub, user, cmd, tmp);
+ }
}
else
{
- sprintf(tmp, "Unable to register user \"%s\".", user->id.nick);
- return command_status(hub, user, cmd, tmp);
+ return command_status(hub, user, cmd, "You are not allowed to register.");
}
}
diff --git a/src/core/config.xml b/src/core/config.xml
index b8066ea..8e81403 100644
--- a/src/core/config.xml
+++ b/src/core/config.xml
@@ -108,6 +108,15 @@
0.1.1
+
+
+
+
+