Merge branch 'master' of git://git.psyced.org/git/psyced

This commit is contained in:
Gabor Adam Toth 2010-02-27 16:02:21 +01:00
commit 3465bba9bb
3 changed files with 6 additions and 5 deletions

View File

@ -41,7 +41,7 @@ mapping confmap = ([]);
mapping systemQ; mapping systemQ;
// protos // protos
//string legal_name(string n); //string legal_name(string n, int isPlace);
//string legal_mailto(string a); //string legal_mailto(string a);
int psyc_sendmsg(mixed target, string method, mixed data, mapping vars, int psyc_sendmsg(mixed target, string method, mixed data, mapping vars,
int showingLog, mixed source, array(mixed) uniform); int showingLog, mixed source, array(mixed) uniform);

View File

@ -91,7 +91,7 @@ _request_add(source, mc, data, vars, b) {
} }
unless (ni && p && (p->qFriend(target) || p->qFollower(target))) { unless (ni && p && (p->qFriend(target) || p->qFollower(target))) {
sendmsg(source, "_error_add", sendmsg(source, "_error_request_add", // FIXMC
"Error: [_person] is not a friend or follower.", ([ "_person": vars["_person"]])); "Error: [_person] is not a friend or follower.", ([ "_person": vars["_person"]]));
return 1; return 1;
} }
@ -114,7 +114,7 @@ _request_remove(source, mc, data, vars, b) {
object target = summon_person(vars["_person"], NET_PATH "user") || vars["_person"]; object target = summon_person(vars["_person"], NET_PATH "user") || vars["_person"];
unless (p && (qMember(target) || p->qFriend(target) || p->qFollower(target))) { unless (p && (qMember(target) || p->qFriend(target) || p->qFollower(target))) {
sendmsg(source, "_error_add", sendmsg(source, "_error_request_remove", // FIXMC
"Can't remove: [_person] is not a friend or follower.", ([ "_person": vars["_person"]])); "Can't remove: [_person] is not a friend or follower.", ([ "_person": vars["_person"]]));
return 1; return 1;
} }

View File

@ -136,10 +136,11 @@ object find_psyc_object(array(mixed) u) {
case '~': case '~':
#ifdef _flag_enable_module_microblogging #ifdef _flag_enable_module_microblogging
if (u[UChannel]) { if (u[UChannel]) {
t = lower_case(r + "#" + u[UChannel]); t = lower_case(r +"#"+ u[UChannel]);
r = PLACE_PATH + t; r = PLACE_PATH + t;
if (o = find_object(r)) break; if (o = find_object(r)) break;
unless (t = legal_name(t)) break; unless (t = legal_name(t, 1)) break;
// untreated catch? interesting..
catch(o = r -> load(t)); catch(o = r -> load(t));
} }
#endif #endif