1
0
Fork 0
mirror of git://git.psyced.org/git/psyced synced 2024-08-15 03:25:10 +00:00

use qName() for objectp sources

This commit is contained in:
psyc://psyced.org/~lynX 2009-03-04 12:21:53 +01:00
parent 6fd2423ff9
commit b704cedfd1
5 changed files with 89 additions and 50 deletions

View file

@ -10,7 +10,7 @@
#ifdef BRAIN
//# define ON_ANY if (mayLog(mc)) mymsg(source, mc, data, vars);
//# define ALLOW_EXTERNAL_FROM "psyc://fly.symlyn"
//# define ALLOW_EXTERNAL
# define ALLOW_EXTERNAL
#else
//# define CONNECT_DEFAULT
# define REDIRECT "psyc://psyced.org/@welcome"
@ -18,7 +18,7 @@
#include <place.gen>
#ifdef BRAIN
#if 0 // def BRAIN
// it was a bad idea anyway.. you don't wanna autorelease thru cvs..
#if 0
mymsg(source, mc, data, vars) {

View file

@ -1,4 +1,12 @@
// vim:syntax=lpc
//
// still fails in some unusual cases, like
// "Comments? Suggestions? Submissions? Fire away!"
#define ON_CONVERSE \
if (stringp(data)) data = zwirbel(0, data); \
walk_mapping(vars, #'zwirbel);
#include <place.gen>
mixed* randomize(mixed* abs) {
@ -36,7 +44,8 @@ mixed zwirbel(mixed name, mixed data) {
string* words;
int c = 0;
if (!stringp(data) || strlen(data) >= 3 || name == "_nick") return data;
if (!stringp(data) || strlen(data) < 5
|| name == "_nick" || name == "_color") return data;
words = explode(data, " ");
foreach (string w : words) {
// hier nochmal nach irgendwelchen satzzeichen am ende gucken
@ -47,18 +56,9 @@ mixed zwirbel(mixed name, mixed data) {
}
c++;
}
return data = implode(words, " ");
}
msg(source, mc, data, mapping vars) {
// normally we would check for _message but we're being nasty here
//if (stringp(data) && abbrev("_message", mc)) {
if (stringp(data)) {
data = zwirbel(0, data);
}
// even worse.. we fuck up the vars as well..
walk_mapping(vars, #'zwirbel);
return ::msg(source, mc, data, vars);
data = implode(words, " ");
//debug_message(sprintf("%O - %O\n", ME, data));
return data;
}
htget(prot, query, headers, qs) {