From d04fd7e10507addca3201caa27270314560e603c Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" Date: Wed, 4 Apr 1984 00:44:07 +0000 Subject: [PATCH] ensure that hmac is available (may result in a less useful psyced but better than nothing) --- world/drivers/ldmud/library/library.c | 2 ++ world/net/include/net.h | 2 +- world/net/user.c | 5 +---- world/net/usercmd.i | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/world/drivers/ldmud/library/library.c b/world/drivers/ldmud/library/library.c index 7e1f720..e3fbde1 100644 --- a/world/drivers/ldmud/library/library.c +++ b/world/drivers/ldmud/library/library.c @@ -21,7 +21,9 @@ inherit NET_PATH "library/tls"; # ifdef SANDBOX inherit NET_PATH "library/sandbox"; # endif +# if __EFUN_DEFINED__(hmac) inherit NET_PATH "library/hmac"; +# endif inherit NET_PATH "library/dns"; inherit NET_PATH "library/htbasics"; inherit NET_PATH "library/json"; diff --git a/world/net/include/net.h b/world/net/include/net.h index 09dab36..6e3fe66 100644 --- a/world/net/include/net.h +++ b/world/net/include/net.h @@ -280,7 +280,7 @@ // still using rawp anywhere? //#define rawp(TEXT) { P1(("rawp? "+TEXT)) emit(TEXT); } -#ifdef _flag_enable_module_microblogging +#if __EFUN_DEFINED__(hmac) && defined(_flag_enable_module_microblogging) # if defined(TWITTER_KEY) && defined(TWITTER_SECRET) # define TWITTER # endif diff --git a/world/net/user.c b/world/net/user.c index 06dd2fa..559b4f2 100644 --- a/world/net/user.c +++ b/world/net/user.c @@ -924,9 +924,8 @@ case "_status_place_members": // "_list_members_nicks" : t ]) ); // irc-thang: w(mc + "_end", 0, vars); // return 1; -#ifdef TELEPHONY_SECRET +#if __EFUN_DEFINED__(hmac) && defined(TELEPHONY_SECRET) # include - case "_notice_answer_call_click": case "_notice_answer_call": t = vars["_time_expire"]; @@ -943,9 +942,7 @@ case "_notice_answer_call": t3 = NET_PATH "http/call"->make_session(MYNICK, to_int(t), t3); w("_notice_answer_call_link", 0, ([ "_page_call": ( -#ifdef __TLS__ (tls_available() && HTTPS_URL) || -#endif HTTP_URL) + NET_PATH +"http/call?thats=me&sid=" +t3, # ifdef TELEPHONY_SERVER "_uniform_call": TELEPHONY_SERVER + t2, diff --git a/world/net/usercmd.i b/world/net/usercmd.i index 6481083..75a03a0 100644 --- a/world/net/usercmd.i +++ b/world/net/usercmd.i @@ -639,7 +639,7 @@ cmd(a, args, dest, command) { "The PSYC authentication token \"[_nonce]\" is now valid. Use it wisely.", ([ "_nonce" : v("nonce") ])); break; -#ifdef TELEPHONY_SECRET +#if __EFUN_DEFINED__(hmac) && defined(TELEPHONY_SECRET) # include # ifndef TELEPHONY_EXPIRY # define TELEPHONY_EXPIRY (60*60)