From bdfae4e35005cc1d024cf9f33d7abe79621864f6 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" <@> Date: Mon, 26 Jan 2009 21:26:52 +0100 Subject: [PATCH] january 2009 --- .gitignore | 1 + CHANGESTODO | 3 +- bin/edata | 0 bin/psyked | 0 config/psyced.settings | 0 place/africa.c | 0 place/america.c | 0 place/asia.c | 0 place/australia.c | 0 place/europa.c | 0 place/indigestion.c | 0 place/irc.c-fly | 18 ----- place/london.c | 0 place/newyork.c | 0 place/paris.c | 0 place/spiegel-en.c | 2 - place/spiegel.c | 2 - place/telex.c | 0 place/tokyo.c | 0 run/md5.pl | 0 run/sha1.pl | 0 utility/multipatcher | 0 world/default/de/plain.textdb | 14 +++- world/local | 1 - world/log | 1 - world/net/http/myVideo.swf.c | 11 ---- world/net/include/place.i | 2 +- world/net/library/profiles.xul | 116 --------------------------------- world/net/person.c | 20 ++++-- world/net/place/_.c | 5 -- world/net/place/_h.c | 6 -- world/net/place/_he.c | 7 -- world/net/place/_hem.c | 8 --- world/net/place/_hemo.c | 9 --- world/net/place/_heo.c | 8 --- world/net/place/_hes.c | 8 --- world/net/place/_hesm.c | 9 --- world/net/place/_hesmo.c | 10 --- world/net/place/_heso.c | 9 --- world/net/place/_hm.c | 7 -- world/net/place/_hmo.c | 8 --- world/net/place/_ho.c | 7 -- world/net/place/_hs.c | 7 -- world/net/place/_hsm.c | 8 --- world/net/place/_hsmo.c | 9 --- world/net/place/_hso.c | 8 --- world/net/place/_m.c | 6 -- world/net/place/_mo.c | 7 -- world/net/place/_o.c | 6 -- world/net/place/_s.c | 6 -- world/net/place/_sm.c | 7 -- world/net/place/_smo.c | 8 --- world/net/place/_so.c | 7 -- world/net/place/archetype.pl | 0 world/net/psyc/parse.i | 4 +- world/net/spyc/server.c | 44 ++++++------- world/net/usercmd.i | 38 +++++++---- world/net/xml/parse.c | 2 +- world/net/xml/parse.c-retro | 65 ------------------ world/net/xml/t/common.c | 32 --------- world/net/xml/t/parse.c | 65 ------------------ world/net/xml/t/t/common.c | 32 --------- world/net/xml/t/t/parse.c | 110 ------------------------------- world/net/xml/t/tmp | 110 ------------------------------- 64 files changed, 79 insertions(+), 794 deletions(-) mode change 100644 => 100755 bin/edata mode change 100644 => 100755 bin/psyked mode change 100644 => 100755 config/psyced.settings mode change 100644 => 100755 place/africa.c mode change 100644 => 100755 place/america.c mode change 100644 => 100755 place/asia.c mode change 100644 => 100755 place/australia.c mode change 100644 => 100755 place/europa.c mode change 100644 => 100755 place/indigestion.c delete mode 100644 place/irc.c-fly mode change 100644 => 100755 place/london.c mode change 100644 => 100755 place/newyork.c mode change 100644 => 100755 place/paris.c mode change 100644 => 100755 place/telex.c mode change 100644 => 100755 place/tokyo.c mode change 100644 => 100755 run/md5.pl mode change 100644 => 100755 run/sha1.pl mode change 100644 => 100755 utility/multipatcher delete mode 120000 world/local delete mode 120000 world/log delete mode 100644 world/net/http/myVideo.swf.c delete mode 100644 world/net/library/profiles.xul delete mode 100644 world/net/place/_.c delete mode 100644 world/net/place/_h.c delete mode 100644 world/net/place/_he.c delete mode 100644 world/net/place/_hem.c delete mode 100644 world/net/place/_hemo.c delete mode 100644 world/net/place/_heo.c delete mode 100644 world/net/place/_hes.c delete mode 100644 world/net/place/_hesm.c delete mode 100644 world/net/place/_hesmo.c delete mode 100644 world/net/place/_heso.c delete mode 100644 world/net/place/_hm.c delete mode 100644 world/net/place/_hmo.c delete mode 100644 world/net/place/_ho.c delete mode 100644 world/net/place/_hs.c delete mode 100644 world/net/place/_hsm.c delete mode 100644 world/net/place/_hsmo.c delete mode 100644 world/net/place/_hso.c delete mode 100644 world/net/place/_m.c delete mode 100644 world/net/place/_mo.c delete mode 100644 world/net/place/_o.c delete mode 100644 world/net/place/_s.c delete mode 100644 world/net/place/_sm.c delete mode 100644 world/net/place/_smo.c delete mode 100644 world/net/place/_so.c mode change 100644 => 100755 world/net/place/archetype.pl delete mode 100644 world/net/xml/parse.c-retro delete mode 100644 world/net/xml/t/common.c delete mode 100644 world/net/xml/t/parse.c delete mode 100644 world/net/xml/t/t/common.c delete mode 100644 world/net/xml/t/t/parse.c delete mode 100644 world/net/xml/t/tmp diff --git a/.gitignore b/.gitignore index e72fb34..b8aeb1c 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ CVS *bak *diff *orig +world/net/place/_*.c diff --git a/CHANGESTODO b/CHANGESTODO index 7ebc251..7fec813 100644 --- a/CHANGESTODO +++ b/CHANGESTODO @@ -1,4 +1,4 @@ -$Id: CHANGESTODO,v 1.1649 2008/11/29 12:38:48 lynx Exp $ vim:nosmarttab +$Id: CHANGESTODO,v 1.1650 2008/12/30 12:35:00 lynx Exp $ vim:nosmarttab ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ This file contains TODO and CHANGES (at EOF) rolled into one. Essentially: whenever you fix something, move that line to the end of file. @@ -12,6 +12,7 @@ ________________________________________________________________________ - remote IRC place does not send names listing on /join - remote IRC /part shows no reaction at first attempt +++ not limited to IRC!! thx marenz +- /set multiplace should be ignored for rich accesses - XMPP: first reply to a stranger's remote psyc message did not show up in psi diff --git a/bin/edata b/bin/edata old mode 100644 new mode 100755 diff --git a/bin/psyked b/bin/psyked old mode 100644 new mode 100755 diff --git a/config/psyced.settings b/config/psyced.settings old mode 100644 new mode 100755 diff --git a/place/africa.c b/place/africa.c old mode 100644 new mode 100755 diff --git a/place/america.c b/place/america.c old mode 100644 new mode 100755 diff --git a/place/asia.c b/place/asia.c old mode 100644 new mode 100755 diff --git a/place/australia.c b/place/australia.c old mode 100644 new mode 100755 diff --git a/place/europa.c b/place/europa.c old mode 100644 new mode 100755 diff --git a/place/indigestion.c b/place/indigestion.c old mode 100644 new mode 100755 diff --git a/place/irc.c-fly b/place/irc.c-fly deleted file mode 100644 index 97d5ef2..0000000 --- a/place/irc.c-fly +++ /dev/null @@ -1,18 +0,0 @@ -#include -#define NAME "IRC" - -// gateway to ircnet -// -// just put this file into init.ls if you want it to -// activate at boot time. addressing irc:nickname -// should work also when this isn't loaded however. -// -#ifdef fly - -# define CONNECT_IRC "irc.freenet.de" // an ircnet server - -#else -# define CONNECT "beta.ve.symlynX.com" -#endif - -#include diff --git a/place/london.c b/place/london.c old mode 100644 new mode 100755 diff --git a/place/newyork.c b/place/newyork.c old mode 100644 new mode 100755 diff --git a/place/paris.c b/place/paris.c old mode 100644 new mode 100755 diff --git a/place/spiegel-en.c b/place/spiegel-en.c index bd56a14..aef97b8 100644 --- a/place/spiegel-en.c +++ b/place/spiegel-en.c @@ -1,4 +1,3 @@ -#if 0 #include #define SILENCE #define NAME "Spiegel-EN" @@ -11,6 +10,5 @@ #else # define CONNECT_DEFAULT #endif -#endif #include diff --git a/place/spiegel.c b/place/spiegel.c index 81a41ae..771e355 100644 --- a/place/spiegel.c +++ b/place/spiegel.c @@ -1,4 +1,3 @@ -#if 0 #include #define SILENCE #define NAME "Spiegel" @@ -9,6 +8,5 @@ #else # define CONNECT_DEFAULT #endif -#endif #include diff --git a/place/telex.c b/place/telex.c old mode 100644 new mode 100755 diff --git a/place/tokyo.c b/place/tokyo.c old mode 100644 new mode 100755 diff --git a/run/md5.pl b/run/md5.pl old mode 100644 new mode 100755 diff --git a/run/sha1.pl b/run/sha1.pl old mode 100644 new mode 100755 diff --git a/utility/multipatcher b/utility/multipatcher old mode 100644 new mode 100755 diff --git a/world/default/de/plain.textdb b/world/default/de/plain.textdb index dc699c6..8e16d4f 100644 --- a/world/default/de/plain.textdb +++ b/world/default/de/plain.textdb @@ -1720,7 +1720,7 @@ _warning_usage_notify |Syntax: /notify [ i(mmediate),d(elayed),D(elayedMore) ] _warning_usage_acquaintance -|Syntax: /ignore oder /show +|Syntax: /ignore oder /display _warning_usage_mandate |Syntax: /mand(ate) «Scherge» @@ -1747,6 +1747,18 @@ _warning_usage_my _warning_usage_unalias |Syntax: /unalias +_warning_usage_kill +|Syntax: /kill [] + +_warning_usage_warn +|Syntax: /warn [] + +_echo_kill +|[_entity] gekillt. + +_echo_warn +|[_entity] verwarnt. + _warning_usage_invite |Syntax: /invite diff --git a/world/local b/world/local deleted file mode 120000 index c820590..0000000 --- a/world/local +++ /dev/null @@ -1 +0,0 @@ -../local \ No newline at end of file diff --git a/world/log b/world/log deleted file mode 120000 index 033579f..0000000 --- a/world/log +++ /dev/null @@ -1 +0,0 @@ -../log \ No newline at end of file diff --git a/world/net/http/myVideo.swf.c b/world/net/http/myVideo.swf.c deleted file mode 100644 index f274c52..0000000 --- a/world/net/http/myVideo.swf.c +++ /dev/null @@ -1,11 +0,0 @@ -#include -#include -#include - -// phone call thing. we need to pass the query data to a flash film -// but we don't have any flash film yet. TODO -// -htget(prot, query, headers, qs) { - htredirect(prot, "/static/myVideo.swf", "stupid flash film", 0); - return 1; -} diff --git a/world/net/include/place.i b/world/net/include/place.i index 9c5d1e0..2671dcc 100644 --- a/world/net/include/place.i +++ b/world/net/include/place.i @@ -1,4 +1,4 @@ -// generated by '/home/lynx/bin/psyconf': place.i for place.gen +// generated by '/ve/dist/../bin/psyconf': place.i for place.gen #ifdef PLACE_HISTORY # define Oh "h" diff --git a/world/net/library/profiles.xul b/world/net/library/profiles.xul deleted file mode 100644 index 590c26f..0000000 --- a/world/net/library/profiles.xul +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/world/net/person.c b/world/net/person.c index edd0079..0dc3b4a 100644 --- a/world/net/person.c +++ b/world/net/person.c @@ -2648,22 +2648,28 @@ quit(immediate, variant) { } #ifndef _flag_disable_module_presence switch(v("scheme")) { - // psyc clients are supposed to always explicitely set - // a user's presence status. this is probably too blue-eyed - // and needs a /set'ting at least. maybe we should have a - // setting to skip over all of the following decisions - - // like a delayed unavailability automation. - case "psyc": // jabber/user:quit() is called on @type 'unavailable' // so it relies on quit() to announce offline status //case "jabber": + // break; # ifdef _flag_enable_manual_announce_telnet case "tn": + break; # endif # ifdef _flag_enable_manual_announce_IRC case "irc": -# endif break; +# endif + // psyc clients are supposed to explicitely set a user's presence + // status before exiting, if the user wishes so. only if they are + // not performing a clean exit, we will presume that an OFFLINE + // availability is appropriate. maybe a separate AVAILABILITY_LOST + // value would be nice. and we should have a delayed unavailability + // automation feature here to avoid frequent relogin announcements. + case "psyc": + if (variant != "_disconnect") break; + // fall thru in case of _disconnect + // which indicates, we died an irregular death default: # ifdef CACHE_PRESENCE //announce(AVAILABILITY_OFFLINE, 0, ask4upd8s == 0); diff --git a/world/net/place/_.c b/world/net/place/_.c deleted file mode 100644 index 4661df9..0000000 --- a/world/net/place/_.c +++ /dev/null @@ -1,5 +0,0 @@ -// model '_' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS - -#include "archetype.gen" diff --git a/world/net/place/_h.c b/world/net/place/_h.c deleted file mode 100644 index 8c4845c..0000000 --- a/world/net/place/_h.c +++ /dev/null @@ -1,6 +0,0 @@ -// model '_h' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY - -#include "archetype.gen" diff --git a/world/net/place/_he.c b/world/net/place/_he.c deleted file mode 100644 index e03cd85..0000000 --- a/world/net/place/_he.c +++ /dev/null @@ -1,7 +0,0 @@ -// model '_he' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT - -#include "archetype.gen" diff --git a/world/net/place/_hem.c b/world/net/place/_hem.c deleted file mode 100644 index e07df6c..0000000 --- a/world/net/place/_hem.c +++ /dev/null @@ -1,8 +0,0 @@ -// model '_hem' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT -#define PLACE_MASQUERADE - -#include "archetype.gen" diff --git a/world/net/place/_hemo.c b/world/net/place/_hemo.c deleted file mode 100644 index 18b558e..0000000 --- a/world/net/place/_hemo.c +++ /dev/null @@ -1,9 +0,0 @@ -// model '_hemo' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT -#define PLACE_MASQUERADE -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_heo.c b/world/net/place/_heo.c deleted file mode 100644 index 4d14c5a..0000000 --- a/world/net/place/_heo.c +++ /dev/null @@ -1,8 +0,0 @@ -// model '_heo' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_hes.c b/world/net/place/_hes.c deleted file mode 100644 index b99c4ca..0000000 --- a/world/net/place/_hes.c +++ /dev/null @@ -1,8 +0,0 @@ -// model '_hes' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT -#define PLACE_SCRATCHPAD - -#include "archetype.gen" diff --git a/world/net/place/_hesm.c b/world/net/place/_hesm.c deleted file mode 100644 index 5e7d104..0000000 --- a/world/net/place/_hesm.c +++ /dev/null @@ -1,9 +0,0 @@ -// model '_hesm' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT -#define PLACE_SCRATCHPAD -#define PLACE_MASQUERADE - -#include "archetype.gen" diff --git a/world/net/place/_hesmo.c b/world/net/place/_hesmo.c deleted file mode 100644 index 417a0c7..0000000 --- a/world/net/place/_hesmo.c +++ /dev/null @@ -1,10 +0,0 @@ -// model '_hesmo' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT -#define PLACE_SCRATCHPAD -#define PLACE_MASQUERADE -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_heso.c b/world/net/place/_heso.c deleted file mode 100644 index 53a7555..0000000 --- a/world/net/place/_heso.c +++ /dev/null @@ -1,9 +0,0 @@ -// model '_heso' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_HISTORY_EXPORT -#define PLACE_SCRATCHPAD -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_hm.c b/world/net/place/_hm.c deleted file mode 100644 index 4f8220c..0000000 --- a/world/net/place/_hm.c +++ /dev/null @@ -1,7 +0,0 @@ -// model '_hm' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_MASQUERADE - -#include "archetype.gen" diff --git a/world/net/place/_hmo.c b/world/net/place/_hmo.c deleted file mode 100644 index 7bb8d91..0000000 --- a/world/net/place/_hmo.c +++ /dev/null @@ -1,8 +0,0 @@ -// model '_hmo' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_MASQUERADE -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_ho.c b/world/net/place/_ho.c deleted file mode 100644 index 1220aca..0000000 --- a/world/net/place/_ho.c +++ /dev/null @@ -1,7 +0,0 @@ -// model '_ho' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_hs.c b/world/net/place/_hs.c deleted file mode 100644 index a8e1db0..0000000 --- a/world/net/place/_hs.c +++ /dev/null @@ -1,7 +0,0 @@ -// model '_hs' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_SCRATCHPAD - -#include "archetype.gen" diff --git a/world/net/place/_hsm.c b/world/net/place/_hsm.c deleted file mode 100644 index 05c5fc9..0000000 --- a/world/net/place/_hsm.c +++ /dev/null @@ -1,8 +0,0 @@ -// model '_hsm' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_SCRATCHPAD -#define PLACE_MASQUERADE - -#include "archetype.gen" diff --git a/world/net/place/_hsmo.c b/world/net/place/_hsmo.c deleted file mode 100644 index 09fce62..0000000 --- a/world/net/place/_hsmo.c +++ /dev/null @@ -1,9 +0,0 @@ -// model '_hsmo' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_SCRATCHPAD -#define PLACE_MASQUERADE -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_hso.c b/world/net/place/_hso.c deleted file mode 100644 index 745dc65..0000000 --- a/world/net/place/_hso.c +++ /dev/null @@ -1,8 +0,0 @@ -// model '_hso' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_HISTORY -#define PLACE_SCRATCHPAD -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_m.c b/world/net/place/_m.c deleted file mode 100644 index de53e43..0000000 --- a/world/net/place/_m.c +++ /dev/null @@ -1,6 +0,0 @@ -// model '_m' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_MASQUERADE - -#include "archetype.gen" diff --git a/world/net/place/_mo.c b/world/net/place/_mo.c deleted file mode 100644 index a69c95e..0000000 --- a/world/net/place/_mo.c +++ /dev/null @@ -1,7 +0,0 @@ -// model '_mo' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_MASQUERADE -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_o.c b/world/net/place/_o.c deleted file mode 100644 index 74c527c..0000000 --- a/world/net/place/_o.c +++ /dev/null @@ -1,6 +0,0 @@ -// model '_o' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_s.c b/world/net/place/_s.c deleted file mode 100644 index 8d49a22..0000000 --- a/world/net/place/_s.c +++ /dev/null @@ -1,6 +0,0 @@ -// model '_s' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_SCRATCHPAD - -#include "archetype.gen" diff --git a/world/net/place/_sm.c b/world/net/place/_sm.c deleted file mode 100644 index 374604d..0000000 --- a/world/net/place/_sm.c +++ /dev/null @@ -1,7 +0,0 @@ -// model '_sm' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_SCRATCHPAD -#define PLACE_MASQUERADE - -#include "archetype.gen" diff --git a/world/net/place/_smo.c b/world/net/place/_smo.c deleted file mode 100644 index 209e81c..0000000 --- a/world/net/place/_smo.c +++ /dev/null @@ -1,8 +0,0 @@ -// model '_smo' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_SCRATCHPAD -#define PLACE_MASQUERADE -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/_so.c b/world/net/place/_so.c deleted file mode 100644 index df53022..0000000 --- a/world/net/place/_so.c +++ /dev/null @@ -1,7 +0,0 @@ -// model '_so' generated by '/home/lynx/bin/psyconf' - -#define ESSENTIALS -#define PLACE_SCRATCHPAD -#define PLACE_OWNED - -#include "archetype.gen" diff --git a/world/net/place/archetype.pl b/world/net/place/archetype.pl old mode 100644 new mode 100755 diff --git a/world/net/psyc/parse.i b/world/net/psyc/parse.i index a9eebcc..4bdbfa2 100644 --- a/world/net/psyc/parse.i +++ b/world/net/psyc/parse.i @@ -1,5 +1,5 @@ // vim:foldmethod=marker:syntax=lpc:noexpandtab -// $Id: parse.i,v 1.357 2008/12/18 17:45:45 lynx Exp $ +// $Id: parse.i,v 1.358 2008/12/27 00:42:04 lynx Exp $ // #ifndef FORK @@ -1135,7 +1135,7 @@ vamixed startParse(string a) { "Could not instantiate PSYC parser. Weird."); QUIT } - if (isServer()) o->greet(); + // if (isServer()) o->greet(); o->feed("|\n"); return 1; } diff --git a/world/net/spyc/server.c b/world/net/spyc/server.c index 5c1fc0e..4627a08 100644 --- a/world/net/spyc/server.c +++ b/world/net/spyc/server.c @@ -1,5 +1,5 @@ // vim:foldmethod=marker:syntax=lpc:noexpandtab -// $Id: server.c,v 1.18 2008/12/18 18:16:14 lynx Exp $ +// $Id: server.c,v 1.19 2008/12/27 00:42:04 lynx Exp $ // // the thing that answers on port 4404 of psyced. @@ -61,6 +61,26 @@ disconnected(remaining) { return rc; } +// this only gets called from net/psyc.. FIXME +void greet() { + // should be doing sTextPath(); here ? + // should be sharing code with net/psyc and do a proper greeting + // three separate packets follow (thus three emits) + //emit(S_GLYPH_PACKET_DELIMITER "\n"); + emit("\ +:_source\t"+ query_server_unl() +"\n\ +:_target_peer\tpsyc://"+ peeraddr +"/\n\ +\n\ +_notice_circuit_established\n" S_GLYPH_PACKET_DELIMITER "\n"); + emit("\ +:_source\t"+ query_server_unl() +"\n\ +\n\ +_status_circuit\n" S_GLYPH_PACKET_DELIMITER "\n"); +#ifdef _flag_log_sockets_SPYC + log_file("RAW_SPYC", "» %O greeted.\n", ME); +#endif +} + static void resolved(mixed host, mixed tag) { PT(("resolved %O to %O\n", peerip, host)) string numericpeeraddr; @@ -152,33 +172,13 @@ static void resolved(mixed host, mixed tag) { } resume_parse(); sTextPath(); + greet(); // FIXME: determine response to greeting // instead of this dummy msg(0, "_notice_features", 0, tag ? ([ "_tag_reply" : tag ]) : 0); } -// this only gets called from net/psyc.. FIXME -void greet() { - // should be doing sTextPath(); here ? - // should be sharing code with net/psyc and do a proper greeting - // three separate packets follow (thus three emits) - emit(S_GLYPH_PACKET_DELIMITER "\n"); - emit("\ -:_source\t"+ query_server_unl() +"\n\ -:_target_peer\tpsyc://"+ peeraddr +"/\n\ -\n\ -_notice_circuit_established\n" S_GLYPH_PACKET_DELIMITER "\n"); - emit("\ -:_source\t"+ query_server_unl() +"\n\ -\n\ -_status_circuit\n"); // S_GLYPH_PACKET_DELIMITER "\n"); - // last pipe is generated by fippo's code -#ifdef _flag_log_sockets_SPYC - log_file("RAW_SPYC", "» %O greeted.\n", ME); -#endif -} - void circuit_msg(string mc, mapping vars, string data) { switch(mc) { case "_request_features": // only servers handle _request_features diff --git a/world/net/usercmd.i b/world/net/usercmd.i index cca1214..3e98f63 100644 --- a/world/net/usercmd.i +++ b/world/net/usercmd.i @@ -1,5 +1,5 @@ // vim:noexpandtab:syntax=lpc -// $Id: usercmd.i,v 1.698 2008/11/27 13:22:27 lynx Exp $ +// $Id: usercmd.i,v 1.699 2008/12/27 00:42:04 lynx Exp $ // // usercmd is normally just a part of the user object focused on implementing // the user command set. it can also be used for implementing a subset of @@ -1367,17 +1367,21 @@ cmd(a, args, dest, command) { case "warn": case "kill": if (sizeof(args) > 1) ob = find_person(args[1]); - t = sizeof(args) > 2 ? ARGS(2) : 0; - - printf("%s %O %O: %s\n\n", a, ob, t, - ob ? "executed" : "no such person"); + else { + w("_warning_usage_"+a, + "Usage: /"+a+" []"); + return 1; + } if (ob) { + t = sizeof(args) > 2 ? ARGS(2) : 0; // log first, after kill ob will be 0 log_file("BEHAVIOUR", "[%s] %O %ss %O: %O\n", ctime(), ME, a, ob, t); - // call_other(ob, a, t); + w("_echo_"+a, "[_entity] "+a+"ed.", ([ + "_entity": ob ])); ob -> sanction(a, t); - } + } else w("_error_unknown_name_user", 0, ([ + "_nick_target": args[1] ])); return 1; case "config": if (sizeof(args) < 3) return @@ -2295,13 +2299,19 @@ protected friend(rm, entity, ni, trustee) { // the entity is an xmpp or icq or whatever uniform if (stringp(entity)) deregister_context(ME, entity); - if (friends[entity]) { - // TODO: gender support - sendmsg(entity, "_notice_friendship_removed", - "[_nick] deletes [_possessive] friendship with you.", - ([ "_nick": MYNICK, "_possessive": "the" ]) ); - m_delete(friends, entity); - } + // this does not consider the case when we just + // offered a friendship to a person. XMPP behaviour + // is to let the other side know about our "mistake". + // if noone has hard feelings about this, we should + // choose to behave compatibly, which in this case + // simply means to remove this if check. + //if (friends[entity]) { + sendmsg(entity, "_notice_friendship_removed", + "[_nick] deletes [_possessive] friendship with you.", + // TODO: gender support + ([ "_nick": MYNICK, "_possessive": "the" ]) ); + m_delete(friends, entity); + //} return 1; } w("_error_unknown_friendship", diff --git a/world/net/xml/parse.c b/world/net/xml/parse.c index 358d86b..51c751a 100644 --- a/world/net/xml/parse.c +++ b/world/net/xml/parse.c @@ -257,7 +257,7 @@ xmlparse(a) { # ifdef JABBER_TRANSPARENCY ixbuf = lasta = 0; innerxml = ixbuf; -#endif +# endif // handle stuff funcall(nodeHandler, currentnode); currentnode = 0; diff --git a/world/net/xml/parse.c-retro b/world/net/xml/parse.c-retro deleted file mode 100644 index 6ef3e59..0000000 --- a/world/net/xml/parse.c-retro +++ /dev/null @@ -1,65 +0,0 @@ -// $Id: parse.c,v 1.10 2005/03/14 10:23:28 lynx Exp $ // vim:syntax=lpc -// -// the actual RSS parser -// why the file is called "parse.c" i don't know -// it certainly wouldn't be a good idea to have several parsers in one file -// so you may as well rename it into rss.c? TODO -// -#include -inherit NET_PATH "xml/common"; - -xmlparse(str) { - // DOM-style XML parser for parsing RSS and RDF - // see CHANGESTODO for discussion on how to make it compliant - mapping dom; - string namespace; - string tag, lasttag, data, params; - int pos, close; - - pos = 0; - close = -1; - namespace = ""; - dom = ([ ]); - while(pos = strstr(str, "<", pos) + 1){ - // D2(D("looping xmlparser...\n");) - data = xmlunquote(str[close + 1..pos - 2]); - close = strstr(str, ">", pos); - sscanf(str[pos..close - 1], "%s%t%s", tag, params) || tag = str[pos..close - 1]; - if (strlen(tag) && (tag[0] == '!' || tag[0] == '?' || tag[0..2] == "rdf" || tag[0..2] == "rss")) { - if(tag[0..2] == "rdf" || tag[0..2] == "rss") - dom["type"] = tag[0..2]; - } else if (strlen(tag) && tag[0] == '/') { - // D2(D("closing " + tag + "\n");) - // closing tag - if (tag[1..] != lasttag){ - // D2(D("warning: XML may be malformed\n");) - ; - } else { - // handle data - if (data != "\n") { - if (stringp(dom[namespace]) ) - dom[namespace] = ({ dom[namespace], data }); - else if (pointerp(dom[namespace])) - dom[namespace] += ({ data }); - else - dom[namespace] = data; - } - namespace = namespace[.. - -#include "xml.h" - -string xmlquote(string s) { - // return xml escaped version of s - s = replace(s, "&", "&"); - s = replace(s, "<", "<"); - s = replace(s, ">", ">"); - s = replace(s, "\"", """); - s = replace(s, "'", "'"); - return s; -} - -string xmlunquote(string s) { - // return unquoted xml version of s - s = replace(s, "&", "&"); - s = replace(s, "<", "<"); - s = replace(s, ">", ">"); - s = replace(s, """, "\""); - s = replace(s, "'", "'"); - // should this take care of ß-style thingies - // s = regreplace(s, "ß", 223); - s = regreplace(s, "&#[0-9][0-9][0-9];", - (: return sprintf("%c", to_int($1[2..<2])); :), 1); - return s; -} diff --git a/world/net/xml/t/parse.c b/world/net/xml/t/parse.c deleted file mode 100644 index 971aadd..0000000 --- a/world/net/xml/t/parse.c +++ /dev/null @@ -1,65 +0,0 @@ -// $Id: parse.c,v 1.10 2005/03/14 10:23:28 lynx Exp $ // vim:syntax=lpc -// -// the actual RSS parser -// why the file is called "parse.c" i don't know -// it certainly wouldn't be a good idea to have several parsers in one file -// so you may as well rename it into rss.c? TODO -// -#include -inherit NET_PATH "xml/common"; - -rssparse(str) { - // DOM-style XML parser for parsing RSS and RDF - // see CHANGESTODO for discussion on how to make it compliant - mapping dom; - string namespace; - string tag, lasttag, data, params; - int pos, close; - - pos = 0; - close = -1; - namespace = ""; - dom = ([ ]); - while(pos = strstr(str, "<", pos) + 1){ - // D2(D("looping xmlparser...\n");) - data = xmlunquote(str[close + 1..pos - 2]); - close = strstr(str, ">", pos); - sscanf(str[pos..close - 1], "%s%t%s", tag, params) || tag = str[pos..close - 1]; - if (strlen(tag) && (tag[0] == '!' || tag[0] == '?' || tag[0..2] == "rdf" || tag[0..2] == "rss")) { - if(tag[0..2] == "rdf" || tag[0..2] == "rss") - dom["type"] = tag[0..2]; - } else if (strlen(tag) && tag[0] == '/') { - // D2(D("closing " + tag + "\n");) - // closing tag - if (tag[1..] != lasttag){ - // D2(D("warning: XML may be malformed\n");) - ; - } else { - // handle data - if (data != "\n") { - if (stringp(dom[namespace]) ) - dom[namespace] = ({ dom[namespace], data }); - else if (pointerp(dom[namespace])) - dom[namespace] += ({ data }); - else - dom[namespace] = data; - } - namespace = namespace[.. - -#include "xml.h" - -string xmlquote(string s) { - // return xml escaped version of s - s = replace(s, "&", "&"); - s = replace(s, "<", "<"); - s = replace(s, ">", ">"); - s = replace(s, "\"", """); - s = replace(s, "'", "'"); - return s; -} - -string xmlunquote(string s) { - // return unquoted xml version of s - s = replace(s, "&", "&"); - s = replace(s, "<", "<"); - s = replace(s, ">", ">"); - s = replace(s, """, "\""); - s = replace(s, "'", "'"); - // should this take care of ß-style thingies - // s = regreplace(s, "ß", 223); - s = regreplace(s, "&#[0-9][0-9][0-9];", - (: return sprintf("%c", to_int($1[2..<2])); :), 1); - return s; -} diff --git a/world/net/xml/t/t/parse.c b/world/net/xml/t/t/parse.c deleted file mode 100644 index 1a73f7e..0000000 --- a/world/net/xml/t/t/parse.c +++ /dev/null @@ -1,110 +0,0 @@ -// $Id: parse.c,v 1.12 2005/06/07 07:03:02 fippo Exp $ // vim:syntax=lpc -// -// the actual RSS parser -// why the file is called "parse.c" i don't know -// it certainly wouldn't be a good idea to have several parsers in one file -// so you may as well rename it into rss.c? TODO -// -#include -#include -inherit NET_PATH "xml/common"; - -// DOM style XML parser -xmlparse(a) { - // this one is very similar to the jabber parser - // from a syntax point of view - string tag, data, params; - int pos, close; - int list; - - XMLNode currentnode = 0; - XMLNode nodestack = ({ }); - params = ""; - pos = 0; - close = -1; - - while(pos = strstr(a, "<", pos) + 1) { - data = xmlunquote(a[close + 1..pos - 2]); - close = strstr(a, ">", pos); - - sscanf(a[pos..close - 1], "%s%t%s", tag, params) || tag = a[pos..close-1]; - if(tag == "") return -1; - if (strlen(tag) && (tag[0] == '!' || tag[0] == '?')){ - // P2(("skipping tag starting with ! or ?\n")) - } else if (strlen(tag) && tag[0] == '/'){ - P4(("should be closing tag %O and am closing %O\n", - currentnode[Tag], tag[1..])) - if (!currentnode || currentnode[Tag] != tag[1..]) { - // unbalanced xml? - } else { - // schliessender tag gefunden, die haben keine Parameter - if (strlen(data) && data != "\r\n" && data != "\n"){ - // not sure if this works correct - unless(pointerp(currentnode[Cdata])) - currentnode[Cdata] = data; - else - currentnode[Cdata] += ({ data }); - } - if (sizeof(nodestack) == 0) { - // we can probably break/return here - break; - } else { - currentnode = nodestack[<1]; - nodestack = nodestack[..<2]; - } - } - } else { // opening tag - int selfclosing; - mixed newnode; - string key, val; - - if (strlen(params) && params[<1] == '/') { - params = params[..<2]; - selfclosing = 1; - newnode = new_XMLNode; - } else if (tag[<1] == '/') { - tag = tag[..<2]; - selfclosing = 1; - newnode = new_XMLNode; - } else { - newnode = new_XMLNode; - } - if(currentnode){ - nodestack += ({ currentnode }); - if (pointerp(currentnode[Child][tag])) { - unless (nodelistp(currentnode[Child][tag])) { - // tranform - currentnode[Child][tag] = ({ currentnode[Child][tag], newnode }); - } else { - // append - currentnode[Child][tag] += ({ newnode }); - } - currentnode = currentnode[Child][tag][<1]; - } else { - currentnode[Child][tag] = newnode; - currentnode = currentnode[Child][tag]; - } - } else { - currentnode = newnode; - } - currentnode[Tag] = tag; - foreach(string pa: explode(params, " ")) { - if(sscanf(pa, "%s=\"%s\"", key, val) == 2 || - sscanf(pa, "%s=\'%s\'", key, val) == 2 ) { - currentnode[Param][key] = val; - - } - } - if (selfclosing) { - if (sizeof(nodestack) == 0){ - PT(("nodestack empty\n")) - } else { - currentnode = nodestack[<1]; - nodestack = nodestack[..<2]; - } - } - } - } - return currentnode; -} - diff --git a/world/net/xml/t/tmp b/world/net/xml/t/tmp deleted file mode 100644 index 1a73f7e..0000000 --- a/world/net/xml/t/tmp +++ /dev/null @@ -1,110 +0,0 @@ -// $Id: parse.c,v 1.12 2005/06/07 07:03:02 fippo Exp $ // vim:syntax=lpc -// -// the actual RSS parser -// why the file is called "parse.c" i don't know -// it certainly wouldn't be a good idea to have several parsers in one file -// so you may as well rename it into rss.c? TODO -// -#include -#include -inherit NET_PATH "xml/common"; - -// DOM style XML parser -xmlparse(a) { - // this one is very similar to the jabber parser - // from a syntax point of view - string tag, data, params; - int pos, close; - int list; - - XMLNode currentnode = 0; - XMLNode nodestack = ({ }); - params = ""; - pos = 0; - close = -1; - - while(pos = strstr(a, "<", pos) + 1) { - data = xmlunquote(a[close + 1..pos - 2]); - close = strstr(a, ">", pos); - - sscanf(a[pos..close - 1], "%s%t%s", tag, params) || tag = a[pos..close-1]; - if(tag == "") return -1; - if (strlen(tag) && (tag[0] == '!' || tag[0] == '?')){ - // P2(("skipping tag starting with ! or ?\n")) - } else if (strlen(tag) && tag[0] == '/'){ - P4(("should be closing tag %O and am closing %O\n", - currentnode[Tag], tag[1..])) - if (!currentnode || currentnode[Tag] != tag[1..]) { - // unbalanced xml? - } else { - // schliessender tag gefunden, die haben keine Parameter - if (strlen(data) && data != "\r\n" && data != "\n"){ - // not sure if this works correct - unless(pointerp(currentnode[Cdata])) - currentnode[Cdata] = data; - else - currentnode[Cdata] += ({ data }); - } - if (sizeof(nodestack) == 0) { - // we can probably break/return here - break; - } else { - currentnode = nodestack[<1]; - nodestack = nodestack[..<2]; - } - } - } else { // opening tag - int selfclosing; - mixed newnode; - string key, val; - - if (strlen(params) && params[<1] == '/') { - params = params[..<2]; - selfclosing = 1; - newnode = new_XMLNode; - } else if (tag[<1] == '/') { - tag = tag[..<2]; - selfclosing = 1; - newnode = new_XMLNode; - } else { - newnode = new_XMLNode; - } - if(currentnode){ - nodestack += ({ currentnode }); - if (pointerp(currentnode[Child][tag])) { - unless (nodelistp(currentnode[Child][tag])) { - // tranform - currentnode[Child][tag] = ({ currentnode[Child][tag], newnode }); - } else { - // append - currentnode[Child][tag] += ({ newnode }); - } - currentnode = currentnode[Child][tag][<1]; - } else { - currentnode[Child][tag] = newnode; - currentnode = currentnode[Child][tag]; - } - } else { - currentnode = newnode; - } - currentnode[Tag] = tag; - foreach(string pa: explode(params, " ")) { - if(sscanf(pa, "%s=\"%s\"", key, val) == 2 || - sscanf(pa, "%s=\'%s\'", key, val) == 2 ) { - currentnode[Param][key] = val; - - } - } - if (selfclosing) { - if (sizeof(nodestack) == 0){ - PT(("nodestack empty\n")) - } else { - currentnode = nodestack[<1]; - nodestack = nodestack[..<2]; - } - } - } - } - return currentnode; -} -