mirror of
git://git.psyced.org/git/psyced
synced 2024-08-15 03:25:10 +00:00
_flag_disable_registration
This commit is contained in:
parent
0f3828597d
commit
c71c6ada46
10 changed files with 34 additions and 12 deletions
|
@ -1,6 +1,12 @@
|
||||||
<PSYC:TEXTDB> ## vim:syntax=mail
|
<PSYC:TEXTDB> ## vim:syntax=mail
|
||||||
## Check utf-8: Praise Atatürk!
|
## Check utf-8: Praise Atatürk!
|
||||||
|
|
||||||
|
_failure_disabled_function_register
|
||||||
|
|Registrierung ist auf diesem Server deaktiviert.
|
||||||
|
|
||||||
|
_failure_disabled_function_register_URI
|
||||||
|
|Registrierung deaktiviert. Bitte registriere Dich auf [_page_register].
|
||||||
|
|
||||||
_error_necessary_nick_local
|
_error_necessary_nick_local
|
||||||
|Dieser Befehl akzeptiert nur lokale Spitznamen.
|
|Dieser Befehl akzeptiert nur lokale Spitznamen.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
<PSYC:TEXTDB> ## vim:syntax=mail
|
<PSYC:TEXTDB> ## vim:syntax=mail
|
||||||
## Check utf-8: Praise Atatürk!
|
## Check utf-8: Praise Atatürk!
|
||||||
|
|
||||||
|
_failure_disabled_function_register
|
||||||
|
|Registration disabled on this server.
|
||||||
|
|
||||||
|
_failure_disabled_function_register_URI
|
||||||
|
|Registration disabled here. You can register at [_page_register].
|
||||||
|
|
||||||
_failure_unavailable_state
|
_failure_unavailable_state
|
||||||
|State module is not available as yet.
|
|State module is not available as yet.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
<PSYC:TEXTDB> ## vim:syntax=mail
|
<PSYC:TEXTDB> ## vim:syntax=mail
|
||||||
## tradotto al 30% ... cerca /TODO/ per continuare
|
## tradotto al 30% ... cerca /TODO/ per continuare
|
||||||
|
|
||||||
|
_failure_disabled_function_register
|
||||||
|
|Registrazione di nuovi utenti disabilitata su questo server.
|
||||||
|
|
||||||
|
_failure_disabled_function_register_URI
|
||||||
|
|Per la registrazione vada alla pagina [_page_register] per favore.
|
||||||
|
|
||||||
_failure_unavailable_alias
|
_failure_unavailable_alias
|
||||||
|niente alias per [_uniform_new]: [_nick_old] appartiene a [_uniform_old].
|
|niente alias per [_uniform_new]: [_nick_old] appartiene a [_uniform_old].
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,12 @@ disco_info_root(vars) {
|
||||||
string featurelist;
|
string featurelist;
|
||||||
featurelist = "<feature var='http://jabber.org/protocol/muc'/>"
|
featurelist = "<feature var='http://jabber.org/protocol/muc'/>"
|
||||||
#ifndef REGISTERED_USERS_ONLY
|
#ifndef REGISTERED_USERS_ONLY
|
||||||
|
# ifndef _flag_disable_registration
|
||||||
# ifndef _flag_disable_registration_XMPP
|
# ifndef _flag_disable_registration_XMPP
|
||||||
"<feature var='jabber:iq:register'/>"
|
"<feature var='jabber:iq:register'/>"
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
#endif
|
||||||
#ifndef VOLATILE
|
#ifndef VOLATILE
|
||||||
"<feature var='msgoffline'/>"
|
"<feature var='msgoffline'/>"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -187,7 +187,7 @@ jabberMsg(XMLNode node) {
|
||||||
case "jabber:iq:register":
|
case "jabber:iq:register":
|
||||||
if (node["@type"] == "get"){
|
if (node["@type"] == "get"){
|
||||||
string packet;
|
string packet;
|
||||||
#if defined(REGISTERED_USERS_ONLY) || defined(_flag_disable_registration_XMPP)
|
#if defined(REGISTERED_USERS_ONLY) || defined(_flag_disable_registration) || defined(_flag_disable_registration_XMPP)
|
||||||
// super dirty.. this should all be in textdb
|
// super dirty.. this should all be in textdb
|
||||||
packet = sprintf("<iq type='result' id='%s'>"
|
packet = sprintf("<iq type='result' id='%s'>"
|
||||||
"<query xmlns='jabber:iq:register'/>"
|
"<query xmlns='jabber:iq:register'/>"
|
||||||
|
@ -234,7 +234,7 @@ jabberMsg(XMLNode node) {
|
||||||
emit(packet);
|
emit(packet);
|
||||||
// QUIT
|
// QUIT
|
||||||
} else {
|
} else {
|
||||||
#if defined(REGISTERED_USERS_ONLY) || defined(_flag_disable_registration_XMPP)
|
#if defined(REGISTERED_USERS_ONLY) || defined(_flag_disable_registration) || defined(_flag_disable_registration_XMPP)
|
||||||
// TODO: generate some error as above
|
// TODO: generate some error as above
|
||||||
#else
|
#else
|
||||||
user -> vSet("password", t[Cdata]);
|
user -> vSet("password", t[Cdata]);
|
||||||
|
|
|
@ -626,7 +626,7 @@ iq(XMLNode node) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#if !defined(REGISTERED_USERS_ONLY) && !defined(_flag_disable_registration_XMPP)
|
#if !defined(REGISTERED_USERS_ONLY) && !defined(_flag_disable_registration) && !defined(_flag_disable_registration_XMPP)
|
||||||
case "jabber:iq:register":
|
case "jabber:iq:register":
|
||||||
switch(node["@type"]) {
|
switch(node["@type"]) {
|
||||||
case "get":
|
case "get":
|
||||||
|
|
|
@ -71,8 +71,10 @@ volatile mapping share = ([
|
||||||
"private" : "muc_hidden",
|
"private" : "muc_hidden",
|
||||||
"persistent" : "muc_persistent",
|
"persistent" : "muc_persistent",
|
||||||
"temporary" : "muc_temporary",
|
"temporary" : "muc_temporary",
|
||||||
|
#ifndef _flag_disable_registration
|
||||||
# ifndef _flag_disable_registration_XMPP
|
# ifndef _flag_disable_registration_XMPP
|
||||||
"registration" : "jabber:iq:register",
|
"registration" : "jabber:iq:register",
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
"offlinestorage" : "msgoffline",
|
"offlinestorage" : "msgoffline",
|
||||||
"version" : "jabber:iq:version",
|
"version" : "jabber:iq:version",
|
||||||
|
|
|
@ -778,15 +778,15 @@ case "HMAC-SHA1":
|
||||||
case "hmac-sha1":
|
case "hmac-sha1":
|
||||||
ARETURN(try == hmac(TLS_HASH_SHA1, v("password"), salt))
|
ARETURN(try == hmac(TLS_HASH_SHA1, v("password"), salt))
|
||||||
# ifdef AUTH_HMAC_SECRET
|
# ifdef AUTH_HMAC_SECRET
|
||||||
# define REGISTER_DISABLED
|
# define _flag_disable_registration
|
||||||
case "hmac-sha1-shared":
|
case "hmac-sha1-shared":
|
||||||
if (try == hmac(TLS_HASH_SHA1, AUTH_HMAC_SECRET, salt + MYNICK)) {
|
if (try == hmac(TLS_HASH_SHA1, AUTH_HMAC_SECRET, salt + MYNICK)) {
|
||||||
if (IS_NEWBIE) {
|
if (IS_NEWBIE) {
|
||||||
vSet("password", "");
|
vSet("password", "");
|
||||||
save();
|
save();
|
||||||
}
|
}
|
||||||
ARETURN(1);
|
ARETURN(1)
|
||||||
} else ARETURN(0);
|
} else ARETURN(0)
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -55,7 +55,7 @@ msg(source, mc, data, vars, showingLog, target) {
|
||||||
"version", // _tab
|
"version", // _tab
|
||||||
"time", "lasttime"
|
"time", "lasttime"
|
||||||
#endif
|
#endif
|
||||||
#if !defined(REGISTERED_USERS_ONLY) && !defined(_flag_disable_registration_XMPP)
|
#if !defined(REGISTERED_USERS_ONLY) && !defined(_flag_disable_registration) &&!defined(_flag_disable_registration_XMPP)
|
||||||
"registration",
|
"registration",
|
||||||
#endif
|
#endif
|
||||||
#ifndef VOLATILE
|
#ifndef VOLATILE
|
||||||
|
|
|
@ -3056,12 +3056,12 @@ set(key, value) {
|
||||||
w("_echo_set_default",
|
w("_echo_set_default",
|
||||||
"Setting [_key_set] has been reset to its default state.",
|
"Setting [_key_set] has been reset to its default state.",
|
||||||
([ "_key_set" : key ]) );
|
([ "_key_set" : key ]) );
|
||||||
#ifdef REGISTER_DISABLED
|
#ifdef _flag_disable_registration
|
||||||
} else if (key == "password" && IS_NEWBIE) {
|
} else if (key == "password" && IS_NEWBIE) {
|
||||||
# ifdef REGISTER_URL
|
# ifdef REGISTER_URL
|
||||||
w("_echo_set_password", "Registration disabled here. You can register at: " + REGISTER_URL);
|
w("_failure_disabled_function_register_URI", 0, ([ "_page_register": REGISTER_URL ]));
|
||||||
# else
|
# else
|
||||||
w("_echo_set_password", "Registration disabled.");
|
w("_failure_disabled_function_register");
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue