mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-08 19:41:00 +00:00
upgrade gammas
This commit is contained in:
parent
ac39429f4a
commit
a602585399
@ -314,6 +314,9 @@ ________________________________________________________________________
|
|||||||
but they should, everywhere except for irc maybe
|
but they should, everywhere except for irc maybe
|
||||||
- tg reports: the nick shows up like net/irc/user/#foo in IRC
|
- tg reports: the nick shows up like net/irc/user/#foo in IRC
|
||||||
|
|
||||||
|
+ add a _time_sent whenever messages are queued for later delivery, like
|
||||||
|
when there is no circuit yet.
|
||||||
|
|
||||||
+ install.sh sollte lieber mit bereits ausgepackten tars operieren
|
+ install.sh sollte lieber mit bereits ausgepackten tars operieren
|
||||||
können damit man darin tweaken kann und install nochmal anwerfen kann
|
können damit man darin tweaken kann und install nochmal anwerfen kann
|
||||||
... geht bei psyclpc, aber nicht beim psyced
|
... geht bei psyclpc, aber nicht beim psyced
|
||||||
|
@ -22,7 +22,7 @@ varargs http_error(string prot, int code, string comment, string html) {
|
|||||||
|
|
||||||
// apparently there isn't a single app that calls this with "html"
|
// apparently there isn't a single app that calls this with "html"
|
||||||
P2(("hterror(%O,%O,%O,%O) in %O\n", prot,code,comment,html, ME))
|
P2(("hterror(%O,%O,%O,%O) in %O\n", prot,code,comment,html, ME))
|
||||||
#if defined(GAMMA) && defined(T)
|
#if defined(T)
|
||||||
// use the textdb if available
|
// use the textdb if available
|
||||||
out = psyctext( T("_PAGES_error",
|
out = psyctext( T("_PAGES_error",
|
||||||
"<html><title id='code'>[_code]</title>\n"
|
"<html><title id='code'>[_code]</title>\n"
|
||||||
|
@ -16,7 +16,7 @@ htget(prot, query, headers, qs) {
|
|||||||
} else {
|
} else {
|
||||||
PT(("replacing cookie %O\n", headers["cookie"]))
|
PT(("replacing cookie %O\n", headers["cookie"]))
|
||||||
htok3(prot, 0, "Set-Cookie: psyced=\""+ qs +"\";\n");
|
htok3(prot, 0, "Set-Cookie: psyced=\""+ qs +"\";\n");
|
||||||
#ifdef GAMMA
|
#if 1
|
||||||
// login was supposed to something more than just /surf
|
// login was supposed to something more than just /surf
|
||||||
// but until this is the case, why lose time?
|
// but until this is the case, why lose time?
|
||||||
return NET_PATH "http/examine"->htget(0, query, headers, qs);
|
return NET_PATH "http/examine"->htget(0, query, headers, qs);
|
||||||
|
@ -163,9 +163,6 @@ render(string mc, string data, mapping vars, mixed source) {
|
|||||||
// this goes thru ->v()
|
// this goes thru ->v()
|
||||||
if (t && v("timestamp") != "off" // && abbrev("_message", mc)
|
if (t && v("timestamp") != "off" // && abbrev("_message", mc)
|
||||||
&& stringp(data)) {
|
&& stringp(data)) {
|
||||||
# ifndef GAMMA
|
|
||||||
if (stringp(t)) t = to_int(t); // we need types ;)
|
|
||||||
# endif
|
|
||||||
if (v("timestamp") == "on") {
|
if (v("timestamp") == "on") {
|
||||||
string msa = " ";
|
string msa = " ";
|
||||||
msa[0] = 0x01; // msa's CTCP character
|
msa[0] = 0x01; // msa's CTCP character
|
||||||
|
@ -745,10 +745,6 @@ autojoin() {
|
|||||||
string s;
|
string s;
|
||||||
|
|
||||||
if (isService) return -1;
|
if (isService) return -1;
|
||||||
# ifndef GAMMA
|
|
||||||
unless (v("place"))
|
|
||||||
vSet("place", T("_MISC_defplace", DEFPLACE));
|
|
||||||
# endif
|
|
||||||
// subscriptions are stored in lowercase, warum auch immer
|
// subscriptions are stored in lowercase, warum auch immer
|
||||||
if (sizeof(v("subscriptions")))
|
if (sizeof(v("subscriptions")))
|
||||||
foreach (s in v("subscriptions")) {
|
foreach (s in v("subscriptions")) {
|
||||||
@ -762,10 +758,8 @@ autojoin() {
|
|||||||
, // _automatic_subscription
|
, // _automatic_subscription
|
||||||
0, 0, ([ "_amount_history" : _limit_amount_history_place_default ]));
|
0, 0, ([ "_amount_history" : _limit_amount_history_place_default ]));
|
||||||
} else {
|
} else {
|
||||||
# ifdef GAMMA
|
|
||||||
unless (v("place"))
|
unless (v("place"))
|
||||||
vSet("place", T("_MISC_defplace", DEFPLACE));
|
vSet("place", T("_MISC_defplace", DEFPLACE));
|
||||||
# endif
|
|
||||||
# ifndef _flag_disable_place_default
|
# ifndef _flag_disable_place_default
|
||||||
// call_out(#'placeRequest, delay++, v("place"), ...
|
// call_out(#'placeRequest, delay++, v("place"), ...
|
||||||
placeRequest(v("place"),
|
placeRequest(v("place"),
|
||||||
|
@ -119,7 +119,7 @@ int msg(string source, string mc, string data,
|
|||||||
#else
|
#else
|
||||||
unless(vars["_language"]) vars["_language"] = "en";
|
unless(vars["_language"]) vars["_language"] = "en";
|
||||||
#endif
|
#endif
|
||||||
#ifndef GAMMA // TODO: decide if this is good or bad
|
#if 0
|
||||||
else if (abbrev("_status_person_absent", mc)) {
|
else if (abbrev("_status_person_absent", mc)) {
|
||||||
PT(("Intercepted absent from %O to %O\n", mc, source, ME))
|
PT(("Intercepted absent from %O to %O\n", mc, source, ME))
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -56,12 +56,10 @@ quit() {
|
|||||||
disconnected(remainder) {
|
disconnected(remainder) {
|
||||||
// TODO: handle remainder
|
// TODO: handle remainder
|
||||||
P2(( "gateway %O disconnected\n", ME ))
|
P2(( "gateway %O disconnected\n", ME ))
|
||||||
#ifdef GAMMA
|
|
||||||
// sometimes we get complete presence packets in the socket close
|
// sometimes we get complete presence packets in the socket close
|
||||||
// remainder. probably broken xmpp implementations, let's try and
|
// remainder. probably broken xmpp implementations, let's try and
|
||||||
// do the best we can with it by forwarding stuff to feed().
|
// do the best we can with it by forwarding stuff to feed().
|
||||||
if (remainder && strlen(remainder)) feed(remainder);
|
if (remainder && strlen(remainder)) feed(remainder);
|
||||||
#endif
|
|
||||||
if (objectp(active)) active -> removeGateway(streamid);
|
if (objectp(active)) active -> removeGateway(streamid);
|
||||||
#ifdef _flag_log_sockets_XMPP
|
#ifdef _flag_log_sockets_XMPP
|
||||||
log_file("RAW_XMPP", "\n%O disc\t%O", ME, ctime());
|
log_file("RAW_XMPP", "\n%O disc\t%O", ME, ctime());
|
||||||
|
@ -298,7 +298,6 @@ jabberMsg(XMLNode node, mixed origin, mixed *su, array(mixed) tu) {
|
|||||||
} else {
|
} else {
|
||||||
// no relaying allowed, so we ignore hostname
|
// no relaying allowed, so we ignore hostname
|
||||||
o = summon_person(tu[UUser]);
|
o = summon_person(tu[UUser]);
|
||||||
#ifdef GAMMA
|
|
||||||
// xep 0085 typing notices - we even split active into a separate message
|
// xep 0085 typing notices - we even split active into a separate message
|
||||||
// for now. could be sent as a flag
|
// for now. could be sent as a flag
|
||||||
if ((node[t="/composing"] || node[t="/active"] ||
|
if ((node[t="/composing"] || node[t="/active"] ||
|
||||||
@ -307,7 +306,6 @@ jabberMsg(XMLNode node, mixed origin, mixed *su, array(mixed) tu) {
|
|||||||
// ...
|
// ...
|
||||||
sendmsg(o, "_notice_typing_" + t[1..], 0, vars);
|
sendmsg(o, "_notice_typing_" + t[1..], 0, vars);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// there are some messages which dont have a body
|
// there are some messages which dont have a body
|
||||||
// we dont care about those
|
// we dont care about those
|
||||||
unless (node["/body"]) return;
|
unless (node["/body"]) return;
|
||||||
@ -384,9 +382,6 @@ jabberMsg(XMLNode node, mixed origin, mixed *su, array(mixed) tu) {
|
|||||||
// so there wont be circular error messages
|
// so there wont be circular error messages
|
||||||
if (tu[UUser]) {
|
if (tu[UUser]) {
|
||||||
o = summon_person(tu[UUser]);
|
o = summon_person(tu[UUser]);
|
||||||
#ifndef GAMMA
|
|
||||||
if (o && o->execute_callback(node["@id"], ({ vars["_INTERNAL_identification"], vars, node }))) return 1;
|
|
||||||
#else
|
|
||||||
// the following should catch errors - in theory, requires testing
|
// the following should catch errors - in theory, requires testing
|
||||||
if (o) {
|
if (o) {
|
||||||
int cb_ret;
|
int cb_ret;
|
||||||
@ -401,7 +396,6 @@ jabberMsg(XMLNode node, mixed origin, mixed *su, array(mixed) tu) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (tu[UResource]) {
|
if (tu[UResource]) {
|
||||||
// innerxml
|
// innerxml
|
||||||
|
@ -115,14 +115,12 @@ userLogon() {
|
|||||||
return ::userLogon();
|
return ::userLogon();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GAMMA
|
|
||||||
authChecked(result, varargs array(mixed) args) {
|
authChecked(result, varargs array(mixed) args) {
|
||||||
// a point where we could be sending our jabber:iq:auth reply
|
// a point where we could be sending our jabber:iq:auth reply
|
||||||
// instead of letting _notice_login do that
|
// instead of letting _notice_login do that
|
||||||
PT(("%O got authChecked %O, %O\n", ME, result, args))
|
PT(("%O got authChecked %O, %O\n", ME, result, args))
|
||||||
return ::authChecked(result, args...);
|
return ::authChecked(result, args...);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
jabberMsg(XMLNode node) {
|
jabberMsg(XMLNode node) {
|
||||||
XMLNode helper;
|
XMLNode helper;
|
||||||
|
@ -1087,12 +1087,6 @@ varargs int sendmsg(mixed target, string mc, mixed data, mapping vars,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
unless (source) source = previous_object();
|
unless (source) source = previous_object();
|
||||||
#ifndef GAMMA
|
|
||||||
// entity.c doesn't allow vars to be missing so we might
|
|
||||||
// just aswell enforce it in the whole psyced source that
|
|
||||||
// vars always need to be given as mapping. TODO
|
|
||||||
unless (mappingp(vars)) vars = ([]);
|
|
||||||
#endif
|
|
||||||
// target = lower_case(target) ist fuer xmpp nicht
|
// target = lower_case(target) ist fuer xmpp nicht
|
||||||
// gut, weil der resource-teil dort case-sensitive
|
// gut, weil der resource-teil dort case-sensitive
|
||||||
// ist... der node@domain-Part aber nicht
|
// ist... der node@domain-Part aber nicht
|
||||||
|
@ -107,34 +107,6 @@ PROTECTED void back() {
|
|||||||
myIndex -= 1;
|
myIndex -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GAMMA
|
|
||||||
// funny.. we already have two better ways to do hex2int than this:
|
|
||||||
//
|
|
||||||
/// <summary>
|
|
||||||
/// Get the hex value of a character (base16).
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="c">
|
|
||||||
/// A character between '0' and '9' or between 'A' and 'F' or
|
|
||||||
/// between 'a' and 'f'.
|
|
||||||
/// </param>
|
|
||||||
/// <returns>An int between 0 and 15, or -1 if c was not a hex digit.</returns>
|
|
||||||
PROTECTED int dehexchar(int c) {
|
|
||||||
if (c >= '0' && c <= '9')
|
|
||||||
{
|
|
||||||
return c - '0';
|
|
||||||
}
|
|
||||||
if (c >= 'A' && c <= 'F')
|
|
||||||
{
|
|
||||||
return c + 10 - 'A';
|
|
||||||
}
|
|
||||||
if (c >= 'a' && c <= 'f')
|
|
||||||
{
|
|
||||||
return c + 10 - 'a';
|
|
||||||
}
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Determine if the source string still contains characters that next() can consume.
|
/// Determine if the source string still contains characters that next() can consume.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -335,17 +307,8 @@ PROTECTED varargs string unescape(string s)
|
|||||||
if (c == '+') {
|
if (c == '+') {
|
||||||
c = ' ';
|
c = ' ';
|
||||||
} else if (c == '%' && (i + 2 < len)) {
|
} else if (c == '%' && (i + 2 < len)) {
|
||||||
#ifndef GAMMA
|
|
||||||
int d = dehexchar(s[i+1]);
|
|
||||||
int e = dehexchar(s[i+2]);
|
|
||||||
if (d >= 0 && e >= 0) {
|
|
||||||
c = (d*16 + e);
|
|
||||||
i += 2;
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
i += 2;
|
i += 2;
|
||||||
c = hex2int(s[i-1 .. i]);
|
c = hex2int(s[i-1 .. i]);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
sb+=int2char(c);
|
sb+=int2char(c);
|
||||||
}
|
}
|
||||||
|
@ -58,25 +58,6 @@ int emit(string message) {
|
|||||||
// right now no purpose in classic psyc server
|
// right now no purpose in classic psyc server
|
||||||
printStyle(mc) { return ([]); }
|
printStyle(mc) { return ([]); }
|
||||||
|
|
||||||
#ifndef GAMMA
|
|
||||||
// p() is for "unimportant" output
|
|
||||||
//
|
|
||||||
// each user.c should override this method with its own variant
|
|
||||||
// if special formatting (html, irc protocol..) is appropriate
|
|
||||||
// otherwise this will output "unformatted" text, and should be
|
|
||||||
// called as such
|
|
||||||
//
|
|
||||||
// does anything use this anymore? TODO
|
|
||||||
string p(string fmt, string a,string b,string c,string d,string e,string f,
|
|
||||||
string g,string h,string i,string j,string k) {
|
|
||||||
string message;
|
|
||||||
PT(("p(%O,%O,%O,%O..)\n", fmt, a,b,c))
|
|
||||||
message = sprintf(fmt, a,b,c,d,e,f,g,h,i,j,k);
|
|
||||||
emit(message);
|
|
||||||
return message;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef LPC3
|
#ifdef LPC3
|
||||||
// hm, this could move away TODO
|
// hm, this could move away TODO
|
||||||
telnet_negotiation(int cmd, int option, array(int) optargs) {
|
telnet_negotiation(int cmd, int option, array(int) optargs) {
|
||||||
|
@ -1772,9 +1772,7 @@ PT(("_failure_filter_strangers to %O from %O\n", source, ME))
|
|||||||
t = objectp(source)
|
t = objectp(source)
|
||||||
? ((vars && vars["_nick"]) || "(?)")
|
? ((vars && vars["_nick"]) || "(?)")
|
||||||
: (source || psource);
|
: (source || psource);
|
||||||
#ifdef GAMMA
|
|
||||||
if (t == v("reply")) break;
|
if (t == v("reply")) break;
|
||||||
#endif
|
|
||||||
vSet("reply", t);
|
vSet("reply", t);
|
||||||
// generation of "away" message in irc-speak
|
// generation of "away" message in irc-speak
|
||||||
#ifndef _flag_enable_unauthenticated_message_private
|
#ifndef _flag_enable_unauthenticated_message_private
|
||||||
|
@ -665,7 +665,6 @@ castPresence(source, mc, data, vars, filterpresence) {
|
|||||||
// actually insert the new member into our data structures
|
// actually insert the new member into our data structures
|
||||||
// (happens after all checks have passed)
|
// (happens after all checks have passed)
|
||||||
insert_member(source, mc, data, vars, ni, neu, again) {
|
insert_member(source, mc, data, vars, ni, neu, again) {
|
||||||
#ifdef GAMMA
|
|
||||||
unless (ni) {
|
unless (ni) {
|
||||||
P0(("insert_member w/out nick for %O in %O.\n", source, ME))
|
P0(("insert_member w/out nick for %O in %O.\n", source, ME))
|
||||||
// try to make the ugly three trailing parameters optional
|
// try to make the ugly three trailing parameters optional
|
||||||
@ -673,7 +672,6 @@ insert_member(source, mc, data, vars, ni, neu, again) {
|
|||||||
neu = !MEMBER(source); // don't output the status again
|
neu = !MEMBER(source); // don't output the status again
|
||||||
again = 0;
|
again = 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
#ifdef PLACE_MASQUERADE
|
#ifdef PLACE_MASQUERADE
|
||||||
if (vars["_nick_local"]) snames[source] = vars["_nick_local"];
|
if (vars["_nick_local"]) snames[source] = vars["_nick_local"];
|
||||||
#endif
|
#endif
|
||||||
|
@ -246,7 +246,6 @@ int logon(int neverfails) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __TLS__
|
#ifdef __TLS__
|
||||||
# ifdef GAMMA
|
|
||||||
sAuthHosts(([ ])); // reset authhosts
|
sAuthHosts(([ ])); // reset authhosts
|
||||||
if (tls_available() && tls_query_connection_state(ME) == 1 && mappingp(cert = tls_certificate(ME, 0))) {
|
if (tls_available() && tls_query_connection_state(ME) == 1 && mappingp(cert = tls_certificate(ME, 0))) {
|
||||||
if (cert[0] != 0) {
|
if (cert[0] != 0) {
|
||||||
@ -268,7 +267,7 @@ int logon(int neverfails) {
|
|||||||
else foreach(t : m) sAuthenticated(NAMEPREP(t));
|
else foreach(t : m) sAuthenticated(NAMEPREP(t));
|
||||||
}
|
}
|
||||||
//#ifdef _flag_allow_certificate_name_common // to be switched this year
|
//#ifdef _flag_allow_certificate_name_common // to be switched this year
|
||||||
#ifndef _flag_disallow_certificate_name_common
|
# ifndef _flag_disallow_certificate_name_common
|
||||||
// assume that CN is a host
|
// assume that CN is a host
|
||||||
// as this is an assumption only, we may NEVER register_target it
|
// as this is an assumption only, we may NEVER register_target it
|
||||||
// note: CN is deprecated for good reasons.
|
// note: CN is deprecated for good reasons.
|
||||||
@ -276,7 +275,7 @@ int logon(int neverfails) {
|
|||||||
P1(("%O believing CN %O\n", ME, t))
|
P1(("%O believing CN %O\n", ME, t))
|
||||||
sAuthenticated(NAMEPREP(t));
|
sAuthenticated(NAMEPREP(t));
|
||||||
}
|
}
|
||||||
#endif
|
# endif
|
||||||
if (m = tls_query_connection_info(ME)) {
|
if (m = tls_query_connection_info(ME)) {
|
||||||
P2(("%O is using the %O cipher.\n", ME, m[TLS_CIPHER]))
|
P2(("%O is using the %O cipher.\n", ME, m[TLS_CIPHER]))
|
||||||
// shouldn't our negotiation have ensured we have PFS?
|
// shouldn't our negotiation have ensured we have PFS?
|
||||||
@ -292,7 +291,6 @@ int logon(int neverfails) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cvars = ([]);
|
cvars = ([]);
|
||||||
|
@ -131,7 +131,6 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#ifdef GAMMA
|
|
||||||
case "_notice_authentication":
|
case "_notice_authentication":
|
||||||
P0(("rootMsg got a _notice_authentication. never happens since entity.c\n"))
|
P0(("rootMsg got a _notice_authentication. never happens since entity.c\n"))
|
||||||
register_location(vars["_location"], source, 1);
|
register_location(vars["_location"], source, 1);
|
||||||
@ -139,7 +138,6 @@ varargs int rootMsg(mixed source, string mc, string data,
|
|||||||
case "_error_invalid_authentication":
|
case "_error_invalid_authentication":
|
||||||
monitor_report(mc, psyctext("Breach: [_source] reports invalid authentication provided by [_location]", vars, data, source));
|
monitor_report(mc, psyctext("Breach: [_source] reports invalid authentication provided by [_location]", vars, data, source));
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#if 0
|
#if 0
|
||||||
case "_request_session_compression":
|
case "_request_session_compression":
|
||||||
case "_request_session_compress":
|
case "_request_session_compress":
|
||||||
|
@ -170,15 +170,7 @@ private int conclude() {
|
|||||||
unless (lastvar) return 0;
|
unless (lastvar) return 0;
|
||||||
// if (abbrev("_INTERNAL", lastvar)) not necessary because
|
// if (abbrev("_INTERNAL", lastvar)) not necessary because
|
||||||
// the following check only allows lowercase for now
|
// the following check only allows lowercase for now
|
||||||
if (
|
if ( !legal_keyword(lastvar) ) {
|
||||||
#ifdef GAMMA
|
|
||||||
!legal_keyword(lastvar)
|
|
||||||
#else
|
|
||||||
// very relaxed strategy
|
|
||||||
strlen(lastvar) < 2 || lastvar[0] != '_' // policy may change
|
|
||||||
|| lastvar[1] > 'z' || lastvar[1] < 'a'
|
|
||||||
#endif
|
|
||||||
) {
|
|
||||||
croak("_error_illegal_protocol_variable",
|
croak("_error_illegal_protocol_variable",
|
||||||
"You are not allowed to present a variable named [_variable_name].",
|
"You are not allowed to present a variable named [_variable_name].",
|
||||||
([ "_variable_name": lastvar ]));
|
([ "_variable_name": lastvar ]));
|
||||||
@ -318,13 +310,11 @@ vamixed parse(string a) {
|
|||||||
}
|
}
|
||||||
if (vname != "") {
|
if (vname != "") {
|
||||||
conclude();
|
conclude();
|
||||||
#ifdef GAMMA
|
|
||||||
// intermediate hack in lack of real type support
|
// intermediate hack in lack of real type support
|
||||||
// which needs to be done in net/spyc
|
// which needs to be done in net/spyc
|
||||||
if (abbrev("_time", vname)) vvalue = to_int(vvalue);
|
if (abbrev("_time", vname)) vvalue = to_int(vvalue);
|
||||||
// unused as yet: else if (abbrev("_date", vname))
|
// unused as yet: else if (abbrev("_date", vname))
|
||||||
// vvalue = PSYC_EPOCH + to_int(vvalue);
|
// vvalue = PSYC_EPOCH + to_int(vvalue);
|
||||||
#endif
|
|
||||||
cvars[lastvar = vname] = vvalue;
|
cvars[lastvar = vname] = vvalue;
|
||||||
#ifdef SYSTEM_SECRET
|
#ifdef SYSTEM_SECRET
|
||||||
unless (vcheck) {
|
unless (vcheck) {
|
||||||
@ -461,17 +451,7 @@ vamixed parse(string a) {
|
|||||||
#ifdef BITKOENIG_SYNTAX
|
#ifdef BITKOENIG_SYNTAX
|
||||||
sscanf(a, "%s %s", a, buffer);
|
sscanf(a, "%s %s", a, buffer);
|
||||||
#endif
|
#endif
|
||||||
#ifdef GAMMA
|
if (!legal_keyword(a)) {
|
||||||
if (!legal_keyword(a))
|
|
||||||
#else
|
|
||||||
// pretty inefficient strategy here
|
|
||||||
for (i=strlen(a)-1; i>=0; i--)
|
|
||||||
unless (a[i] == '_' ||
|
|
||||||
(a[i] >= 'a' && a[i] <= 'z') ||
|
|
||||||
(a[i] >= '0' && a[i] <= '9') ||
|
|
||||||
(a[i] >= 'A' && a[i] <= 'Z'))
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
croak("_error_illegal_method",
|
croak("_error_illegal_method",
|
||||||
"That's not a valid method name.");
|
"That's not a valid method name.");
|
||||||
QUIT
|
QUIT
|
||||||
|
@ -70,7 +70,7 @@ parseUDP2(host, ip, port, msg) {
|
|||||||
}
|
}
|
||||||
// else: we presume a UDP 4404 also listens on TCP
|
// else: we presume a UDP 4404 also listens on TCP
|
||||||
|
|
||||||
#ifndef GAMMA
|
#if 0
|
||||||
P1(("./psyc/udp.c: paranoid extra restart\n"))
|
P1(("./psyc/udp.c: paranoid extra restart\n"))
|
||||||
restart(); // leading . does that anyway
|
restart(); // leading . does that anyway
|
||||||
#endif
|
#endif
|
||||||
|
@ -769,9 +769,7 @@ case "_status_description_place":
|
|||||||
sscanf(vars["_tag_reply"], "%s %s", variant, t);
|
sscanf(vars["_tag_reply"], "%s %s", variant, t);
|
||||||
//PT(("format %O tag %O\n", variant, t))
|
//PT(("format %O tag %O\n", variant, t))
|
||||||
descvars = vars;
|
descvars = vars;
|
||||||
#ifdef GAMMA
|
|
||||||
descvars["_source"] = source;
|
descvars["_source"] = source;
|
||||||
#endif
|
|
||||||
switch (variant) {
|
switch (variant) {
|
||||||
default:
|
default:
|
||||||
// client doesn't want HTML
|
// client doesn't want HTML
|
||||||
@ -929,9 +927,7 @@ case "_failure_redirect":
|
|||||||
placeRequest(vars["_source_redirect"],
|
placeRequest(vars["_source_redirect"],
|
||||||
mc, 0, 1);
|
mc, 0, 1);
|
||||||
} // else.. we'll see
|
} // else.. we'll see
|
||||||
#ifdef GAMMA // enough to make the messages visible?
|
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "_echo_place_enter_INTERNAL_CHECK": // only do the check and dont write anything
|
case "_echo_place_enter_INTERNAL_CHECK": // only do the check and dont write anything
|
||||||
@ -1184,13 +1180,16 @@ case "_status":
|
|||||||
D2( if (vars["_nick"] != nick)
|
D2( if (vars["_nick"] != nick)
|
||||||
D(S("u:msg _nick %O is changed into %O\n", vars["_nick"], nick)); )
|
D(S("u:msg _nick %O is changed into %O\n", vars["_nick"], nick)); )
|
||||||
|
|
||||||
#if 0 //ndef GAMMA
|
#ifdef ALPHA
|
||||||
// DANGEROUS CHANGE! I added this line to make sure
|
// DANGEROUS CHANGE! I added this line to make sure
|
||||||
// remote UNI is shown on private messages. let's see
|
// remote UNI is shown on private messages. let's see
|
||||||
// if it breaks anything --- 2003-05-09
|
// if it breaks anything --- 2003-05-09
|
||||||
//
|
//
|
||||||
// for irssi w/ no-irssi-echo-chatting a backup comes in handy.
|
// for irssi w/ no-irssi-echo-chatting a backup comes in handy.
|
||||||
// --- 2005-01-07
|
// --- 2005-01-07
|
||||||
|
//
|
||||||
|
// tg has found out that this little line keeps masquerade from
|
||||||
|
// breaking for ircers: they would see object path otherwise
|
||||||
unless (vars["_nick_verbatim"]) vars["_nick_verbatim"] = vars["_nick"];
|
unless (vars["_nick_verbatim"]) vars["_nick_verbatim"] = vars["_nick"];
|
||||||
#endif
|
#endif
|
||||||
vars["_nick"] = nick;
|
vars["_nick"] = nick;
|
||||||
@ -1209,20 +1208,6 @@ case "_status":
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef GAMMA
|
|
||||||
// print() is for "important" output which gets lastlogged
|
|
||||||
//
|
|
||||||
// if no lastlog mechanism is available,
|
|
||||||
// you may choose to use this thing here
|
|
||||||
//
|
|
||||||
print(fmt, a,b,c,d,e,f,g,h,i,j,k) {
|
|
||||||
string m = sprintf(fmt, a,b,c,d,e,f,g,h,i,j,k);
|
|
||||||
P1(("user:print(%O,%O,%O..)\n", fmt,a,b))
|
|
||||||
emit(m);
|
|
||||||
return m;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// pr() has replaced p(), P() and print() in most cases.
|
// pr() has replaced p(), P() and print() in most cases.
|
||||||
// it uses the PSYC "message code" (actually a PSYC method)
|
// it uses the PSYC "message code" (actually a PSYC method)
|
||||||
// for classification of output going to the user
|
// for classification of output going to the user
|
||||||
@ -1436,20 +1421,13 @@ wAction(mc, data, vars, source, variant, nick) {
|
|||||||
w(mc+"_text_action"+variant, data, va, source);
|
w(mc+"_text_action"+variant, data, va, source);
|
||||||
else {
|
else {
|
||||||
if (va["_nick_target"])
|
if (va["_nick_target"])
|
||||||
w(mc+"_action"+variant,
|
w(mc+"_action"+variant, 0, va, source);
|
||||||
#ifdef GAMMA
|
|
||||||
0,
|
|
||||||
#else
|
|
||||||
// bei _message gehört sich das nicht
|
|
||||||
"[_nick_target]: [_nick] [_action].",
|
|
||||||
#endif
|
|
||||||
va, source);
|
|
||||||
else
|
else
|
||||||
w(mc+"_action"+variant,
|
w(mc+"_action"+variant,
|
||||||
#ifdef GAMMA
|
#ifdef ALPHA
|
||||||
"[_nick] [_action].",
|
|
||||||
#else
|
|
||||||
0,
|
0,
|
||||||
|
#else
|
||||||
|
"[_nick] [_action].",
|
||||||
#endif
|
#endif
|
||||||
va, source);
|
va, source);
|
||||||
}
|
}
|
||||||
@ -1550,10 +1528,6 @@ autojoin() {
|
|||||||
vSet("place", DEFPLACE);
|
vSet("place", DEFPLACE);
|
||||||
# endif
|
# endif
|
||||||
P2(("autojoin with %O %O %O\n", v("place"), place, places))
|
P2(("autojoin with %O %O %O\n", v("place"), place, places))
|
||||||
# ifndef GAMMA
|
|
||||||
unless (v("place"))
|
|
||||||
vSet("place", T("_MISC_defplace", DEFPLACE));
|
|
||||||
# endif
|
|
||||||
// see also http://about.psyc.eu/Client_coders#Room_members
|
// see also http://about.psyc.eu/Client_coders#Room_members
|
||||||
if (sizeof(places)) {
|
if (sizeof(places)) {
|
||||||
#if 0
|
#if 0
|
||||||
@ -1600,10 +1574,8 @@ autojoin() {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
# ifndef _flag_disable_place_default
|
# ifndef _flag_disable_place_default
|
||||||
# ifdef GAMMA
|
|
||||||
unless (v("place"))
|
unless (v("place"))
|
||||||
vSet("place", T("_MISC_defplace", DEFPLACE));
|
vSet("place", T("_MISC_defplace", DEFPLACE));
|
||||||
# endif
|
|
||||||
// re-entering your last place is unusual by irc
|
// re-entering your last place is unusual by irc
|
||||||
// habits, but since we don't want people to set up
|
// habits, but since we don't want people to set up
|
||||||
// autojoins they may find this quite practical until
|
// autojoins they may find this quite practical until
|
||||||
@ -1707,7 +1679,6 @@ disconnected(remainder) {
|
|||||||
// user did not detach his client properly. we'll make a wild guess
|
// user did not detach his client properly. we'll make a wild guess
|
||||||
// at how many messages he may have missed - enough to make the user
|
// at how many messages he may have missed - enough to make the user
|
||||||
// check the lastlog if that's not enough.
|
// check the lastlog if that's not enough.
|
||||||
#ifdef GAMMA
|
|
||||||
// FIXME: problem with jabber/user running into some bug when
|
// FIXME: problem with jabber/user running into some bug when
|
||||||
// lastlog messages are shown.. which at this point of course
|
// lastlog messages are shown.. which at this point of course
|
||||||
// creates a recursion - thus, eliminating the otherwise useful
|
// creates a recursion - thus, eliminating the otherwise useful
|
||||||
@ -1719,7 +1690,6 @@ disconnected(remainder) {
|
|||||||
P1(("unexpected disconnect in %O\n", ME))
|
P1(("unexpected disconnect in %O\n", ME))
|
||||||
vInc("new", 7);
|
vInc("new", 7);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// actually - we could show all messages since last activity
|
// actually - we could show all messages since last activity
|
||||||
// from user. TODO
|
// from user. TODO
|
||||||
#ifdef AVAILABILITY_OFFLINE
|
#ifdef AVAILABILITY_OFFLINE
|
||||||
|
@ -3385,7 +3385,7 @@ static placeRequest(where, mc, leave, quiet, morevars) {
|
|||||||
return msg($1, $2, $3, $4); :);
|
return msg($1, $2, $3, $4); :);
|
||||||
// we use our right to leave the context ourselves
|
// we use our right to leave the context ourselves
|
||||||
// after informing the place..
|
// after informing the place..
|
||||||
# ifdef GAMMA
|
# ifdef BETA
|
||||||
// <fippo> but that makes any _notice_place_leave run
|
// <fippo> but that makes any _notice_place_leave run
|
||||||
// into the filter so i comment it out
|
// into the filter so i comment it out
|
||||||
leavePlace(where);
|
leavePlace(where);
|
||||||
|
Loading…
Reference in New Issue
Block a user