mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-09 20:11:00 +00:00
death the query_server_unl()
This commit is contained in:
parent
14c65f90a8
commit
821fb55b20
@ -145,7 +145,7 @@ void pushback(string failmc) {
|
|||||||
"_nick": vars["_nick_target"],
|
"_nick": vars["_nick_target"],
|
||||||
"_source": t[4],
|
"_source": t[4],
|
||||||
"_host": host,
|
"_host": host,
|
||||||
"_source_origin": query_server_unl(),
|
"_source_origin": SERVER_UNIFORM,
|
||||||
"_INTERNAL_origin" : ME,
|
"_INTERNAL_origin" : ME,
|
||||||
// so that tag-operated queues can be rolled back
|
// so that tag-operated queues can be rolled back
|
||||||
"_tag_reply" : t[3]["_tag"],
|
"_tag_reply" : t[3]["_tag"],
|
||||||
|
@ -16,10 +16,6 @@ Find more information at " URL_DOC
|
|||||||
|
|
||||||
virtual inherit NET_PATH "output";
|
virtual inherit NET_PATH "output";
|
||||||
|
|
||||||
#ifndef SERVER_UNL
|
|
||||||
# define SERVER_UNL query_server_unl()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
volatile object psycer;
|
volatile object psycer;
|
||||||
volatile string joe, joe_nick;
|
volatile string joe, joe_nick;
|
||||||
volatile mixed joe_unl;
|
volatile mixed joe_unl;
|
||||||
@ -81,7 +77,7 @@ static help() {
|
|||||||
#endif
|
#endif
|
||||||
#ifdef WEBMASTER_EMAIL
|
#ifdef WEBMASTER_EMAIL
|
||||||
reply("This gateway is operated by " WEBMASTER_EMAIL);
|
reply("This gateway is operated by " WEBMASTER_EMAIL);
|
||||||
// " on "+ SERVER_UNL);
|
// " on "+ SERVER_UNIFORM);
|
||||||
#endif
|
#endif
|
||||||
reply("My PSYC Identification is "+ psyc_name(ME));
|
reply("My PSYC Identification is "+ psyc_name(ME));
|
||||||
// reply("Can you imagine this is the new version of the first ever IRC bot written in LPC?");
|
// reply("Can you imagine this is the new version of the first ever IRC bot written in LPC?");
|
||||||
@ -103,7 +99,7 @@ static tell(a) {
|
|||||||
} else {
|
} else {
|
||||||
reply("Usage: T(ELL) or MSG <psycer> <textmessage>");
|
reply("Usage: T(ELL) or MSG <psycer> <textmessage>");
|
||||||
reply("Usage: T(ALK) or QUERY <psycer>");
|
reply("Usage: T(ALK) or QUERY <psycer>");
|
||||||
reply("<psycer> may either be a nickname on "+ SERVER_UNL +
|
reply("<psycer> may either be a nickname on "+ SERVER_UNIFORM +
|
||||||
" or a uniform network identification anywhere"
|
" or a uniform network identification anywhere"
|
||||||
" in PSYCspace.");
|
" in PSYCspace.");
|
||||||
}
|
}
|
||||||
@ -111,7 +107,7 @@ static tell(a) {
|
|||||||
}
|
}
|
||||||
unless (is_formal(p = whom)) {
|
unless (is_formal(p = whom)) {
|
||||||
p = summon_person(whom);
|
p = summon_person(whom);
|
||||||
if (!p) return reply(whom+" ain't here on "+ SERVER_UNL);
|
if (!p) return reply(whom+" ain't here on "+ SERVER_UNIFORM);
|
||||||
}
|
}
|
||||||
if (text) {
|
if (text) {
|
||||||
reply("You tell "+ UNIFORM(p) +": "+text);
|
reply("You tell "+ UNIFORM(p) +": "+text);
|
||||||
@ -140,7 +136,7 @@ static who() {
|
|||||||
mixed idle;
|
mixed idle;
|
||||||
string desc;
|
string desc;
|
||||||
|
|
||||||
reply("--- /who of local users of "+ SERVER_UNL);
|
reply("--- /who of local users of "+ SERVER_UNIFORM);
|
||||||
u = objects_people();
|
u = objects_people();
|
||||||
all = sizeof(u) < 23;
|
all = sizeof(u) < 23;
|
||||||
// same code in usercmd.i
|
// same code in usercmd.i
|
||||||
|
@ -119,7 +119,7 @@ htget(prot, query, headers, qs) {
|
|||||||
// note: the immediateness is not really used these days
|
// note: the immediateness is not really used these days
|
||||||
write("<div class='each'><a href='");
|
write("<div class='each'><a href='");
|
||||||
unless(is_formal(key)) {
|
unless(is_formal(key)) {
|
||||||
write(query_server_unl() + "@" + key);
|
write(SERVER_UNIFORM + "@" + key);
|
||||||
} else {
|
} else {
|
||||||
write(key);
|
write(key);
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@
|
|||||||
#ifdef _uniform_node
|
#ifdef _uniform_node
|
||||||
# define SERVER_UNIFORM _uniform_node
|
# define SERVER_UNIFORM _uniform_node
|
||||||
#else
|
#else
|
||||||
# define SERVER_UNIFORM query_server_unl()
|
# define SERVER_UNIFORM query_server_uniform()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MUD
|
#ifdef MUD
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#ifdef ALIASES
|
#ifdef ALIASES
|
||||||
# define DEALIAS(to, from) { string t;\
|
# define DEALIAS(to, from) { string t;\
|
||||||
to = raliases[t = lower_case(from)]\
|
to = raliases[t = lower_case(from)]\
|
||||||
|| (aliases[t] ? query_server_unl() +"~"+ from : from);\
|
|| (aliases[t] ? SERVER_UNIFORM +"~"+ from : from);\
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ string make_json(mixed d);
|
|||||||
void monitor_report(string mc, string text);
|
void monitor_report(string mc, string text);
|
||||||
array(object) objects_people();
|
array(object) objects_people();
|
||||||
varargs string psyc_name(mixed source, vastring localpart);
|
varargs string psyc_name(mixed source, vastring localpart);
|
||||||
string query_server_unl();
|
string query_server_uniform();
|
||||||
varargs mixed sendmsg(mixed target, string mc, mixed data, mapping vars,
|
varargs mixed sendmsg(mixed target, string mc, mixed data, mapping vars,
|
||||||
mixed source, int showingLog, closure callback, varargs array(mixed) extra);
|
mixed source, int showingLog, closure callback, varargs array(mixed) extra);
|
||||||
varargs void shout(mixed who, string what, string text, mapping vars);
|
varargs void shout(mixed who, string what, string text, mapping vars);
|
||||||
@ -55,7 +55,7 @@ string _psyc_make_json(mixed d);
|
|||||||
void _psyc_monitor_report(string mc, string text);
|
void _psyc_monitor_report(string mc, string text);
|
||||||
object* _psyc_objects_people();
|
object* _psyc_objects_people();
|
||||||
varargs string _psyc_psyc_name(mixed source, vastring localpart);
|
varargs string _psyc_psyc_name(mixed source, vastring localpart);
|
||||||
string _psyc_query_server_unl();
|
string _psyc_query_server_uniform();
|
||||||
varargs mixed _psyc_sendmsg(mixed target, string mc, mixed data, mapping vars,
|
varargs mixed _psyc_sendmsg(mixed target, string mc, mixed data, mapping vars,
|
||||||
mixed source, int showingLog, closure callback, varargs array(mixed) extra);
|
mixed source, int showingLog, closure callback, varargs array(mixed) extra);
|
||||||
varargs void _psyc_shout(mixed who, string what, string text, mapping vars);
|
varargs void _psyc_shout(mixed who, string what, string text, mapping vars);
|
||||||
|
@ -47,7 +47,7 @@ version(text, target, req, srcnick, source) {
|
|||||||
"[_nick] requests your version.",
|
"[_nick] requests your version.",
|
||||||
([ "_nick" : srcnick ]), source );
|
([ "_nick" : srcnick ]), source );
|
||||||
#ifndef _flag_disable_request_version_IRC
|
#ifndef _flag_disable_request_version_IRC
|
||||||
} else if (target == query_server_unl()) {
|
} else if (target == SERVER_UNIFORM) {
|
||||||
if (text) vSet("agent", text);
|
if (text) vSet("agent", text);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
|
@ -48,12 +48,8 @@ inherit IRC_PATH "decode";
|
|||||||
// message queueing and automatic reconnect mgmt
|
// message queueing and automatic reconnect mgmt
|
||||||
inherit NET_PATH "circuit";
|
inherit NET_PATH "circuit";
|
||||||
|
|
||||||
#ifndef _uniform_node
|
|
||||||
# define _uniform_node query_server_unl()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RELAY
|
#ifdef RELAY
|
||||||
# define IRCER_UNIFORM(NICK) (_uniform_node +"~"+ NICK)
|
# define IRCER_UNIFORM(NICK) (SERVER_UNIFORM +"~"+ NICK)
|
||||||
#else
|
#else
|
||||||
// will upgrade to irc: syntax..
|
// will upgrade to irc: syntax..
|
||||||
# define IRCER_UNIFORM(NICK) (MYLOWERNICK +":"+ NICK)
|
# define IRCER_UNIFORM(NICK) (MYLOWERNICK +":"+ NICK)
|
||||||
|
@ -360,7 +360,7 @@ w(string mc, string data, mapping vars, mixed source) {
|
|||||||
// give away your own nickname. i think that is unnecessary geek pride.
|
// give away your own nickname. i think that is unnecessary geek pride.
|
||||||
// so be it!
|
// so be it!
|
||||||
vars["_nick_me"] = aliases[MYLOWERNICK]
|
vars["_nick_me"] = aliases[MYLOWERNICK]
|
||||||
? query_server_unl() +"~"+ MYNICK
|
? SERVER_UNIFORM +"~"+ MYNICK
|
||||||
: MYNICK;
|
: MYNICK;
|
||||||
#else
|
#else
|
||||||
vars["_nick_me"] = MYNICK;
|
vars["_nick_me"] = MYNICK;
|
||||||
@ -379,7 +379,7 @@ w(string mc, string data, mapping vars, mixed source) {
|
|||||||
// source == 0 msgs.
|
// source == 0 msgs.
|
||||||
// those might be simple w()s... hm.
|
// those might be simple w()s... hm.
|
||||||
#ifndef UNSAFE_LASTLOG
|
#ifndef UNSAFE_LASTLOG
|
||||||
|| abbrev(query_server_unl() +"~", source)
|
|| abbrev(SERVER_UNIFORM +"~", source)
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
#ifdef GHOST //{{{
|
#ifdef GHOST //{{{
|
||||||
@ -665,10 +665,10 @@ w(string mc, string data, mapping vars, mixed source) {
|
|||||||
// psyctext ist an dieser stelle in der tat ohne vorteil
|
// psyctext ist an dieser stelle in der tat ohne vorteil
|
||||||
// aber auch kein performancefaktor.. also egal
|
// aber auch kein performancefaktor.. also egal
|
||||||
emit(":"+ vars["_alias"] +" NICK "+
|
emit(":"+ vars["_alias"] +" NICK "+
|
||||||
query_server_unl() +"~"+ vars["_alias"] + "\n");
|
SERVER_UNIFORM +"~"+ vars["_alias"] + "\n");
|
||||||
emit(psyctext(":[_nick_old] NICK [_nick_new]",
|
emit(psyctext(":[_nick_old] NICK [_nick_new]",
|
||||||
([ "_nick_old" : aliases[lower_case(vars["_address"])]
|
([ "_nick_old" : aliases[lower_case(vars["_address"])]
|
||||||
? query_server_unl() +"~"+
|
? SERVER_UNIFORM +"~"+
|
||||||
vars["_address"]
|
vars["_address"]
|
||||||
: uniform2irc(vars["_address"]),
|
: uniform2irc(vars["_address"]),
|
||||||
"_nick_new" : vars["_alias"] ])) + "\n");
|
"_nick_new" : vars["_alias"] ])) + "\n");
|
||||||
@ -677,11 +677,11 @@ w(string mc, string data, mapping vars, mixed source) {
|
|||||||
emit(psyctext(":[_nick_old] NICK [_nick_new]",
|
emit(psyctext(":[_nick_old] NICK [_nick_new]",
|
||||||
([ "_nick_old" : vars["_alias"],
|
([ "_nick_old" : vars["_alias"],
|
||||||
"_nick_new" : aliases[lower_case(vars["_address"])]
|
"_nick_new" : aliases[lower_case(vars["_address"])]
|
||||||
? query_server_unl() +"~"+ vars["_address"]
|
? SERVER_UNIFORM +"~"+ vars["_address"]
|
||||||
: uniform2irc(vars["_address"])
|
: uniform2irc(vars["_address"])
|
||||||
])) + "\n");
|
])) + "\n");
|
||||||
emit(psyctext(":[_nick_old] NICK [_nick_new]",
|
emit(psyctext(":[_nick_old] NICK [_nick_new]",
|
||||||
([ "_nick_old" : query_server_unl() +"~"+ vars["_alias"],
|
([ "_nick_old" : SERVER_UNIFORM +"~"+ vars["_alias"],
|
||||||
"_nick_new" : vars["_alias"] ])) + "\n");
|
"_nick_new" : vars["_alias"] ])) + "\n");
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -890,7 +890,7 @@ logon() {
|
|||||||
// version strings, only IRC makes it terribly complicated and
|
// version strings, only IRC makes it terribly complicated and
|
||||||
// even political. oh of course, that's because on irc the server
|
// even political. oh of course, that's because on irc the server
|
||||||
// admin isn't necessarily a person of your trusting.
|
// admin isn't necessarily a person of your trusting.
|
||||||
w("_request_version", 0, 0, query_server_unl());
|
w("_request_version", 0, 0, SERVER_UNIFORM);
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
return rc;
|
return rc;
|
||||||
|
@ -332,7 +332,7 @@ int msg(string source, string mc, string data,
|
|||||||
// and adjust rendered[i] accordingly
|
// and adjust rendered[i] accordingly
|
||||||
if (rendered[i] == clashnick) {
|
if (rendered[i] == clashnick) {
|
||||||
// this only happens with local users
|
// this only happens with local users
|
||||||
rendered[i] = query_server_unl() +"~"+ clashnick;
|
rendered[i] = SERVER_UNIFORM +"~"+ clashnick;
|
||||||
}
|
}
|
||||||
render("_status_place_members_each", "", ([
|
render("_status_place_members_each", "", ([
|
||||||
"_INTERNAL_target_jabber": vars["_INTERNAL_target_jabber"],
|
"_INTERNAL_target_jabber": vars["_INTERNAL_target_jabber"],
|
||||||
@ -452,7 +452,7 @@ int msg(string source, string mc, string data,
|
|||||||
// and adjust rendered[i] accordingly
|
// and adjust rendered[i] accordingly
|
||||||
if (rendered[i] == vars["_nick"]) {
|
if (rendered[i] == vars["_nick"]) {
|
||||||
// this only happens with local users
|
// this only happens with local users
|
||||||
rendered[i] = query_server_unl() +"~"+ rendered[i];
|
rendered[i] = SERVER_UNIFORM +"~"+ rendered[i];
|
||||||
}
|
}
|
||||||
render("_notice_place_enter", "",
|
render("_notice_place_enter", "",
|
||||||
([ "_INTERNAL_target_jabber": vars["_INTERNAL_target_jabber"],
|
([ "_INTERNAL_target_jabber": vars["_INTERNAL_target_jabber"],
|
||||||
|
@ -99,7 +99,7 @@ msg(source, mc, data, mapping vars, showingLog) {
|
|||||||
#if 0
|
#if 0
|
||||||
if (rendered[i] == vars["_nick"]) {
|
if (rendered[i] == vars["_nick"]) {
|
||||||
// this only happens with local users
|
// this only happens with local users
|
||||||
rendered[i] = query_server_unl() +"~"+ rendered[i];
|
rendered[i] = SERVER_UNIFORM +"~"+ rendered[i];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
packet += psyctext(template, ([
|
packet += psyctext(template, ([
|
||||||
|
@ -55,7 +55,7 @@ varargs int register_target(string uniform, vaobject handler, vaint shy) {
|
|||||||
raise_error("register_target without uniform\n");
|
raise_error("register_target without uniform\n");
|
||||||
#endif
|
#endif
|
||||||
#if 0
|
#if 0
|
||||||
if (query_server_unl() == uniform)
|
if (SERVER_UNIFORM == uniform)
|
||||||
raise_error("register_target for root!?\n");
|
raise_error("register_target for root!?\n");
|
||||||
#endif
|
#endif
|
||||||
if (targets[uniform]) {
|
if (targets[uniform]) {
|
||||||
@ -84,8 +84,8 @@ object find_target_handler(string target) { return targets[target]; }
|
|||||||
|
|
||||||
// LOCALHOST STUFF
|
// LOCALHOST STUFF
|
||||||
|
|
||||||
string query_server_unl() { return myUNL; } // proto.h!
|
string query_server_uniform() { return myUNL; } // proto.h!
|
||||||
string query_server_unl_ip() { return myUNLIP; }
|
string query_server_uniform_ip() { return myUNLIP; }
|
||||||
string my_lower_case_host() { return myLowerCaseHost; }
|
string my_lower_case_host() { return myLowerCaseHost; }
|
||||||
|
|
||||||
static varargs void ready_freddie(vamixed ip) {
|
static varargs void ready_freddie(vamixed ip) {
|
||||||
@ -273,7 +273,7 @@ static void create() {
|
|||||||
// //call_out(#'psyc_sendmsg, 1, PSYC_SYNCHRONIZE, "_request_synchronize",
|
// //call_out(#'psyc_sendmsg, 1, PSYC_SYNCHRONIZE, "_request_synchronize",
|
||||||
// call_out(#'sendmsg, 1, PSYC_SYNCHRONIZE, "_request_synchronize",
|
// call_out(#'sendmsg, 1, PSYC_SYNCHRONIZE, "_request_synchronize",
|
||||||
// "I'm up and ready for some hot sync action!", ([ ]),
|
// "I'm up and ready for some hot sync action!", ([ ]),
|
||||||
// query_server_unl()); //, parse_uniform(PSYC_SYNCHRONIZE));
|
// SERVER_UNIFORM); //, parse_uniform(PSYC_SYNCHRONIZE));
|
||||||
//# echo PSYC_SYNCHRONIZE activated.
|
//# echo PSYC_SYNCHRONIZE activated.
|
||||||
//#endif
|
//#endif
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ void monitor_report(string mc, string text) {
|
|||||||
log_file("MONITOR", mc +"\t"+ text +"\n");
|
log_file("MONITOR", mc +"\t"+ text +"\n");
|
||||||
#ifndef __PIKE__ // TPD
|
#ifndef __PIKE__ // TPD
|
||||||
unless (monitor) monitor = load_object(PLACE_PATH "monitor");
|
unless (monitor) monitor = load_object(PLACE_PATH "monitor");
|
||||||
if (monitor) monitor->msg(previous_object() || query_server_unl(),
|
if (monitor) monitor->msg(previous_object() || SERVER_UNIFORM,
|
||||||
mc, text, ([]));
|
mc, text, ([]));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ int greet() {
|
|||||||
#ifdef FORK // {{{
|
#ifdef FORK // {{{
|
||||||
emit(S_GLYPH_PACKET_DELIMITER "\n");
|
emit(S_GLYPH_PACKET_DELIMITER "\n");
|
||||||
emit("\
|
emit("\
|
||||||
=_source "+ query_server_unl() +"\n\
|
=_source "+ SERVER_UNIFORM +"\n\
|
||||||
=_target_peer psyc://"+ peeraddr +"/\n\
|
=_target_peer psyc://"+ peeraddr +"/\n\
|
||||||
=_available_characters UTF-8\n\
|
=_available_characters UTF-8\n\
|
||||||
=_available_protocols " PROTS "\n\
|
=_available_protocols " PROTS "\n\
|
||||||
@ -157,7 +157,7 @@ Available protocols: [_available_protocols].\n" S_GLYPH_PACKET_DELIMITER "\n");
|
|||||||
// other side tells us her name
|
// other side tells us her name
|
||||||
emit(S_GLYPH_PACKET_DELIMITER "\n");
|
emit(S_GLYPH_PACKET_DELIMITER "\n");
|
||||||
emit("\
|
emit("\
|
||||||
:_source "+ query_server_unl() +"\n\
|
:_source "+ SERVER_UNIFORM +"\n\
|
||||||
:_target_peer psyc://"+ peeraddr +"/\n"
|
:_target_peer psyc://"+ peeraddr +"/\n"
|
||||||
"\n\
|
"\n\
|
||||||
:_implementation "+ SERVER_VERSION +" "+ DRIVER_VERSION +" "+ OSTYPE +" "+ MACHTYPE +"\n\
|
:_implementation "+ SERVER_VERSION +" "+ DRIVER_VERSION +" "+ OSTYPE +" "+ MACHTYPE +"\n\
|
||||||
@ -167,7 +167,7 @@ Hello [_target_peer].\n\
|
|||||||
Circuit to [_source] running [_implementation] established.\n" S_GLYPH_PACKET_DELIMITER "\n");
|
Circuit to [_source] running [_implementation] established.\n" S_GLYPH_PACKET_DELIMITER "\n");
|
||||||
// ;ISO-8859-1;ISO-8859-15\n
|
// ;ISO-8859-1;ISO-8859-15\n
|
||||||
emit("\
|
emit("\
|
||||||
:_source "+ query_server_unl() +"\n\
|
:_source "+ SERVER_UNIFORM +"\n\
|
||||||
\n\
|
\n\
|
||||||
:_available_hashes "
|
:_available_hashes "
|
||||||
#if __EFUN_DEFINED__(sha1)
|
#if __EFUN_DEFINED__(sha1)
|
||||||
@ -314,12 +314,12 @@ int logon(int neverfails) {
|
|||||||
#ifdef FORK // {{{
|
#ifdef FORK // {{{
|
||||||
// init the out-state. these will be sent by greet()
|
// init the out-state. these will be sent by greet()
|
||||||
_o = ([
|
_o = ([
|
||||||
"_source" : query_server_unl(),
|
"_source" : SERVER_UNIFORM,
|
||||||
"_target" : "psyc:"+ peeraddr +"/",
|
"_target" : "psyc:"+ peeraddr +"/",
|
||||||
]);
|
]);
|
||||||
memory = copy(_o);
|
memory = copy(_o);
|
||||||
#if 0
|
#if 0
|
||||||
memory = ([ "_source" : query_server_unl(); 4,
|
memory = ([ "_source" : SERVER_UNIFORM; 4,
|
||||||
"_target" : "psyc:" + peeraddr +"/"; 4,
|
"_target" : "psyc:" + peeraddr +"/"; 4,
|
||||||
]);
|
]);
|
||||||
#endif
|
#endif
|
||||||
|
@ -80,7 +80,7 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
croak("_request_compression",
|
croak("_request_compression",
|
||||||
"Requesting compression using [_method]",
|
"Requesting compression using [_method]",
|
||||||
([ "_method" : "zlib" ]),
|
([ "_method" : "zlib" ]),
|
||||||
query_server_unl());
|
SERVER_UNIFORM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -89,14 +89,14 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
if (module == "_encrypt") {
|
if (module == "_encrypt") {
|
||||||
croak("_request_circuit_encrypt",
|
croak("_request_circuit_encrypt",
|
||||||
"Requesting transport layer security",
|
"Requesting transport layer security",
|
||||||
([ ]), query_server_unl());
|
([ ]), SERVER_UNIFORM);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (source == query_server_unl()) {
|
if (source == SERVER_UNIFORM) {
|
||||||
#ifndef __PIKE__ // TPD
|
#ifndef __PIKE__ // TPD
|
||||||
if (function_exists("connect_failure"))
|
if (function_exists("connect_failure"))
|
||||||
connect_failure("_self",
|
connect_failure("_self",
|
||||||
@ -152,7 +152,7 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
croak("_notice_circuit_compress",
|
croak("_notice_circuit_compress",
|
||||||
"Will restart with compression using [_method]",
|
"Will restart with compression using [_method]",
|
||||||
([ "_method" : vars["_method"] || "zlib" ]),
|
([ "_method" : vars["_method"] || "zlib" ]),
|
||||||
query_server_unl());
|
SERVER_UNIFORM);
|
||||||
enable_telnet(0);
|
enable_telnet(0);
|
||||||
start_mccp_compress(TELOPT_COMPRESS2);
|
start_mccp_compress(TELOPT_COMPRESS2);
|
||||||
// greet(); // TODO: calling it directly kills pypsyc
|
// greet(); // TODO: calling it directly kills pypsyc
|
||||||
@ -166,7 +166,7 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
#else
|
#else
|
||||||
croak("_error_unavailable_circuit_compress",
|
croak("_error_unavailable_circuit_compress",
|
||||||
"Did I really flaunt compression to you?",
|
"Did I really flaunt compression to you?",
|
||||||
([ ]), query_server_unl());
|
([ ]), SERVER_UNIFORM);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case "_request_circuit_encryption":
|
case "_request_circuit_encryption":
|
||||||
@ -179,14 +179,14 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
if (t = tls_query_connection_state(ME) == 0) {
|
if (t = tls_query_connection_state(ME) == 0) {
|
||||||
croak("_notice_circuit_encrypt",
|
croak("_notice_circuit_encrypt",
|
||||||
"Enabling TLS encryption.", ([ ]),
|
"Enabling TLS encryption.", ([ ]),
|
||||||
query_server_unl());
|
SERVER_UNIFORM);
|
||||||
tls_init_connection(ME);
|
tls_init_connection(ME);
|
||||||
// here we could actually need lars style
|
// here we could actually need lars style
|
||||||
// to call greet when ready()
|
// to call greet when ready()
|
||||||
} else if (t > 0) {
|
} else if (t > 0) {
|
||||||
/* sendmsg(source, "_error_tls_active",
|
/* sendmsg(source, "_error_tls_active",
|
||||||
"TLS is already active",
|
"TLS is already active",
|
||||||
([ ]), query_server_unl()); */
|
([ ]), SERVER_UNIFORM); */
|
||||||
P0(("received %O for %O who already has TLS\n", mc, ME))
|
P0(("received %O for %O who already has TLS\n", mc, ME))
|
||||||
} else {
|
} else {
|
||||||
// negative numbers (current behaviour of ldmud)
|
// negative numbers (current behaviour of ldmud)
|
||||||
@ -197,7 +197,7 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
// we can not be advertising it
|
// we can not be advertising it
|
||||||
croak("_error_unavailable_circuit_encrypt",
|
croak("_error_unavailable_circuit_encrypt",
|
||||||
"Can not remember telling you I had TLS.",
|
"Can not remember telling you I had TLS.",
|
||||||
([ ]), query_server_unl());
|
([ ]), SERVER_UNIFORM);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
case "_notice_circuit_encrypt":
|
case "_notice_circuit_encrypt":
|
||||||
|
@ -173,7 +173,7 @@ object find_psyc_object(array(mixed) u) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else unless (user) {
|
else unless (user) {
|
||||||
//return 0; // return SERVER_UNI !?
|
//return 0; // return SERVER_UNIFORM !?
|
||||||
return find_target_handler("/");
|
return find_target_handler("/");
|
||||||
}
|
}
|
||||||
if (!objectp(o) && user) {
|
if (!objectp(o) && user) {
|
||||||
|
@ -996,7 +996,7 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c
|
|||||||
source, t, ME))
|
source, t, ME))
|
||||||
unless (cvars["_source_relay"])
|
unless (cvars["_source_relay"])
|
||||||
cvars["_source_relay"] = source;
|
cvars["_source_relay"] = source;
|
||||||
source = cvars["_source"] || query_server_unl();
|
source = cvars["_source"] || SERVER_UNIFORM;
|
||||||
// relay the message!
|
// relay the message!
|
||||||
// this is used by procmail for example, whenever
|
// this is used by procmail for example, whenever
|
||||||
// it needs to send to an xmpp: recipient.
|
// it needs to send to an xmpp: recipient.
|
||||||
@ -1101,7 +1101,7 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c
|
|||||||
return restart();
|
return restart();
|
||||||
}
|
}
|
||||||
// else if (t) return _error_rejected_relay_outgoing TODO
|
// else if (t) return _error_rejected_relay_outgoing TODO
|
||||||
t2 = query_server_unl();
|
t2 = SERVER_UNIFORM;
|
||||||
// this part is new and maybe can be optimized.. TODO
|
// this part is new and maybe can be optimized.. TODO
|
||||||
// the main optimization would be to check for is_localhost
|
// the main optimization would be to check for is_localhost
|
||||||
// with host part of target
|
// with host part of target
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
//inherit NET_PATH "entity"
|
//inherit NET_PATH "entity"
|
||||||
|
|
||||||
msg(source, mc, data, vars, showingLog, target) {
|
msg(source, mc, data, vars, showingLog, target) {
|
||||||
mapping rv = ([ "_nick" : query_server_unl() ]);
|
mapping rv = ([ "_nick" : SERVER_UNIFORM ]);
|
||||||
mixed t;
|
mixed t;
|
||||||
string family;
|
string family;
|
||||||
int glyph;
|
int glyph;
|
||||||
|
@ -357,7 +357,7 @@ parseUDP(ip, port, msg) {
|
|||||||
//v["to"] += ";tag=1234567890abcde"; // ??? TODO
|
//v["to"] += ";tag=1234567890abcde"; // ??? TODO
|
||||||
/* need authorization
|
/* need authorization
|
||||||
*/
|
*/
|
||||||
v["www-authenticate"] = "Digest realm=\"" + query_server_unl() + "\", nonce=\"" + time() + "\"";
|
v["www-authenticate"] = "Digest realm=\"" + SERVER_UNIFORM + "\", nonce=\"" + time() + "\"";
|
||||||
reply = makeResponse(prot, 401, v, "");
|
reply = makeResponse(prot, 401, v, "");
|
||||||
// TODO: nonce generation has to be secure
|
// TODO: nonce generation has to be secure
|
||||||
send_udp(ip, port, reply);
|
send_udp(ip, port, reply);
|
||||||
|
@ -68,12 +68,12 @@ void greet() {
|
|||||||
// three separate packets follow (thus three emits)
|
// three separate packets follow (thus three emits)
|
||||||
//emit(S_GLYPH_PACKET_DELIMITER "\n");
|
//emit(S_GLYPH_PACKET_DELIMITER "\n");
|
||||||
emit("\
|
emit("\
|
||||||
:_source\t"+ query_server_unl() +"\n\
|
:_source\t"+ SERVER_UNIFORM +"\n\
|
||||||
:_target_peer\tpsyc://"+ peeraddr +"/\n\
|
:_target_peer\tpsyc://"+ peeraddr +"/\n\
|
||||||
\n\
|
\n\
|
||||||
_notice_circuit_established\n" S_GLYPH_PACKET_DELIMITER "\n");
|
_notice_circuit_established\n" S_GLYPH_PACKET_DELIMITER "\n");
|
||||||
emit("\
|
emit("\
|
||||||
:_source\t"+ query_server_unl() +"\n\
|
:_source\t"+ SERVER_UNIFORM +"\n\
|
||||||
\n\
|
\n\
|
||||||
_status_circuit\n" S_GLYPH_PACKET_DELIMITER "\n");
|
_status_circuit\n" S_GLYPH_PACKET_DELIMITER "\n");
|
||||||
#ifdef _flag_log_sockets_SPYC
|
#ifdef _flag_log_sockets_SPYC
|
||||||
|
@ -327,7 +327,7 @@ lookup(string mc, mixed fmt, object ghost, object curse) {
|
|||||||
in = before + _host_XMPP + after;
|
in = before + _host_XMPP + after;
|
||||||
break;
|
break;
|
||||||
case "VAR_server_uniform":
|
case "VAR_server_uniform":
|
||||||
in = before + query_server_unl() + after;
|
in = before + SERVER_UNIFORM + after;
|
||||||
break;
|
break;
|
||||||
case "VAR_method":
|
case "VAR_method":
|
||||||
PT(("using %O for %O\n", mc, code))
|
PT(("using %O for %O\n", mc, code))
|
||||||
|
@ -366,7 +366,7 @@ msg(source, mc, data, mapping vars, showingLog) {
|
|||||||
// evil scary rewrite to support changed lastlog behaviour ,)
|
// evil scary rewrite to support changed lastlog behaviour ,)
|
||||||
// TODO:: watch for _source_relay||(source resp. t)
|
// TODO:: watch for _source_relay||(source resp. t)
|
||||||
&&! (stringp(source)
|
&&! (stringp(source)
|
||||||
&& abbrev(query_server_unl() +"~", source))
|
&& abbrev(SERVER_UNIFORM +"~", source))
|
||||||
#endif
|
#endif
|
||||||
) {
|
) {
|
||||||
if (data && index(data, '\n') != -1)
|
if (data && index(data, '\n') != -1)
|
||||||
@ -1279,7 +1279,7 @@ w(string mc, string data, mapping vars, mixed source, int showingLog) {
|
|||||||
// the context was an object, but got lost
|
// the context was an object, but got lost
|
||||||
// during ldmud's lastlog persistence. let's
|
// during ldmud's lastlog persistence. let's
|
||||||
// reconstruct it!
|
// reconstruct it!
|
||||||
vars["_INTERNAL_context"] = query_server_unl();
|
vars["_INTERNAL_context"] = SERVER_UNIFORM;
|
||||||
// the place nick shouldn't be missing, but
|
// the place nick shouldn't be missing, but
|
||||||
// sometimes it does. let's figure out why
|
// sometimes it does. let's figure out why
|
||||||
if (stringp(vars["_nick_place"]))
|
if (stringp(vars["_nick_place"]))
|
||||||
@ -1838,7 +1838,7 @@ listDescription(vars, eachout, nicklink) {
|
|||||||
if (nicklink) {
|
if (nicklink) {
|
||||||
int i;
|
int i;
|
||||||
string n, u;
|
string n, u;
|
||||||
string s = query_server_unl();
|
string s = SERVER_UNIFORM;
|
||||||
|
|
||||||
va = copy(va);
|
va = copy(va);
|
||||||
for (i=sizeof(va)-1; i>=0; --i) {
|
for (i=sizeof(va)-1; i>=0; --i) {
|
||||||
@ -1863,7 +1863,7 @@ listDescription(vars, eachout, nicklink) {
|
|||||||
if (nicklink) {
|
if (nicklink) {
|
||||||
int i;
|
int i;
|
||||||
string n, u;
|
string n, u;
|
||||||
string s = query_server_unl();
|
string s = SERVER_UNIFORM;
|
||||||
|
|
||||||
va = copy(va);
|
va = copy(va);
|
||||||
for (i=sizeof(va)-1; i>=0; --i) {
|
for (i=sizeof(va)-1; i>=0; --i) {
|
||||||
|
@ -200,7 +200,7 @@ cmd(a, args, dest, command) {
|
|||||||
# ifdef WEBMASTER_EMAIL
|
# ifdef WEBMASTER_EMAIL
|
||||||
w("_info_administration_gateway",
|
w("_info_administration_gateway",
|
||||||
"This gateway is operated by " WEBMASTER_EMAIL);
|
"This gateway is operated by " WEBMASTER_EMAIL);
|
||||||
// " on "+ SERVER_UNL);
|
// " on "+ SERVER_UNIFORM);
|
||||||
# endif
|
# endif
|
||||||
// ARGH MULTILINE!!
|
// ARGH MULTILINE!!
|
||||||
w("_info_commands_gateway",
|
w("_info_commands_gateway",
|
||||||
@ -981,7 +981,7 @@ cmd(a, args, dest, command) {
|
|||||||
(vr = lower_case(vr)) != lower_case(vq))) {
|
(vr = lower_case(vr)) != lower_case(vq))) {
|
||||||
#ifdef ALIASES
|
#ifdef ALIASES
|
||||||
talk(raliases[vr] || (aliases[vr]
|
talk(raliases[vr] || (aliases[vr]
|
||||||
? query_server_unl()
|
? SERVER_UNIFORM
|
||||||
+"~"+ v("reply")
|
+"~"+ v("reply")
|
||||||
: v("reply")) );
|
: v("reply")) );
|
||||||
// let /r have its toggle-behaviour again, almost
|
// let /r have its toggle-behaviour again, almost
|
||||||
|
Loading…
Reference in New Issue
Block a user