mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-11-08 19:41:00 +00:00
_flag_enable_module_microblogging
This commit is contained in:
parent
249ecc4237
commit
f67c55a2e8
11
CHANGESTODO
11
CHANGESTODO
@ -3988,4 +3988,13 @@ user
|
||||
=== 201001 ============================================================
|
||||
jabber/active
|
||||
+ handle dialback timeouts, thx fip
|
||||
|
||||
smtp/outgoing, smtp/user
|
||||
+ implementation of outgoing mail queue
|
||||
=== 201002 ============================================================
|
||||
person, user
|
||||
+ allow multiple psyc clients per user, thx tg
|
||||
usercmd
|
||||
+ /forceenter only exists temporarily to circumvent a bug
|
||||
userthreads, threads, accept etc
|
||||
+ experimental microblogging on your web profile, thx tg
|
||||
#define _flag_enable_module_microblogging
|
||||
|
@ -391,6 +391,7 @@ object compile_object(string file) {
|
||||
unless (name = SIMUL_EFUN_FILE->legal_name(name, 1))
|
||||
return (object)0;
|
||||
|
||||
#ifdef _flag_enable_module_microblogging
|
||||
string username;
|
||||
if (sscanf(file, "place/~%s#updates", username)) {
|
||||
object p;
|
||||
@ -408,6 +409,7 @@ object compile_object(string file) {
|
||||
return (object)0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SANDBOX
|
||||
if (file_size(t = USER_PATH + name + ".c") != -1) {
|
||||
|
@ -146,13 +146,13 @@ sendmsg(target, mc, data, vars, source, showingLog, callback) {
|
||||
// maybe we should keep the _identification of the target somewhere
|
||||
// in vars. but where? _target_identification ? and who needs that?
|
||||
//
|
||||
// we have _target_localtion and _target_identification here. but
|
||||
// since its not implemented anywhere we are happy with this very
|
||||
// comment. TODO
|
||||
//
|
||||
// great, if I ping xmpp:fippo@amessage.de this makes
|
||||
// is xmpp:fippo@amessage.de/foo, but I DONT WANT THAT!
|
||||
if (!objectp(target) || (objectp(target) && target->vQuery("scheme") != "psyc"))
|
||||
// it xmpp:fippo@amessage.de/foo, but I DONT WANT THAT!
|
||||
# ifdef ALPHA
|
||||
// why do we if this?
|
||||
if (!objectp(target) || (objectp(target)
|
||||
&& target->vQuery("scheme") != "psyc"))
|
||||
# endif
|
||||
target = t;
|
||||
}
|
||||
#endif //}}}
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <net.h>
|
||||
|
||||
// legal nickname/placename test..
|
||||
varargs string legal_name(string name, int place) {
|
||||
varargs string legal_name(string name, int isPlace) {
|
||||
int i;
|
||||
string n = name;
|
||||
|
||||
@ -27,10 +27,11 @@ varargs string legal_name(string name, int place) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef _flag_enable_module_microblogging
|
||||
string nick;
|
||||
if (place && sscanf(name, "~%s#updates", nick))
|
||||
if (isPlace && sscanf(name, "~%s#updates", nick))
|
||||
n = nick;
|
||||
|
||||
#endif
|
||||
string chars = "\
|
||||
abcdefghijklmnopqrstuvwxyz\
|
||||
ABCDEFGHIJKLMNOPQRSTUVWXYZ\
|
||||
@ -43,7 +44,7 @@ ABCDEFGHIJKLMNOPQRSTUVWXYZ\
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return name;
|
||||
return name; // we used to return n here instead..
|
||||
}
|
||||
|
||||
array(string) legal_password(string pw, string nick) {
|
||||
|
@ -134,6 +134,7 @@ object find_psyc_object(array(mixed) u) {
|
||||
case '^':
|
||||
break;
|
||||
case '~':
|
||||
#ifdef _flag_enable_module_microblogging
|
||||
if (u[UChannel]) {
|
||||
t = lower_case(r + "#" + u[UChannel]);
|
||||
r = PLACE_PATH + t;
|
||||
@ -141,6 +142,7 @@ object find_psyc_object(array(mixed) u) {
|
||||
unless (t = legal_name(t)) break;
|
||||
catch(o = r -> load(t));
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case '$':
|
||||
// target wird auf serv/args gesetzt
|
||||
|
@ -284,9 +284,10 @@ htDescription(anonymous, query, headers, qs, variant, vars) {
|
||||
// <input type=hidden name=lang value=\""+v("language")+"\">\n\
|
||||
//
|
||||
|
||||
# ifdef _flag_enable_module_microblogging
|
||||
object u = find_place("~" + nick + "#updates");
|
||||
string updates = objectp(u) ? u->htMain(10) : "";
|
||||
|
||||
# endif
|
||||
return psyctext(page, vars + ([
|
||||
"_FORM_start" : "\
|
||||
<form class=\"Pef\" name=\"Pef\" action=\"\">\n\
|
||||
@ -296,8 +297,11 @@ htDescription(anonymous, query, headers, qs, variant, vars) {
|
||||
"_nick_me" : MYNICK,
|
||||
"_FORM_end" : "</form>\n",
|
||||
])
|
||||
) + updates;
|
||||
;
|
||||
)
|
||||
# ifdef _flag_enable_module_microblogging
|
||||
+ updates
|
||||
# endif
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -908,6 +908,7 @@ cmd(a, args, dest, command) {
|
||||
else
|
||||
teleport(args[1], "_join", 0, 1);
|
||||
break;
|
||||
#ifdef DEVELOPMENT
|
||||
case "forceenter":
|
||||
case "forcejoin":
|
||||
if (sizeof(args) < 2) {
|
||||
@ -936,6 +937,7 @@ cmd(a, args, dest, command) {
|
||||
break;
|
||||
// etwas hässlich so.. aber was will man sonst? beim zweiten versuch?
|
||||
// oder gar als flag von /leave?
|
||||
#endif
|
||||
case "forceleave": // delete the membership from places mapping
|
||||
if (member(places, (t = sizeof(args) < 2 ? place : args[1]))) {
|
||||
m_delete(places, t);
|
||||
|
Loading…
Reference in New Issue
Block a user