diff --git a/world/net/circuit.c b/world/net/circuit.c index 54bdc7e..cbcfd7e 100644 --- a/world/net/circuit.c +++ b/world/net/circuit.c @@ -145,7 +145,7 @@ void pushback(string failmc) { "_nick": vars["_nick_target"], "_source": t[4], "_host": host, - "_source_origin": query_server_unl(), + "_source_origin": SERVER_UNIFORM, "_INTERNAL_origin" : ME, // so that tag-operated queues can be rolled back "_tag_reply" : t[3]["_tag"], diff --git a/world/net/gateway/generic.c b/world/net/gateway/generic.c index b27196f..9a5f507 100644 --- a/world/net/gateway/generic.c +++ b/world/net/gateway/generic.c @@ -16,10 +16,6 @@ Find more information at " URL_DOC virtual inherit NET_PATH "output"; -#ifndef SERVER_UNL -# define SERVER_UNL query_server_unl() -#endif - volatile object psycer; volatile string joe, joe_nick; volatile mixed joe_unl; @@ -81,7 +77,7 @@ static help() { #endif #ifdef WEBMASTER_EMAIL reply("This gateway is operated by " WEBMASTER_EMAIL); - // " on "+ SERVER_UNL); + // " on "+ SERVER_UNIFORM); #endif 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?"); @@ -103,7 +99,7 @@ static tell(a) { } else { reply("Usage: T(ELL) or MSG "); reply("Usage: T(ALK) or QUERY "); - reply(" may either be a nickname on "+ SERVER_UNL + + reply(" may either be a nickname on "+ SERVER_UNIFORM + " or a uniform network identification anywhere" " in PSYCspace."); } @@ -111,7 +107,7 @@ static tell(a) { } unless (is_formal(p = 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) { reply("You tell "+ UNIFORM(p) +": "+text); @@ -140,7 +136,7 @@ static who() { mixed idle; string desc; - reply("--- /who of local users of "+ SERVER_UNL); + reply("--- /who of local users of "+ SERVER_UNIFORM); u = objects_people(); all = sizeof(u) < 23; // same code in usercmd.i diff --git a/world/net/http/edit.c b/world/net/http/edit.c index f7ccd89..a4dfc1a 100644 --- a/world/net/http/edit.c +++ b/world/net/http/edit.c @@ -119,7 +119,7 @@ htget(prot, query, headers, qs) { // note: the immediateness is not really used these days write("
msg(previous_object() || query_server_unl(), + if (monitor) monitor->msg(previous_object() || SERVER_UNIFORM, mc, text, ([])); #endif } diff --git a/world/net/psyc/circuit.c b/world/net/psyc/circuit.c index 40552e3..88dcec1 100644 --- a/world/net/psyc/circuit.c +++ b/world/net/psyc/circuit.c @@ -136,7 +136,7 @@ int greet() { #ifdef FORK // {{{ emit(S_GLYPH_PACKET_DELIMITER "\n"); emit("\ -=_source "+ query_server_unl() +"\n\ +=_source "+ SERVER_UNIFORM +"\n\ =_target_peer psyc://"+ peeraddr +"/\n\ =_available_characters UTF-8\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 emit(S_GLYPH_PACKET_DELIMITER "\n"); emit("\ -:_source "+ query_server_unl() +"\n\ +:_source "+ SERVER_UNIFORM +"\n\ :_target_peer psyc://"+ peeraddr +"/\n" "\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"); // ;ISO-8859-1;ISO-8859-15\n emit("\ -:_source "+ query_server_unl() +"\n\ +:_source "+ SERVER_UNIFORM +"\n\ \n\ :_available_hashes " #if __EFUN_DEFINED__(sha1) @@ -314,12 +314,12 @@ int logon(int neverfails) { #ifdef FORK // {{{ // init the out-state. these will be sent by greet() _o = ([ - "_source" : query_server_unl(), + "_source" : SERVER_UNIFORM, "_target" : "psyc:"+ peeraddr +"/", ]); memory = copy(_o); #if 0 - memory = ([ "_source" : query_server_unl(); 4, + memory = ([ "_source" : SERVER_UNIFORM; 4, "_target" : "psyc:" + peeraddr +"/"; 4, ]); #endif diff --git a/world/net/psyc/common.c b/world/net/psyc/common.c index d30402a..508d731 100644 --- a/world/net/psyc/common.c +++ b/world/net/psyc/common.c @@ -80,7 +80,7 @@ varargs int rootMsg(mixed source, string mc, string data, croak("_request_compression", "Requesting compression using [_method]", ([ "_method" : "zlib" ]), - query_server_unl()); + SERVER_UNIFORM); return; } #endif @@ -89,14 +89,14 @@ varargs int rootMsg(mixed source, string mc, string data, if (module == "_encrypt") { croak("_request_circuit_encrypt", "Requesting transport layer security", - ([ ]), query_server_unl()); + ([ ]), SERVER_UNIFORM); return; } #endif } } #endif - if (source == query_server_unl()) { + if (source == SERVER_UNIFORM) { #ifndef __PIKE__ // TPD if (function_exists("connect_failure")) connect_failure("_self", @@ -152,7 +152,7 @@ varargs int rootMsg(mixed source, string mc, string data, croak("_notice_circuit_compress", "Will restart with compression using [_method]", ([ "_method" : vars["_method"] || "zlib" ]), - query_server_unl()); + SERVER_UNIFORM); enable_telnet(0); start_mccp_compress(TELOPT_COMPRESS2); // greet(); // TODO: calling it directly kills pypsyc @@ -166,7 +166,7 @@ varargs int rootMsg(mixed source, string mc, string data, #else croak("_error_unavailable_circuit_compress", "Did I really flaunt compression to you?", - ([ ]), query_server_unl()); + ([ ]), SERVER_UNIFORM); #endif break; 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) { croak("_notice_circuit_encrypt", "Enabling TLS encryption.", ([ ]), - query_server_unl()); + SERVER_UNIFORM); tls_init_connection(ME); // here we could actually need lars style // to call greet when ready() } else if (t > 0) { /* sendmsg(source, "_error_tls_active", "TLS is already active", - ([ ]), query_server_unl()); */ + ([ ]), SERVER_UNIFORM); */ P0(("received %O for %O who already has TLS\n", mc, ME)) } else { // 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 croak("_error_unavailable_circuit_encrypt", "Can not remember telling you I had TLS.", - ([ ]), query_server_unl()); + ([ ]), SERVER_UNIFORM); #endif break; case "_notice_circuit_encrypt": diff --git a/world/net/psyc/library.i b/world/net/psyc/library.i index 2063e0e..66b2f6b 100644 --- a/world/net/psyc/library.i +++ b/world/net/psyc/library.i @@ -173,7 +173,7 @@ object find_psyc_object(array(mixed) u) { } } else unless (user) { - //return 0; // return SERVER_UNI !? + //return 0; // return SERVER_UNIFORM !? return find_target_handler("/"); } if (!objectp(o) && user) { diff --git a/world/net/psyc/parse.i b/world/net/psyc/parse.i index 4bdbfa2..9ad6df0 100644 --- a/world/net/psyc/parse.i +++ b/world/net/psyc/parse.i @@ -996,7 +996,7 @@ protected int deliver(mixed ip, string host, string mc, string buffer, mapping c source, t, ME)) unless (cvars["_source_relay"]) cvars["_source_relay"] = source; - source = cvars["_source"] || query_server_unl(); + source = cvars["_source"] || SERVER_UNIFORM; // relay the message! // this is used by procmail for example, whenever // 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(); } // 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 // the main optimization would be to check for is_localhost // with host part of target diff --git a/world/net/root.c b/world/net/root.c index c8ea92b..fb5cdf2 100644 --- a/world/net/root.c +++ b/world/net/root.c @@ -13,7 +13,7 @@ //inherit NET_PATH "entity" msg(source, mc, data, vars, showingLog, target) { - mapping rv = ([ "_nick" : query_server_unl() ]); + mapping rv = ([ "_nick" : SERVER_UNIFORM ]); mixed t; string family; int glyph; diff --git a/world/net/sip/udp.c b/world/net/sip/udp.c index b1c2eb1..9b88a25 100644 --- a/world/net/sip/udp.c +++ b/world/net/sip/udp.c @@ -357,7 +357,7 @@ parseUDP(ip, port, msg) { //v["to"] += ";tag=1234567890abcde"; // ??? TODO /* 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, ""); // TODO: nonce generation has to be secure send_udp(ip, port, reply); diff --git a/world/net/spyc/server.c b/world/net/spyc/server.c index 4627a08..4141f8b 100644 --- a/world/net/spyc/server.c +++ b/world/net/spyc/server.c @@ -68,12 +68,12 @@ void greet() { // three separate packets follow (thus three emits) //emit(S_GLYPH_PACKET_DELIMITER "\n"); emit("\ -:_source\t"+ query_server_unl() +"\n\ +:_source\t"+ SERVER_UNIFORM +"\n\ :_target_peer\tpsyc://"+ peeraddr +"/\n\ \n\ _notice_circuit_established\n" S_GLYPH_PACKET_DELIMITER "\n"); emit("\ -:_source\t"+ query_server_unl() +"\n\ +:_source\t"+ SERVER_UNIFORM +"\n\ \n\ _status_circuit\n" S_GLYPH_PACKET_DELIMITER "\n"); #ifdef _flag_log_sockets_SPYC diff --git a/world/net/text.c b/world/net/text.c index b0a234a..7554981 100644 --- a/world/net/text.c +++ b/world/net/text.c @@ -327,7 +327,7 @@ lookup(string mc, mixed fmt, object ghost, object curse) { in = before + _host_XMPP + after; break; case "VAR_server_uniform": - in = before + query_server_unl() + after; + in = before + SERVER_UNIFORM + after; break; case "VAR_method": PT(("using %O for %O\n", mc, code)) diff --git a/world/net/user.c b/world/net/user.c index 559512c..398d8cb 100644 --- a/world/net/user.c +++ b/world/net/user.c @@ -366,7 +366,7 @@ msg(source, mc, data, mapping vars, showingLog) { // evil scary rewrite to support changed lastlog behaviour ,) // TODO:: watch for _source_relay||(source resp. t) &&! (stringp(source) - && abbrev(query_server_unl() +"~", source)) + && abbrev(SERVER_UNIFORM +"~", source)) #endif ) { 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 // during ldmud's lastlog persistence. let's // reconstruct it! - vars["_INTERNAL_context"] = query_server_unl(); + vars["_INTERNAL_context"] = SERVER_UNIFORM; // the place nick shouldn't be missing, but // sometimes it does. let's figure out why if (stringp(vars["_nick_place"])) @@ -1838,7 +1838,7 @@ listDescription(vars, eachout, nicklink) { if (nicklink) { int i; string n, u; - string s = query_server_unl(); + string s = SERVER_UNIFORM; va = copy(va); for (i=sizeof(va)-1; i>=0; --i) { @@ -1863,7 +1863,7 @@ listDescription(vars, eachout, nicklink) { if (nicklink) { int i; string n, u; - string s = query_server_unl(); + string s = SERVER_UNIFORM; va = copy(va); for (i=sizeof(va)-1; i>=0; --i) { diff --git a/world/net/usercmd.i b/world/net/usercmd.i index 6588d23..e169fe7 100644 --- a/world/net/usercmd.i +++ b/world/net/usercmd.i @@ -200,7 +200,7 @@ cmd(a, args, dest, command) { # ifdef WEBMASTER_EMAIL w("_info_administration_gateway", "This gateway is operated by " WEBMASTER_EMAIL); - // " on "+ SERVER_UNL); + // " on "+ SERVER_UNIFORM); # endif // ARGH MULTILINE!! w("_info_commands_gateway", @@ -981,7 +981,7 @@ cmd(a, args, dest, command) { (vr = lower_case(vr)) != lower_case(vq))) { #ifdef ALIASES talk(raliases[vr] || (aliases[vr] - ? query_server_unl() + ? SERVER_UNIFORM +"~"+ v("reply") : v("reply")) ); // let /r have its toggle-behaviour again, almost