diff -c -r --new-file ds2.0r18/INSTALL ds2.0r20b/INSTALL *** ds2.0r18/INSTALL Sun Dec 18 13:13:31 2005 --- ds2.0r20b/INSTALL Wed Apr 5 19:59:01 2006 *************** *** 1,3 **** --- 1,7 ---- + YOU MUST READ THIS URL: http://dead-souls.sourceforge.net/ds-inst-faq.html + + + Then perform the following steps: 1) cd to the directory where all mud files reside. Called $MUDHOME in the rest of this document. *************** *** 37,44 **** 11) You'll get booted out. Reboot the MUD, telnet back in, and you're now running Your Very Own MUD. ! 12) If this doesn't work, please refer to the mudos.org documentation at their website. This procedure works perfectly on SuSE 9.3, SuSE 10, Solaris 8 and Solaris 10, but we can't possibly vouch for every unix flavor and compiler suite out there. If the compile fails, try the local_options file in extra/ ! 13) If there is something actually wrong with this documentation, please visit Frontiers MUD and mudmail Cratylus. Details on this are in the /doc/SUPPORT file. --- 41,51 ---- 11) You'll get booted out. Reboot the MUD, telnet back in, and you're now running Your Very Own MUD. ! 12) If you have problems, review the FAQ: http://dead-souls.sourceforge.net/ds-inst-faq.html ! 13) If this doesn't help, please refer to the mudos.org documentation at their website. This procedure works perfectly on SuSE 9.3, SuSE 10, Solaris 8 and Solaris 10, but we can't possibly vouch for every unix flavor and compiler suite out there. If the compile fails, try the local_options file in extra/ ! ! 14) If there is something actually wrong with this documentation, please visit Frontiers MUD and mudmail Cratylus. Details on this are in the /doc/SUPPORT file. + diff -c -r --new-file ds2.0r18/RELEASE_NOTES ds2.0r20b/RELEASE_NOTES *** ds2.0r18/RELEASE_NOTES Tue Mar 28 23:23:40 2006 --- ds2.0r20b/RELEASE_NOTES Fri Apr 14 18:27:24 2006 *************** *** 1,5 **** ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 25 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. --- 1,88 ---- + ---- 2.0r20 --- + - (hopefully) Fixed rare and peculiar bug that hosed + up logins unpredictably. + - Added the Jonez/Brodbane stargate system. + - Container bug fixed. It is now possible to put + amounts of money into containers and onto surfaces. + - Daemonized snoop system. This permits the logging + of snoop data, unmanned snoop logs, and snooping + multiple players at once. Still slightly buggy, so + please report any problems with it. + - The encre and decre of non-logged-on users now + behaves properly. + - Furnaces now destroy objects almost immediately. + - Fixed voting system. + - LIB_GUILD changed to LIB_CLAN. It works, but is + not actually useful. Proper clan functionality + is planned post-2.1. + - Heal command now fixes individual limbs as well. + - Added ENABLE_ENCUMBRANCE define to config.h to + toggle the encumbrance combat modifier. + - Modified combat so it's difficult to fight while + carrying stuff. Anything worn or wielded doesn't + affect combat capability. NPC's are unaffected by this. + - Fixed horrendous carry-capacity leak in all containers. + - Added "every" token to reload verb, enabling the + reload of all loaded objects that inherit the specified + library object, eg "reload every npc". + - Fixed bugs in invisibility. + - Enabled QCS to work in /domains directories for + creators set as domain admins with the + domainadmin command. + - Fixed error in RACES_D that dramatically distorted stats. + - Added sefun: domain_admin. + - Fixed mudlist cache problem. + - Added command: switchrouter, domainadmin. + - Added set_heart_beat to QCS. + - Fixed bugs in commands: banish, anglicize. + - Integrated most packet data with network room. + - Added router room for I3 router debugging. + - Integrated most I3 packets with router room. + + ---- 2.0r19 --- + - Fixed menu item bug in LIB_BARKEEP. + - Fixed Ylsrim pub. + - Added keepalive pinger tool to wiz chest. + - Added commands: anglicize, debug, expel, resetpasswd. + - Fixed first boot problem with /secure/daemon/letters.c. + - Driver: set heart_beat to approximately one per second. + - Driver: added locale workaround to startmud script. + - Added Brodbane's New and Improved cp command. + - Added Brodbane's sefuns: wild_card, remove_dots. + - Elision bug in pager.c fixed by Brodbane. + - Added network troubleshooting room. + - Fixed bug in invisibility. + - Made tricorder and remote control emit warnings, logs, + and errors when used by a non-creator who does not have a + visitor pass. + - Added colon emote behavior to channels, eg, "ds :smile" works + the same as "dsemote smile". + - Tim's I3 router integrated into the lib. Fixes forthcoming. + - Object Properties map variable now persists as well. + - Added Brodbane's dsversion command. + - Fixed bug in LIB_SENTIENT eventReceiveEmote. + - Added Shadyman's fix to the imc2 daemon. + - Added language teacher and schoolhouse to /domains/town. + - Added LIB_TEACHER. + - Tweaked interactive.c to omit null obvious exits. + - Fixed "list" conflict with restricted channels and shops. + - Added SetNativeLanguage to QCS. + - Added PINGING_MUDS, ENGLISH_ONLY and HUMANS_ONLY defines to config.h. + - Added commands: anglicize, debug, expel. + - Added SetNativeLanguage() to LIB_LANGUAGE. + - Added GetEquippedLimbs() to LIB_BODY. + - Visitor's pass now suppresses autosave messages. + - Full cardinal direction aliases added to players (eg "north"). + - Added direction aliases to 'peer' command. + - Player Properties map variable now persists across quits and boots. + This may or may not be a good thing, and could change in + future releases. + - Added sefuns debug(), tell_creators(); + - Fixed socket_address(). + - Added AUTOEXEC_D. + ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 23 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. diff -c -r --new-file ds2.0r18/bin/startmud ds2.0r20b/bin/startmud *** ds2.0r18/bin/startmud Sat Nov 19 21:08:28 2005 --- ds2.0r20b/bin/startmud Wed Apr 5 19:55:38 2006 *************** *** 1,5 **** --- 1,14 ---- #!/bin/bash + # It has been reported that non-US users have problems + # with some .o files because their systems default to + # commas for decimal notation and not periods. The + # following language exports are fo the benefit of + # people who run into this problem. + export LANG=en_US + export LANGUAGE=en_US + export LC_ALL=en_US + export MUDHOME="" count=1 diff -c -r --new-file ds2.0r18/lib/cfg/timezone.cfg ds2.0r20b/lib/cfg/timezone.cfg *** ds2.0r18/lib/cfg/timezone.cfg Sun Nov 6 01:06:32 2005 --- ds2.0r20b/lib/cfg/timezone.cfg Fri Apr 14 18:27:17 2006 *************** *** 1 **** ! EST \ No newline at end of file --- 1 ---- ! edt \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/cmds/admins/gate.c ds2.0r20b/lib/cmds/admins/gate.c *** ds2.0r18/lib/cmds/admins/gate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/admins/gate.c Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,52 ---- + /** + * modification of code contributed by daelas + * started 2006-04-04 + */ + #include + #include + #include + + // inherit LIB_DAEMON; + inherit LIB_STARGATE; + + mixed cmd(string str) + { + mapping network; + + if (!archp(previous_object())) return 0; + + network = STARGATE_D->getStargates(); + if (str) + { + if (network[lower_case(str)]) + { + write(str+" is part of the Stargate Network.\n"); + } + else + { + write(str+" is not currently part of the Stargate Network.\n"); + } + + } + else + { + write("These are the current Stargate locations in the Network:\n"); + if (!sizeof(network)) + { + message("info", "No locations found.", this_player()); + } + else + { + string buf = ""; + string name; + class stargate info; + + foreach (name, info in network) + { + buf += sprintf("%:-15s %:-10s %s\n", name, info->status, info->destination); + } + write(buf); + } + } + return 1; + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/anglicize.c ds2.0r20b/lib/cmds/creators/anglicize.c *** ds2.0r18/lib/cmds/creators/anglicize.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/creators/anglicize.c Sun Apr 9 23:49:20 2006 *************** *** 0 **** --- 1,41 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + object target; + + if(!str || str == "") str = "me"; + + if(str == "me") str = this_player()->GetKeyName(); + if(!target = present(str, environment(this_player()))){ + write("They're not here."); + return 1; + } + if(!living(target)) { + write("That's not a living thing."); + return 1; + } + if(creatorp(target) && !archp(this_player()) && + target != this_player()){ + write("That's impolite."); + tell_player(target,capitalize(this_player()->GetKeyName())+ + " just tried to anglicize you."); + return 1; + } + + target->SetNativeLanguage("English"); + if(target == this_player()) str = "yourself"; + else str = capitalize(str); + write("You anglicize "+str+"."); + if(target != this_player()) + tell_object(target, capitalize(this_player()->GetKeyName())+" anglicizes you."); + return 1; + } + + void help() { + message("help", "Syntax: anglicize \n\n" + "Make the target's native language English.\n\n", + this_player()); + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/colors.c ds2.0r20b/lib/cmds/creators/colors.c *** ds2.0r18/lib/cmds/creators/colors.c Wed Dec 7 14:12:58 2005 --- ds2.0r20b/lib/cmds/creators/colors.c Thu Apr 13 21:03:19 2006 *************** *** 3,9 **** inherit LIB_DAEMON; ! void cmd() { write( "%^RED%^RED\n" --- 3,9 ---- inherit LIB_DAEMON; ! int cmd() { write( "%^RED%^RED\n" *************** *** 25,35 **** "%^B_WHITE%^B_WHITE%^RESET%^\n" "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n" ); ! } string GetHelp() { ! return ("Syntax: colors\n\n" ! "Lists all available colors in the corresponding color.\n\n"); } --- 25,36 ---- "%^B_WHITE%^B_WHITE%^RESET%^\n" "%^B_MAGENTA%^B_MAGENTA%^RESET%^\n" ); ! return 1; } string GetHelp() { ! return("Syntax: colors\n\n" ! "Lists all available colors in the corresponding color." ! "\n\n"); } diff -c -r --new-file ds2.0r18/lib/cmds/creators/debug.c ds2.0r20b/lib/cmds/creators/debug.c *** ds2.0r18/lib/cmds/creators/debug.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/creators/debug.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,25 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string str) { + int status = this_player()->GetProperty("debug"); + if(!str && !status) str = "on"; + else if(!str && status) str = "off"; + if(str != "on" && str != "off") return 0; + if(str == "on"){ + write("You enable debugging."); + this_player()->SetProperty("debug", 1); + return 1; + } + write("You disable debugging."); + this_player()->SetProperty("debug", 0); + return 1; + } + + void help() { + message("help", "Syntax: debug [on | off]\n\n" + "Allows you to receive debugging information\n\n", + this_player()); + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/expel.c ds2.0r20b/lib/cmds/creators/expel.c *** ds2.0r18/lib/cmds/creators/expel.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/cmds/creators/expel.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,53 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + object ob, *obs; + + if( !args || args == "" ) return "Expel whom?"; + ob = present(args,environment(this_player())); + if(args != "all" && (!ob || !living(ob))){ + + return "Expel only works for living things in your environment."; + } + if(archp(ob) && !archp(this_player())){ + write("You can't expel an admin."); + tell_player(ob, this_player()->GetName()+" just tried to expel you."); + return 1; + } + + if(args == "all"){ + if(archp(this_player())) { + obs = filter(get_livings(environment(this_player())), (: $1 != this_player() :) ); + } + else { + obs = filter(get_livings(environment(this_player())), + (: $1 != this_player() && !archp($1) :) ); + } + } + + else obs = ({ ob }); + + foreach(object nuisance in obs){ + nuisance->eventWimpy(1); + } + + foreach(object nuisance in obs){ + if(environment(nuisance) == environment(this_player())){ + if(creatorp(nuisance)) { + nuisance->eventMoveLiving(homedir(nuisance)+"/workroom"); + } + else nuisance->eventMoveLiving(ROOM_START); + } + } + + return 1; + } + + void help() { + message("help", "Syntax: expel \n\n" + "Forces the specified living thing to leave your environment.\n\n" + "See also: return, goto, move, trans", this_player()); + } diff -c -r --new-file ds2.0r18/lib/cmds/creators/goto.c ds2.0r20b/lib/cmds/creators/goto.c *** ds2.0r18/lib/cmds/creators/goto.c Mon Jan 23 09:03:35 2006 --- ds2.0r20b/lib/cmds/creators/goto.c Wed Apr 5 19:33:16 2006 *************** *** 43,49 **** "Syntax: \n\n" "This command will move you to where the living thing is if it can " "be found, otherwise it will search for the file named and try to " ! "move you into that file.\n\nSee also: home, move, trans.", this_player() ); } --- 43,49 ---- "Syntax: \n\n" "This command will move you to where the living thing is if it can " "be found, otherwise it will search for the file named and try to " ! "move you into that file.\n\nSee also: home, move, trans, expel.", this_player() ); } diff -c -r --new-file ds2.0r18/lib/cmds/creators/move.c ds2.0r20b/lib/cmds/creators/move.c *** ds2.0r18/lib/cmds/creators/move.c Mon Nov 7 13:28:38 2005 --- ds2.0r20b/lib/cmds/creators/move.c Wed Apr 5 19:33:16 2006 *************** *** 51,55 **** return ("Syntax: \n\n" "Allows you to move the object you name into the container " "you name.\n\n" ! "See also: trans"); } --- 51,55 ---- return ("Syntax: \n\n" "Allows you to move the object you name into the container " "you name.\n\n" ! "See also: trans, expel, goto, return"); } diff -c -r --new-file ds2.0r18/lib/cmds/creators/trans.c ds2.0r20b/lib/cmds/creators/trans.c *** ds2.0r18/lib/cmds/creators/trans.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/cmds/creators/trans.c Wed Apr 5 19:33:16 2006 *************** *** 34,38 **** void help() { message("help", "Syntax: \n\n" "Brings a living thing to your location.\n\n" ! "See also: return, goto, move", this_player()); } --- 34,38 ---- void help() { message("help", "Syntax: \n\n" "Brings a living thing to your location.\n\n" ! "See also: return, goto, move, expel", this_player()); } diff -c -r --new-file ds2.0r18/lib/cmds/players/date.c ds2.0r20b/lib/cmds/players/date.c *** ds2.0r18/lib/cmds/players/date.c Mon Jan 16 23:01:17 2006 --- ds2.0r20b/lib/cmds/players/date.c Wed Apr 5 19:33:16 2006 *************** *** 8,17 **** #include #include ! mixed cmd(string unused) { string *parts, year, time; int offset, x, hour, min, sec; offset = (int)TIME_D->GetOffset(local_time()[9]); offset += EXTRA_TIME_OFFSET; if(query_os_type() != "windows" ) --- 8,22 ---- #include #include ! mixed cmd(string timezone) { string *parts, year, time; int offset, x, hour, min, sec; + if(timezone && timezone != "" && valid_timezone(timezone)){ + write(local_time(timezone)); + return 1; + } + offset = (int)TIME_D->GetOffset(local_time()[9]); offset += EXTRA_TIME_OFFSET; if(query_os_type() != "windows" ) diff -c -r --new-file ds2.0r18/lib/cmds/players/inventory.c ds2.0r20b/lib/cmds/players/inventory.c *** ds2.0r18/lib/cmds/players/inventory.c Mon Nov 7 13:28:39 2005 --- ds2.0r20b/lib/cmds/players/inventory.c Sun Apr 9 23:49:20 2006 *************** *** 38,46 **** i = sizeof(shorts = keys(borg)); while(i--) ret += capitalize(consolidate(borg[shorts[i]], shorts[i]))+"\n"; message("look", ret, this_player()); ! message("other_action", (string)this_player()->GetName() + " checks " + ! possessive(this_player()) + " possessions.", ! environment(this_player()), ({ this_player() })); } void help() { --- 38,47 ---- i = sizeof(shorts = keys(borg)); while(i--) ret += capitalize(consolidate(borg[shorts[i]], shorts[i]))+"\n"; message("look", ret, this_player()); ! if(!this_player()->GetInvis()) ! message("other_action", (string)this_player()->GetName() + " checks " + ! possessive(this_player()) + " possessions.", ! environment(this_player()), ({ this_player() })); } void help() { diff -c -r --new-file ds2.0r18/lib/cmds/players/language.c ds2.0r20b/lib/cmds/players/language.c *** ds2.0r18/lib/cmds/players/language.c Sat Mar 11 11:13:28 2006 --- ds2.0r20b/lib/cmds/players/language.c Wed Apr 5 19:33:16 2006 *************** *** 12,18 **** write("You speak:"); foreach(string key, int val in FluencyMap){ ! write(key+" with "+val+"% proficiency."); } return 1; --- 12,18 ---- write("You speak:"); foreach(string key, int val in FluencyMap){ ! write(capitalize(key)+" with "+val+"% proficiency."); } return 1; diff -c -r --new-file ds2.0r18/lib/daemon/banish.c ds2.0r20b/lib/daemon/banish.c *** ds2.0r18/lib/daemon/banish.c Mon Jan 16 23:01:42 2006 --- ds2.0r20b/lib/daemon/banish.c Wed Apr 12 23:47:49 2006 *************** *** 5,10 **** --- 5,11 ---- */ #include + #include #include #include #include *************** *** 67,73 **** } static private int valid_access(object ob) { ! return (int)master()->valid_apply( ({ "LAW", "SUPERUSER" }) ); } int valid_cap_name(string cap, string nom) { --- 68,74 ---- } static private int valid_access(object ob) { ! return (int)master()->valid_apply( ({ "ASSIST" }) ); } int valid_cap_name(string cap, string nom) { diff -c -r --new-file ds2.0r18/lib/daemon/include/stargate.h ds2.0r20b/lib/daemon/include/stargate.h *** ds2.0r18/lib/daemon/include/stargate.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/daemon/include/stargate.h Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,19 ---- + #include "/include/stargate.h" + + #ifndef daemon_stargate_h + #define daemon_stargate_h + + void load(); + void save(); + int setStargate(string address, string destination); + class stargate getStargate(string address); + int delStargate(string address); + mapping getStargates(); + int setStatus(string address, string status); + string getStatus(string address); + string getDestination(string address); + string getEndpoint(string address); + int connect(string from, string to); + int disconnect(string from); + + #endif diff -c -r --new-file ds2.0r18/lib/daemon/intermud.c ds2.0r20b/lib/daemon/intermud.c *** ds2.0r18/lib/daemon/intermud.c Tue Mar 28 23:54:03 2006 --- ds2.0r20b/lib/daemon/intermud.c Wed Apr 12 23:47:49 2006 *************** *** 31,39 **** Password = 0; Tries = 0; Banned = ([]); - // There is only one known I3 router as of - // Feb 2006: us-1.i3.intermud.org - //Nameservers = ({ ({ "*gjs", "198.144.203.194 9000" }) }); Nameservers = ({ ({ "*yatmim", "149.152.218.102 23" }) }); MudList = new(class list); ChannelList = new(class list); --- 31,36 ---- *************** *** 44,49 **** --- 41,47 ---- if( file_size( SAVE_INTERMUD __SAVE_EXTENSION__ ) > 0 ) unguarded( (: restore_object, SAVE_INTERMUD, 1 :) ); SetNoClean(1); + tn("INTERMUD_D reloaded."); SetDestructOnClose(1); SetSocketType(MUD); if(DISABLE_INTERMUD == 1){ *************** *** 66,71 **** --- 64,76 ---- mudlib() + " " + mudlib_version(), version(), "LPMud", MUD_STATUS, ADMIN_EMAIL, (mapping)SERVICES_D->GetServices(), ([]) }) ); + tn("INTERMUD_D setup: "+identify( ({ + "startup-req-3", 5, mud_name(), 0, Nameservers[0][0], 0, + Password, MudList->ID, ChannelList->ID, query_host_port(), + PORT_OOB, PORT_UDP, mudlib() + " " + mudlib_version(), + mudlib() + " " + mudlib_version(), version(), "LPMud", + MUD_STATUS, ADMIN_EMAIL, + (mapping)SERVICES_D->GetServices(), ([]) }) ), "red");; } static void eventRead(mixed *packet) { *************** *** 86,93 **** //default : tc("Packet: "+identify(packet)); case "startup-reply": log_file("intermud",identify(packet)); ! if( sizeof(packet) != 8 ) return; /* should send error */ ! if( !sizeof(packet[6]) ) return; if( packet[6][0][0] == Nameservers[0][0] ) { Nameservers = packet[6]; Connected = Nameservers[0][0]; --- 91,105 ---- //default : tc("Packet: "+identify(packet)); case "startup-reply": log_file("intermud",identify(packet)); ! tn("INTERMUD_D: "+identify(packet),"red"); ! if( sizeof(packet) != 8 ) { ! tn("We don't like the mudlist packet size.","red"); ! return; ! } ! if( !sizeof(packet[6]) ) { ! tn("We don't like an absence of packet element 6.","red"); ! return; ! } if( packet[6][0][0] == Nameservers[0][0] ) { Nameservers = packet[6]; Connected = Nameservers[0][0]; *************** *** 100,110 **** } return; case "mudlist": ! if( sizeof(packet) != 8 ) return; ! if( packet[6] == MudList->ID ) return; ! if( packet[2] != Nameservers[0][0] ) return; MudList->ID = packet[6]; foreach(cle, val in packet[7]) { if( !val && MudList->List[cle] != 0 ) map_delete(MudList->List, cle); else if( val ) MudList->List[cle] = val; --- 112,137 ---- } return; case "mudlist": ! tn("INTERMUD_D mudlist received.","red"); ! log_file("mudlist_packet",identify(packet),1); ! if( sizeof(packet) != 8 ) { ! tn("We don't like the mudlist packet size.","red"); ! return; ! } ! if( packet[6] == MudList->ID ) { ! tn("We don't like packet element 6. It is: "+identify(packet[6]),"red"); ! //return; ! tn("We will continue anyway.","red"); ! } ! if( packet[2] != Nameservers[0][0] ) { ! tn("We don't like packet element 2. It is: "+identify(packet[2]),"red"); ! return; ! } ! MudList->ID = packet[6]; foreach(cle, val in packet[7]) { + if(cle) tn("Procesing cle: "+identify(cle),"cyan"); + if(val) tn("Procesing val: "+identify(val)+"\n--\n","cyan"); if( !val && MudList->List[cle] != 0 ) map_delete(MudList->List, cle); else if( val ) MudList->List[cle] = val; *************** *** 166,171 **** --- 193,199 ---- SERVICES_D->eventReceiveTell(packet); break; case "chan-user-reply": + tn("INTERMUD_D: chan-user-reply received.","red"); case "ucache-update": SERVICES_D->eventReceiveUcacheUpdate(packet); break; *************** *** 185,190 **** --- 213,219 ---- SERVICES_D->eventReceiveMailOk(packet); break; case "file": + tn("INTERMUD_D: file packet received.","red"); break; case "error": SERVICES_D->eventReceiveError(packet); *************** *** 205,210 **** --- 234,240 ---- static void eventConnectionFailure() { if( Connected ) return; + tn("INTERMUD_D: CONNECTION FAILED","red"); error("Failed to find a useful name server.\n"); } diff -c -r --new-file ds2.0r18/lib/daemon/preload_check.c ds2.0r20b/lib/daemon/preload_check.c *** ds2.0r18/lib/daemon/preload_check.c Sat Mar 11 11:14:52 2006 --- ds2.0r20b/lib/daemon/preload_check.c Wed Apr 5 19:33:16 2006 *************** *** 8,14 **** static void checkPreloads(){ foreach(string daemon in preloads){ ! if(!find_object(daemon) && daemon != INTERMUD_D) update(daemon); } call_out((: checkPreloads :), 300); --- 8,15 ---- static void checkPreloads(){ foreach(string daemon in preloads){ ! if(!find_object(daemon) && daemon != INTERMUD_D && ! daemon != AUTOEXEC_D) update(daemon); } call_out((: checkPreloads :), 300); diff -c -r --new-file ds2.0r18/lib/daemon/races.c ds2.0r20b/lib/daemon/races.c *** ds2.0r18/lib/daemon/races.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/daemon/races.c Sun Apr 9 23:49:20 2006 *************** *** 158,164 **** //tc("hellow"); res = new(class Race); - s = new (class Stat); res->Resistance = ([]); res->Skills = ([]); --- 158,163 ---- *************** *** 255,264 **** break; case "STATS": tmp = explode(replace_string(line, "STATS ",""), ":"); ! s->Average = to_int(tmp[1]); ! s->Class = to_int(tmp[2]); res->Stats[tmp[0]] = s; break; case "LIMB": --- 254,268 ---- break; case "STATS": + tmp = ({}); + s = new (class Stat); tmp = explode(replace_string(line, "STATS ",""), ":"); ! //tc("stat: "+identify(tmp),"yellow"); ! s->Average = copy(to_int(tmp[1])); ! s->Class = copy(to_int(tmp[2])); res->Stats[tmp[0]] = s; + //tc("ihnfcaa: "+(res->Stats[tmp[0]])->Average,"yellow"); + //tc("ihnfcaax2: "+(res->Stats[tmp[0]])->Class,"yellow"); break; case "LIMB": *************** *** 406,411 **** --- 410,417 ---- void SetCharacterRace(string race, mixed array args) { class Race res = Races[race]; mixed array tmp; + mapping StatMap; + string schluss; if( !res || !res->Complete || sizeof(args) != 5 ) return; tmp = ({}); *************** *** 413,420 **** tmp = ({ tmp..., ({ key, val }) }); args[0] = tmp; tmp = ({}); ! foreach(string key, class Stat stat in res->Stats) ! tmp = ({ tmp..., ({ key, stat->Average, stat->Class }) }); args[1] = tmp; args[2] = res->Language; //args[3] = ({ res->Sensitivity[0], res->Sensitivity[1] }); --- 419,434 ---- tmp = ({ tmp..., ({ key, val }) }); args[0] = tmp; tmp = ({}); ! //foreach(string key, class Stat stat in res->Stats){ ! StatMap = copy(res->Stats); ! schluss = ""; ! foreach(schluss in keys(StatMap)){ ! //tc("key: "+identify(StatMap[schluss]),"green"); ! //tc("Average: "+identify(StatMap[schluss]->Average),"green"); ! //tc("Class: "+identify(StatMap[schluss]->Class),"green"); ! tmp = ({ tmp..., ({ schluss, StatMap[schluss]->Average, StatMap[schluss]->Class }) }); ! //tc("SetCharacterRace: "+identify(tmp)); ! } args[1] = tmp; args[2] = res->Language; //args[3] = ({ res->Sensitivity[0], res->Sensitivity[1] }); diff -c -r --new-file ds2.0r18/lib/daemon/services/auth.c ds2.0r20b/lib/daemon/services/auth.c *** ds2.0r18/lib/daemon/services/auth.c Sat Mar 11 11:14:53 2006 --- ds2.0r20b/lib/daemon/services/auth.c Wed Apr 12 23:47:49 2006 *************** *** 13,18 **** --- 13,19 ---- pinger->SetOK(1); } } + tn("Auth reply received from "+packet[2]+".","white"); if(sizeof(pingers)){ foreach(object dude in pingers){ tell_player(dude, packet[2]+" has just replied to a ping request from "+ *************** *** 25,30 **** --- 26,32 ---- void eventReceiveAuthRequest(mixed array packet) { string mudlist = ""; PING_D->SetOK(); + tn("Auth request received from "+packet[2]+".","white"); INTERMUD_D->eventWrite( ({"auth-mud-reply", 5, mud_name(), 0, packet[2], 0, (random(9999) * 10000) + 1138 }) ); if(file_exists("/tmp/muds.txt")) *************** *** 32,38 **** if(!grepp(mudlist,packet[2]) || packet[2] == "DeadSoulsNew" || packet[2] == "DeadSoulsWin"){ write_file("/tmp/muds.txt",packet[2]+"\n"); ! tc("We have a new mud! "+packet[2]+" has joined intermud.","red"); } } --- 34,41 ---- if(!grepp(mudlist,packet[2]) || packet[2] == "DeadSoulsNew" || packet[2] == "DeadSoulsWin"){ write_file("/tmp/muds.txt",packet[2]+"\n"); ! //tc("We have a new mud! "+packet[2]+" has joined intermud.","red"); ! tn("We have a new mud! "+packet[2]+" has joined intermud.","red"); } } diff -c -r --new-file ds2.0r18/lib/daemon/services/channel.c ds2.0r20b/lib/daemon/services/channel.c *** ds2.0r18/lib/daemon/services/channel.c Tue Mar 28 23:23:40 2006 --- ds2.0r20b/lib/daemon/services/channel.c Sun Apr 9 23:49:20 2006 *************** *** 14,19 **** --- 14,20 ---- void eventReceiveChannelWhoReply(mixed array packet) { object ob; + tn("eventReceiveChannelWhoReply: "+identify(packet),"green"); if( file_name(previous_object()) != INTERMUD_D ) return; if( !(ob = find_player(packet[5])) ) return; *************** *** 39,44 **** --- 40,46 ---- ret += entry+", "; } ret = truncate(ret,2); + tn("eventReceiveChannelWhoRequest: "+identify(packet),"green"); tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested a list of users listening to channel "+packet[6]+". Replying with: %^BOLD%^GREEN%^"+ret+".%^RESET%^\""); } *************** *** 48,53 **** --- 50,56 ---- string visname; int gender; if( file_name(previous_object()) != INTERMUD_D ) return; + tn("eventReceiveChannelUserRequest: "+identify(packet),"green"); if( !(ob = find_player(packet[6])) ) { INTERMUD_D->eventWrite( ({ "error", 5, mud_name(), 0, packet[2], 0, "unk-user", packet[6] + " is not a valid " *************** *** 65,70 **** --- 68,75 ---- } void eventReceiveChannelMessage(mixed array packet) { + tn("eventReceiveChannelMessage: "+identify(packet),"green"); + if( file_name(previous_object()) != INTERMUD_D ) return; if( packet[2] == mud_name() ) return; *************** *** 75,80 **** --- 80,87 ---- } void eventReceiveChannelEmote(mixed array packet) { + tn("eventReceiveChannelEmote: "+identify(packet),"green"); + if( file_name(previous_object()) != INTERMUD_D ) return; if( packet[2] == mud_name() ) return; if( !packet[7] ) return; *************** *** 85,90 **** --- 92,98 ---- void eventReceiveChannelTargettedEmote(mixed array packet) { string target; + tn("eventReceiveChannelTargettedEmote: "+identify(packet),"green"); if( file_name(previous_object()) != INTERMUD_D ) return; if( packet[2] == mud_name() ) return; *************** *** 98,106 **** --- 106,117 ---- varargs void eventSendChannel(string who, string ch, string msg, int emote, string target, string targmsg) { mixed array packet; + mixed array packet_thing = ({ who, ch, msg, emote || "", target || "", targmsg || "" }); string targpl, where; // targpl is target keyname + tn("eventSendChannel raw: "+identify( packet_thing ),"green"); + if( emote ) { if( target && targmsg ) { if( sscanf(target, "%s@%s", targpl, where) != 2 ) { *************** *** 126,131 **** --- 137,143 ---- else packet = ({ "channel-m", 5, mud_name(), convert_name(who), 0, 0, ch, who, msg }); INTERMUD_D->eventWrite(packet); + tn("eventSendChannel processed: "+identify(packet),"green"); } void eventSendChannelWhoRequest(string channel, string mud) { *************** *** 134,139 **** --- 146,152 ---- pl = (string)this_player(1)->GetKeyName(); INTERMUD_D->eventWrite(({ "chan-who-req", 5, mud_name(), pl, mud, 0, channel })); + tn("eventSendChannelWhoRequest: "+identify( ({ "chan-who-req", 5, mud_name(), pl, mud, 0, channel })) , "green"); } void eventRegisterChannels(mapping list) { *************** *** 155,164 **** --- 168,181 ---- else INTERMUD_D->eventWrite(({ "channel-listen", 5, mud_name(), 0, ns, 0, channel, 1 })); } + tn("eventRegisterChannels: "+identify(list),"green"); + } int eventAdministerChannel(string channel, string array additions, string array subs) { + tn("eventAdministerChannel. ","green"); + if( !((int)master()->valid_apply( ({}) )) ) return 0; if( member_array(channel, (string array)INTERMUD_D->GetChannels()) == -1 ) return 0; *************** *** 166,175 **** --- 183,196 ---- (string)this_player(1)->GetKeyName(), (string)INTERMUD_D->GetNameserver(), 0, channel, additions, subs })); + + tn("eventAdministerChannel: "+channel+" "+identify(additions)+" "+identify(subs),"green"); return 1; } int AddChannel(string channel, int privee) { + tn("eventAdministerChannel: "+channel+", "+privee,"green"); + if( !((int)master()->valid_apply( ({}) )) ){ return 0; } *************** *** 185,190 **** --- 206,213 ---- int RemoveChannel(string channel) { //if( !((int)master()->valid_apply( ({}) )) ) return 0; + tn("RemoveChannel: "+identify(channel),"green"); + if( member_array(channel, (string array)INTERMUD_D->GetChannels()) == -1 ){ return 0; } diff -c -r --new-file ds2.0r18/lib/daemon/services/emoteto.c ds2.0r20b/lib/daemon/services/emoteto.c *** ds2.0r18/lib/daemon/services/emoteto.c Mon Nov 7 13:29:14 2005 --- ds2.0r20b/lib/daemon/services/emoteto.c Sun Apr 9 23:49:20 2006 *************** *** 12,17 **** --- 12,18 ---- object ob; string who; + tn("eventReceiveEmote: "+identify(packet), "green"); if( file_name(previous_object()) != INTERMUD_D ) return; who = convert_name(packet[5]); if( !(ob = find_player(who)) || (int)ob->GetInvis() ) { *************** *** 34,39 **** --- 35,41 ---- where = (string)INTERMUD_D->GetMudName(where); INTERMUD_D->eventWrite(({ "emoteto", 5, mud_name(), pl, where, convert_name(who), plc, msg })); + tn("eventSendEmote: "+identify( "emoteto", 5, mud_name(), pl, where,convert_name(who), plc, msg ),"green"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/error.c ds2.0r20b/lib/daemon/services/error.c *** ds2.0r18/lib/daemon/services/error.c Mon Nov 7 13:29:14 2005 --- ds2.0r20b/lib/daemon/services/error.c Sun Apr 9 23:49:20 2006 *************** *** 8,13 **** --- 8,15 ---- object ob; string error_code, mud, target, msg; + tn("ERROR RECEIVED: "+identify(packet)); + if( packet[5] ) { target = convert_name(packet[5]); if( !(ob = find_player(target)) ) return; diff -c -r --new-file ds2.0r18/lib/daemon/services/finger.c ds2.0r20b/lib/daemon/services/finger.c *** ds2.0r18/lib/daemon/services/finger.c Sat Mar 11 11:14:53 2006 --- ds2.0r20b/lib/daemon/services/finger.c Sun Apr 9 23:49:20 2006 *************** *** 26,31 **** --- 26,32 ---- ret = ({ "finger-reply", 5, mud_name(), 0, packet[2], packet[3] }) + ret; INTERMUD_D->eventWrite(ret); tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested finger information about "+capitalize(ret[6])+".%^RESET%^\""); + tn("eventReceiveFingerRequest: "+identify(packet),"cyan"); } *************** *** 52,57 **** --- 53,59 ---- fing += "Site: " + (packet[12] ? packet[12] : "Confidential") + "\n"; fing += (packet[14] ? packet[14] : "\n"); ob->eventPrint(fing, MSG_SYSTEM); + tn("eventReceiveFingerReply: "+identify(packet),"cyan"); } void eventSendFingerRequest(string who, string where) { *************** *** 60,63 **** --- 62,66 ---- if( !(pl = (string)this_player(1)->GetKeyName()) ) return; INTERMUD_D->eventWrite( ({ "finger-req", 5, mud_name(), pl, where, 0, who }) ); + tn("eventSendFingerRequest: "+identify( ({ "finger-req", 5, mud_name(), pl, where, 0,who }) ),"cyan"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/locate.c ds2.0r20b/lib/daemon/services/locate.c *** ds2.0r18/lib/daemon/services/locate.c Wed Feb 22 15:29:50 2006 --- ds2.0r20b/lib/daemon/services/locate.c Sun Apr 9 23:49:20 2006 *************** *** 19,24 **** --- 19,25 ---- if( file_name(previous_object()) != INTERMUD_D ) return; tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has issued a locate request for %^BOLD%^YELLOW%^"+capitalize(packet[6])+".%^RESET%^\""); + tn("Locate request received: "+identify(packet),"white"); if( !(ob = find_player(packet[6])) || ob->GetInvis()) return; if( interactive(ob) ) { string array tmp = ({ }); *************** *** 43,48 **** --- 44,50 ---- if( file_name(previous_object()) != INTERMUD_D ) return; if( !stringp(packet[5]) || !(ob = find_player(convert_name(packet[5]))) ) return; + tn("Locate reply received: "+identify(packet),"white"); m = packet[7] + " was just located on " + packet[6] + "."; if( (idl = (int)packet[8]) > 60 ) m += sprintf(" (idle %02d:%02d:%02d)", idl/3600, (idl/60)%60, idl%60); *************** *** 53,59 **** void eventSendLocateRequest(string who) { string pl; ! if( !(pl = (string)this_player(1)->GetKeyName()) ) return; INTERMUD_D->eventWrite( ({ "locate-req", 5, mud_name(), pl, 0, 0, who }) ); } --- 55,62 ---- void eventSendLocateRequest(string who) { string pl; ! mixed *locate_request = ({ "locate-req", 5, mud_name(), pl, 0, 0, who }); if( !(pl = (string)this_player(1)->GetKeyName()) ) return; INTERMUD_D->eventWrite( ({ "locate-req", 5, mud_name(), pl, 0, 0, who }) ); + tn("Locate request being sent: "+identify(locate_request),"white"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/tell.c ds2.0r20b/lib/daemon/services/tell.c *** ds2.0r18/lib/daemon/services/tell.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/daemon/services/tell.c Sun Apr 9 23:49:20 2006 *************** *** 14,19 **** --- 14,20 ---- string who; string adverb = ""; + tn("eventReceiveTell: "+identify(packet),"yellow"); if( file_name(previous_object()) != INTERMUD_D ) return; who = convert_name(packet[5]); if( !(ob = find_player(who)) || (int)ob->GetInvis() ) { *************** *** 59,64 **** --- 60,66 ---- this_player(1)->eventPrint("%^BOLD%^RED%^You tell " + capitalize(who) + "@" + where + ":%^RESET%^ " + msg, MSG_CONV); + tn("eventSendTell: "+identify( ({ "tell", 5, mud_name(), pl, where, convert_name(who), plc, msg }) ), "yellow"); } diff -c -r --new-file ds2.0r18/lib/daemon/services/who.c ds2.0r20b/lib/daemon/services/who.c *** ds2.0r18/lib/daemon/services/who.c Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/daemon/services/who.c Sun Apr 9 23:49:20 2006 *************** *** 19,24 **** --- 19,25 ---- foreach(who in packet[6]) list += ({ who[0] + " (" + who[1] + " idle): " + who[2] }); ob->eventPage(list); + tn("eventReceiveWhoReply: "+identify(packet),"blue"); } void eventReceiveWhoRequest(mixed *packet) { *************** *** 34,40 **** ret += entry[0]+", "; } ret = truncate(ret,2); ! tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested a list of users currently logged on. Replying with: %^BOLD%^YELLOW%^"+ret+".%^RESET%^\""); } --- 35,41 ---- ret += entry[0]+", "; } ret = truncate(ret,2); ! tn("eventReceiveWhoRequest: "+identify(packet),"blue"); tell_room(ROOM_ARCH,"The Arch Room loudspeaker announces: \"%^BOLD%^CYAN%^"+capitalize(packet[3])+" at "+packet[2]+" has requested a list of users currently logged on. Replying with: %^BOLD%^YELLOW%^"+ret+".%^RESET%^\""); } *************** *** 43,48 **** --- 44,50 ---- who = (string)this_player(1)->GetName(); INTERMUD_D->eventWrite(({ "who-req", 5, mud_name(), who, mud, 0 })); + tn("eventSendWhoRequest: "+identify( ({ "who-req", 5, mud_name(), who, mud, 0 })), "blue"); } diff -c -r --new-file ds2.0r18/lib/daemon/stargate.c ds2.0r20b/lib/daemon/stargate.c *** ds2.0r18/lib/daemon/stargate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/daemon/stargate.c Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,185 ---- + /** + * stargate_d : stargate daemon. tracks the entire stargate network. + * started 2006-03-23 by jonez + * + * 2006-03-24, jonez + * - with help from cratylus, changed the daemon so it saves it's state + * whenever there is a change, and tries to load from disk at create + * time. + * 2006-03-28, jonez + * - gate is status is now "idle", "outbound", or "inbound". gate cannot be entered from the inbound side. + */ + + #include + #include + #include "/daemon/include/stargate.h" + + inherit LIB_DAEMON; + + private mapping stargates = ([]); + + static void create() + { + daemon::create(); + SetNoClean(1); + load(); + if (!stargates) stargates = ([]); + } + + void save() + { + unguarded( (: save_object, SAVE_STARGATE, 1 :) ); + tell_player("jonez", "stargate daemon saved itself"); + return; + } + + void load() + { + if (file_size(SAVE_STARGATE __SAVE_EXTENSION__) > 0) + { + tc("stargate save file exists"); + unguarded( (: restore_object, SAVE_STARGATE :) ); + } + tell_player("jonez", "stargate daemon loaded itself"); + return; + } + + int setStargate(string address, string destination) + { + class stargate s = new(class stargate); + + if (address == "" || destination == "") return 1; + + s->status = "idle"; + s->destination = destination; + s->endpoint = 0; + stargates[address] = s; + save(); + return 0; + } + + class stargate getStargate(string address) + { + class stargate s = stargates[address]; + if (!s) return 0; + + tell_player("jonez", sprintf("get: address=%s, status=%s destination=%s endpoint=%s", address, s->status, s->destination, s->endpoint)); + return (class stargate)stargates[address]; + } + + int delStargate(string address) + { + map_delete(stargates, address); + save(); + return 0; + } + + mapping getStargates() + { + /* + string buf = ""; + + foreach(string n, class stargate g in stargates) + { + buf += sprintf("name=%s, status=%s, destination=%s, endpoint=%s; ", n, g->status, g->destination, g->endpoint); + } + return buf; + */ + return copy(stargates); + } + + int setStatus(string address, string status) + { + class stargate s; + s = stargates[address]; + if (!s) return 1; + + s->status = status; + save(); + return 0; + } + + string getStatus(string address) + { + class stargate s = stargates[address]; + if (!s) return ""; + + return s->status; + } + + string getDestination(string address) + { + class stargate s = stargates[address]; + if (!s) return ""; + return s->destination; + } + + string getEndpoint(string address) + { + class stargate s = stargates[address]; + if (!s) return ""; + return s->endpoint; + } + + // return 1 on success, 0 on error + int connect(string from, string to) + { + class stargate t, f; + + tell_player("jonez", sprintf("stargate_d->connect(%s, %s)", from, to)); + + if (from == to) return 0; + + f = stargates[from]; + if (!f) + { + tell_player("jonez", "failed to lookup status of outbound gate"); + return 0; + } + + t = stargates[to]; + if (!t) + { + tell_player("jonez", "failed to lookup status of inbound gate"); + return 0; + } + + tell_player("jonez", sprintf("%s->status=%s, %s->status=%s", from, f->status, to, t->status)); + + if (f->status == "idle" && t->status == "idle") + { + f->endpoint = to; + f->status = "outbound"; + + t->endpoint = from; + t->status = "inbound"; + + save(); + + return 1; + } + return 0; + } + + // return 1 on success, 0 on error + int disconnect(string from) + { + class stargate f; + string endpoint; + + tell_player("jonez", sprintf("stargate_d->disconnect(%s)", from)); + + f = stargates[from]; + if (!f) return 0; + + endpoint = stargates[from]->endpoint; + if (!endpoint) return 0; + + stargates[endpoint]->endpoint = ""; + stargates[endpoint]->status = "idle"; + + stargates[from]->endpoint = ""; + stargates[from]->status = "idle"; + save(); + return 1; + } diff -c -r --new-file ds2.0r18/lib/doc/CREDITS ds2.0r20b/lib/doc/CREDITS *** ds2.0r18/lib/doc/CREDITS Fri Mar 24 14:36:35 2006 --- ds2.0r20b/lib/doc/CREDITS Wed Apr 5 19:33:16 2006 *************** *** 13,19 **** Brodbane, Ashon, Shadyman, Jonez, Cecil. Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung, ! Aten, Metiscus, and Alensin for their thoughtful comments and suggestions. Also: Xyzzy He Is Cool --- 13,19 ---- Brodbane, Ashon, Shadyman, Jonez, Cecil. Appreciation of: Jayren, Kaylus, Arianrhod, Nosmo, Pyro, Abby, Balmung, ! Aten, Metiscus, Garfield, Javelin, and Alensin for their thoughtful comments and suggestions. Also: Xyzzy He Is Cool diff -c -r --new-file ds2.0r18/lib/doc/RELEASE_NOTES ds2.0r20b/lib/doc/RELEASE_NOTES *** ds2.0r18/lib/doc/RELEASE_NOTES Tue Mar 28 23:23:40 2006 --- ds2.0r20b/lib/doc/RELEASE_NOTES Fri Apr 14 18:27:24 2006 *************** *** 1,5 **** ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 25 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. --- 1,88 ---- + ---- 2.0r20 --- + - (hopefully) Fixed rare and peculiar bug that hosed + up logins unpredictably. + - Added the Jonez/Brodbane stargate system. + - Container bug fixed. It is now possible to put + amounts of money into containers and onto surfaces. + - Daemonized snoop system. This permits the logging + of snoop data, unmanned snoop logs, and snooping + multiple players at once. Still slightly buggy, so + please report any problems with it. + - The encre and decre of non-logged-on users now + behaves properly. + - Furnaces now destroy objects almost immediately. + - Fixed voting system. + - LIB_GUILD changed to LIB_CLAN. It works, but is + not actually useful. Proper clan functionality + is planned post-2.1. + - Heal command now fixes individual limbs as well. + - Added ENABLE_ENCUMBRANCE define to config.h to + toggle the encumbrance combat modifier. + - Modified combat so it's difficult to fight while + carrying stuff. Anything worn or wielded doesn't + affect combat capability. NPC's are unaffected by this. + - Fixed horrendous carry-capacity leak in all containers. + - Added "every" token to reload verb, enabling the + reload of all loaded objects that inherit the specified + library object, eg "reload every npc". + - Fixed bugs in invisibility. + - Enabled QCS to work in /domains directories for + creators set as domain admins with the + domainadmin command. + - Fixed error in RACES_D that dramatically distorted stats. + - Added sefun: domain_admin. + - Fixed mudlist cache problem. + - Added command: switchrouter, domainadmin. + - Added set_heart_beat to QCS. + - Fixed bugs in commands: banish, anglicize. + - Integrated most packet data with network room. + - Added router room for I3 router debugging. + - Integrated most I3 packets with router room. + + ---- 2.0r19 --- + - Fixed menu item bug in LIB_BARKEEP. + - Fixed Ylsrim pub. + - Added keepalive pinger tool to wiz chest. + - Added commands: anglicize, debug, expel, resetpasswd. + - Fixed first boot problem with /secure/daemon/letters.c. + - Driver: set heart_beat to approximately one per second. + - Driver: added locale workaround to startmud script. + - Added Brodbane's New and Improved cp command. + - Added Brodbane's sefuns: wild_card, remove_dots. + - Elision bug in pager.c fixed by Brodbane. + - Added network troubleshooting room. + - Fixed bug in invisibility. + - Made tricorder and remote control emit warnings, logs, + and errors when used by a non-creator who does not have a + visitor pass. + - Added colon emote behavior to channels, eg, "ds :smile" works + the same as "dsemote smile". + - Tim's I3 router integrated into the lib. Fixes forthcoming. + - Object Properties map variable now persists as well. + - Added Brodbane's dsversion command. + - Fixed bug in LIB_SENTIENT eventReceiveEmote. + - Added Shadyman's fix to the imc2 daemon. + - Added language teacher and schoolhouse to /domains/town. + - Added LIB_TEACHER. + - Tweaked interactive.c to omit null obvious exits. + - Fixed "list" conflict with restricted channels and shops. + - Added SetNativeLanguage to QCS. + - Added PINGING_MUDS, ENGLISH_ONLY and HUMANS_ONLY defines to config.h. + - Added commands: anglicize, debug, expel. + - Added SetNativeLanguage() to LIB_LANGUAGE. + - Added GetEquippedLimbs() to LIB_BODY. + - Visitor's pass now suppresses autosave messages. + - Full cardinal direction aliases added to players (eg "north"). + - Added direction aliases to 'peer' command. + - Player Properties map variable now persists across quits and boots. + This may or may not be a good thing, and could change in + future releases. + - Added sefuns debug(), tell_creators(); + - Fixed socket_address(). + - Added AUTOEXEC_D. + ---- 2.0r18 --- ! - Changed default intermud router to 149.152.218.102 port 23 - Added a sanity check in telnet room. - Fixed bug in Newbie Mansion Quest (thx Jonez). - Added verb: pulsecheck. diff -c -r --new-file ds2.0r18/lib/doc/RELEASE_NOTES_HTTP ds2.0r20b/lib/doc/RELEASE_NOTES_HTTP *** ds2.0r18/lib/doc/RELEASE_NOTES_HTTP Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/doc/RELEASE_NOTES_HTTP Wed Apr 12 23:47:49 2006 *************** *** 0 **** --- 1,386 ---- + ---- 2.0r20 (unreleased) --- + - The encre and decre of non-logged-on users now + behaves properly. + - Furnaces now destroy objects almost immediately. + - Fixed voting system. + - LIB_GUILD changed to LIB_CLAN. It works, but is + not actually useful. Proper clan functionality + is planned post-2.1. + - Heal command now fixes individual limbs as well. + - Added ENABLE_ENCUMBRANCE define to config.h to + toggle the encumbrance combat modifier. + - Modified combat so it's difficult to fight while + carrying stuff. Anything worn or wielded doesn't + affect combat capability. NPC's are unaffected by this. + - Fixed horrendous carry-capacity leak in all containers. + - Added "every" token to reload verb, enabling the + reload of all loaded objects that inherit the specified + library object, eg "reload every npc". + - Fixed bugs in invisibility. + - Enabled QCS to work in /domains directories for + creators set as domain admins with the + domainadmin command. + - Fixed error in RACES_D that dramatically distorted stats. + - Added sefun: domain_admin. + - Fixed mudlist cache problem. + - Added command: switchrouter, domainadmin. + - Added set_heart_beat to QCS. + - Fixed bugs in commands: banish, anglicize. + - Integrated most packet data with network room. + - Added router room for I3 router debugging. + - Integrated most I3 packets with router room. + + ---- 2.0r19 --- + - Fixed menu item bug in LIB_BARKEEP. + - Fixed Ylsrim pub. + - Added keepalive pinger tool to wiz chest. + - Added commands: anglicize, debug, expel, resetpasswd. + - Fixed first boot problem with /secure/daemon/letters.c. + - Driver: set heart_beat to approximately one per second. + - Driver: added locale workaround to startmud script. + - Added Brodbane's New and Improved cp command. + - Added Brodbane's sefuns: wild_card, remove_dots. + - Elision bug in pager.c fixed by Brodbane. + - Added network troubleshooting room. + - Fixed bug in invisibility. + - Made tricorder and remote control emit warnings, logs, + and errors when used by a non-creator who does not have a + visitor pass. + - Added colon emote behavior to channels, eg, "ds :smile" works + the same as "dsemote smile". + - Tim's I3 router integrated into the lib. Fixes forthcoming. + - Object Properties map variable now persists as well. + - Added Brodbane's dsversion command. + - Fixed bug in LIB_SENTIENT eventReceiveEmote. + - Added Shadyman's fix to the imc2 daemon. + - Added language teacher and schoolhouse to /domains/town. + - Added LIB_TEACHER. + - Tweaked interactive.c to omit null obvious exits. + - Fixed "list" conflict with restricted channels and shops. + - Added SetNativeLanguage to QCS. + - Added PINGING_MUDS, ENGLISH_ONLY and HUMANS_ONLY defines to config.h. + - Added commands: anglicize, debug, expel. + - Added SetNativeLanguage() to LIB_LANGUAGE. + - Added GetEquippedLimbs() to LIB_BODY. + - Visitor's pass now suppresses autosave messages. + - Full cardinal direction aliases added to players (eg "north"). + - Added direction aliases to 'peer' command. + - Player Properties map variable now persists across quits and boots. + This may or may not be a good thing, and could change in + future releases. + - Added sefuns debug(), tell_creators(); + - Fixed socket_address(). + - Added AUTOEXEC_D. + + ---- 2.0r18 --- + - Changed default intermud router to 149.152.218.102 port 23 + - Added a sanity check in telnet room. + - Fixed bug in Newbie Mansion Quest (thx Jonez). + - Added verb: pulsecheck. + - Fixed bug in delete verb that broke when deleting an + item with a relative include defined. + - Fixed a wielding bug that let you wield a two-handed + weapon AND a one-handed weapon. + - Added more damage types. + - Fixed month bug in timestamp.c. + - Fixed light bug in ROOM_VOID. + + ---- 2.0r17 --- + - Fixed bug that prevented assistant admins from shutting down. + - Added Shadyman's emote doc. + - Tweaked timestamp() (thx, Jonez). + - Tweaked "dest" code (thx, Cecil). + - Added convert_ascii() sefun to stringify ascii codes. + - Added get_random_living() sefun. + - QCS now sanely stops when the target is virtual. + - Players can no longer be hosed by being initfixed. + - Fixed bug that returned conflicting messages if + an intermud tell was received while invis with + voicemail enabled. + - timezone.cfg can now be set to blank with admintool. + - Fixed problem in CHAT_D that restricted local channel + emotes when intermud was set to be restricted. + - Fixed a bug in null currency addition in admintool. + - Smushed another apostrophe problem. This is really ridiculous, I + should just fix the real problem, but it's such a dumb + bug, it's easier to pretend it doesn't exist. + - Added SetCustomXP to /lib/combat so that NPC's can have + expee value independent of that calculated from their level. + - Added SetCustomXP to QCS. + - Wrapped users() efun in a sefun to exclude users without + an environment. + - Removed old, counterproductive intermud update event. + - Added log rotation daemon in /secure/daemon/log.c + - Added a log rotation check every 2 hours. + - Format of timestamp() sefun changed to prevent screwing the + mud when running on Windows and logs rotate. + - Fixed bug in update() sefun. + - Prettified devel mud welcome file and added warning about + submitted code being automatically GPL. + - The title and chfn commands now automatically update finger + info with current data. + - *COMPAT BUSTER* RACES_D re-written (Thanks, Ashon). If you've + added your own races, you'll need to re-add them using the new format. + - /www FAQ material updated. + - Fixed Radagast's training skills, fixed QCS trainer creation. + - Modified telnet room to not permit recursive logins on the + development Dead Souls mud. + - Removed nonexistent boards from boards command. + - Added commands: addraces, removeraces, ascii, resetall, flushobs. + + ---- 2.0r16 --- + - Admin email specified at login now gets sent to config.h. + - New FAQ material added to /www + - If a file exists in /doc/help/races for a specified race, + help will display that file instead of the autogenerated + race body data. + + ---- 2.0r15 --- + - Intermud can be disabled entirely by toggling DISABLE_INTERMUD + in /secure/include/config.h. + - *COMPAT BUSTER* Basic framework for race-based skills in + place. Old races.o files will not work with the new race + data file format expected by RACES_D. + - Fleas and lice examples now unbroken. + - Peer command unbroken. + - Fixed miscellaneous i3 services bugs. + - Tweaked the apostrophe workaround. + - "cd here" now works. + - Added intermud link failure/restoration announcement + to arch room. + - Fixed LIB_READ so that receiving a string for a functional's + return of a GetRead makes that string the text to be read. + - Fixed read bug in /lib/bboard.c. + - Fixed a problem with eval that puked on ASSIST members. + - Fixes and updates made to answering machine. Intermud + tell support added. + - Intermud tells now reach the player if she is invisible. The + tell sender's mud receives an "unknown user" error, and the + player receives an "unknowingly tells you" message. + - Intermud channels can be disabled by toggling + RESTRICTED_INTERMUD in /secure/include/config.h. Exceptions + to this restriction can be made by adding users to + the INTERMUD group using admintool. + - Automatic promotion of new characters to creator status can + be enabled by editing /secure/include/config.h and + toggling AUTO_WIZ. + - Update and runtime errors now attempt to display more helpful + messages to the user, if the user is a creator (Thx, Brodbane). + - Error logs now include timestamps. + - Added trainers to QCS. + - *COMPAT BUSTER*: Trainer skills now have to be specified with + an array, not just a series of strings: + RIGHT: AddTrainingSkills( ({ "alpha", "bravo", "charlie" }) ); + WRONG: AddTrainingSkills( "alpha", "bravo", "charlie" ); + - Fixed error message bug in /lib/trainer.c. + - Fixed chat.c bug that allowed emotes from earmuffed players + to be printed. + - Added languages to say verb. + - Added languages to reading. + - Added commands: language, ping. + - Updated/added various help files. + - Added FAQs (/doc/faq...accessed with the faq command). + - Updated Player's Handbook. + - Miscellaneous header fixes. + - Fixed issues in description.c and look.c that interfered with + having multiple Item elements in objects and having arrays + for keys in Item elements in objects. + - Added IDLE_TIMEOUT to /secure/include/config.h + - Added sefuns: imud_privp, find_inheritors, find_deep_inheritors, + securep. + - Overhauled limb and corpse decay. DECAY_D now handles the + callouts, reducing the number of decaying callouts to 1, regardless + of the number of limbs and corpses lying about. + - Limb ID bug fixed. + - Added tweaks to read verb and faq command submitted by Manchi. + + ---- 2.0r14 --- + - Added barkeeps to QCS. + - Added vendors to QCS. + - Barkeeps now properly handle array keys in menu items. See Lars. + - Updated www directory. + - Abbreviated RELEASE_NOTES: dropped pre-v2 data. + - Added commands: consider, whomuffed. + - Fixed QCS bug that hosed room paths. See "room filenames" notes + in chapter 35 of the Creator's Manual. + - Fixed problem with hobbling 4-legged NPC's. + - Additional docs, helpfiles, updated faqs and expanded QCS chapters. + + ---- 2.0r13 --- + - Numerous minor fixes to commands and lib objects. + - Keepalive daemon implemented to detect when the intermud + connection is down and attempts to restart it. + - Intermud services now supports "auth" packets, somewhat. + - The bk command now also works on objects. + - Added commands: kills, chanban, chanunban, earmuff, unmuff. + - Fixed duplicate handbook bug in encre. + - New cres are no longer forced to quit. + - Fixed parser bug when dealing with identical items in different + containers. + - Added sefuns: query_names, answers_to, add_event, remove_event, + update, local_ctime. + - Fixed events system (see *_event sefuns). + - Non-admins now can't use the dest or trans commands on admins. Note that + if a creator really wants to, she could get around using the commands and + trans or dest you anyway. However, now they can't do it "accidentally". + - The bull shark is no longer drinkable. + - Applied workaround to an apostrophe bug. Full fix pending. + - More sefun documentation. + + ---- 2.0r12 --- + - Fixed function conflict that made "scan -i" fail. + - Tightened up "get" lib code. + - Verbified "zap". + - Added atoi sefun. + - Added LIB_WORN_STORAGE to more gracefully handle wearable containers + like backpacks and such, also added it to QCS. + - QCS: fixed a bug that hosed up armor protection settings. + + ---- 2.0r11 --- + - Added findobs sefun and findobj command. + - Fixed "no steal" item property so thieves can't steal such things. + - Android corpses and severed limbs now decay in their own special way. + - Fixed up the sample flu and cold so they don't permanently affect a + a player's stats. Added a very nasty rage virus. + - Ftpd and httpd now work (Thanks to Duuk @ Haven). To enable them, uncomment + inet in /secure/cfg/preload.cfg. They are UNSUPPORTED, and if they ruin + your life, it's not my problem. System security is on you. + - Added valid_link() to master.c so that link() efun works. An interactive, + privileged, nonforced object is required in the previous_object() stack + to avoid abuse. Do NOT use this functionality unless you know EXACTLY + what you're doing. It probably doesn't work the way you think it does. + Be especially careful not to link privileged files to directories that + unprivileged users have write access to. Windows users should just + forget they read any of this. + - Verbified dest command. Peculiar "desting of nonexistent things" bug + should be dead at long last. + - Golems can have their composition specified. As an example, the combat + dummy is now a wood golem. + - Creatures born without limbs are now able to fight while in their + natural prone position. Creatures who used to have limbs and no longer + do have more limited options. + - SetUnique() now does what common sense requires. + + ---- 2.0r10 --- + - Fixed a problem in the death system that allowed creators to + be undead without quite realizing it. + - Fixed miscellaneous minor gotchas in the sample town. + - Added commands: lightme, quests. + - Tweaked miscellaneous commands. + - Fixed germs, added germ testing lab east of the wiz hall. + + ---- 2.0r9 --- + - Added a channel for kills notices. + - Miscellaneous fixes, tweak, etc. + - Fixed channels bug that changed lognames if someone was listening + to a channel. Now both log. + - Encre now forces the new creator to quit. This is necessary in order + to enable certain characteristics of their new body. + - Fixed a truly vile room bug that leaked objects and memory. + - Added reaper daemon to clean up junk from memory. + - Fixed multiple bugs in lighting system. + - Added light meter to creators' chest. + - Removed roommaker from creators' chest. + - Fixed remaining goto command problem. + - Set EXTRA_TIME_OFFSET in /secure/include/config.h to 0. + - Fixed bug in rescue login. Creators now can use it. + - Reorganized efun man pages and added missing efun and sefun docs. + - Added flying system. + - QCS feature add: you can now add includes and inherits. + - QCS fix: modify delete now works properly. + - Added numerous new directives to QCS. + - Added lib object check and NoModify checks to QCS verbs. + - Fixed object manipulation: creatures without prehensile appendages can + no longer accept or manipulate objects. If a creator somehow + manages to lose both hands they can use the "heal" command to fully + restore themselves. + - Fixed a variety of body related issues with races, created a + menagerie of sample npc's for testing. + - Fixed stealing system, added thief class. + - Miscellaneous lib object fixes and additions (eg SetAction now + takes mixed arrays, new SetPermitLoad lfun on npc's, some npc move + messages fixed, etc). + + ---- 2.0r8 --- + - Added intermud announcements to arch room (/secure/room/arch). + - Fixed bug in targeted intermud emotes. + - Channels now log without needing to have a player listening. + - Admin channel now logs to /secure/log + - Fixed lib/std/book.c bug that failed horribly if there was a hidden + file in the text source directory. + - Extensive code cleanup of unused variables. + - Miscellaneous tweaks to sample domain. + - Added tighter restriction to "no teleport" property in rooms. + - Miscellaneous fixes of verb code. + - Modified wrap() sefun to output truncated text rather than just + error out when buffer overflows. + - Added arch command. + - Added EXTRA_TIME_OFFSET parameter to /secure/include/config.h to + accommodate OS'es with peculiar timekeeping. + - Changed local_options to avoid excessive warning messages in /log/errors. + This is only useful if doing a new install of Dead Souls, or + if you copy local_options from the full distribution and recompile + the driver. For the Windows version, all that is needed is to + copy the new driver.exe over the old one, if you're doing an upgrade. + - Rescue login feature added. If when you try to log in, everything + goes to hell, try logging in adding "_rescue" to your name, which + in my case is: cratylus_rescue + - For admins, eval now writes the temp file to /secure, to avoid + annoying /realms dir permission conflicts. + - Cleaned up goto and dest command ugliness. + - Modified reload command and reload() sefun not to perform recursive + updates by default. This should speed up QCS response time and cut + down on mud-wide lag. + - Added some directives to QCS. + + ---- 2.0r7 --- + - Added sample virtual forest to town area. + - Added intermud list of Dead Souls muds to arch room ("read screen"). + - Added mudtime and ticktock commands, and tweaked the time system. + - Updated documentation. + - Added Tim's imc2 client. Doesn't quite work yet. Suggestions welcome. + - Created ds intermud channels ds and ds_test. Enabled ds for cres + by default (i3 names: dead_souls, dead_test4). + - Balanced/fixed attack spells a bit. + - Fixed QCS bug that prevented barkeeps from having stuff added + to their inventories. + - Made it harder to join the mages (The game is too hard for a + first level mage). + - Fixed a bug that made Herkimer a cheat. + - Applied workaround for a bug in Clepius. + + ---- 2.0r6 --- + - Added manuals and such to first admin logon. + - Cleaned up miscellaneous login quirks. + - Got rid of that pesky elog message at startup. + - Updated news files. + + ---- 2.0r5 --- + - Fixed problem with loading a working handbook on first login. + - Fixed QCS bug of reloading files instead of objects. + - Added CREDITS file. + + ---- 2.0r4 --- + - Nailed down nasty bug that overwrote rooms when creating an enter. + - Fixed a bug in "give" code that prevented giving of money. + - Fixed door bug that prevented proper setting of SetLocked and SetClosed. + - Updated some minor documentation unclarities. + - Modified reload() sefun and update command, as well as LastLocation + settings to avoid unnecesary teleportation when reloading objects. + - Modified donate verb and lib object to behave more sanely. + - QCS code cleanup and tightening, also added inits to templates. + - Tightened up sample town code. + - Added Players Handbook + + ---- 2.0r3 --- + - Added workaround for Windows time-of-day problem. + - Fixed minor QCS issues. + + ---- 2.0r2 --- + - Many QCS fixes and updates. + - Added doors and meals to QCS. + - Added thorough QCS documentation: /doc/manual/chapter31 and above. + + ---- 2.0r1 --- + - Fixed peculiar "multiple doors in a room" bug. + diff -c -r --new-file ds2.0r18/lib/doc/efun/all/explode ds2.0r20b/lib/doc/efun/all/explode *** ds2.0r18/lib/doc/efun/all/explode Mon Jan 23 09:17:12 2006 --- ds2.0r20b/lib/doc/efun/all/explode Thu Apr 13 21:03:32 2006 *************** *** 11,16 **** --- 11,17 ---- by spaces) in the string 'str'. See also: + implode, sscanf, replace_string, strsrch diff -c -r --new-file ds2.0r18/lib/doc/efun/strings/explode ds2.0r20b/lib/doc/efun/strings/explode *** ds2.0r18/lib/doc/efun/strings/explode Mon Jan 23 09:17:12 2006 --- ds2.0r20b/lib/doc/efun/strings/explode Thu Apr 13 21:03:32 2006 *************** *** 11,16 **** --- 11,17 ---- by spaces) in the string 'str'. See also: + implode, sscanf, replace_string, strsrch diff -c -r --new-file ds2.0r18/lib/doc/sefun/debug ds2.0r20b/lib/doc/sefun/debug *** ds2.0r18/lib/doc/sefun/debug Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/doc/sefun/debug Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,28 ---- + + DEBUG(1) DEBUG(1) + + NAME + debug() - Generates messages useful for debugging. + + SYNOPSIS + varargs void debug(mixed msg, mixed var, string color) + + DESCRIPTION + This command sends 'msg' to all users() who have + enabled receipt of debug info with the debug command. The + optional 'var' is stringified and included in the message. + The optional 'color' indicates what color the message + should be. + + EXAMPLE + + In a misbehaving npc: + debug("This npc's skills are: ",this_object()->GetSkills(),"red"); + + LOCATION + /secure/sefun/communications.c + + Author + Cratylus @ Dead Souls + + 1 diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/meal/ale.c ds2.0r20b/lib/domains/Ylsrim/meal/ale.c *** ds2.0r18/lib/domains/Ylsrim/meal/ale.c Mon Nov 7 13:29:44 2005 --- ds2.0r20b/lib/domains/Ylsrim/meal/ale.c Thu Apr 6 22:53:15 2006 *************** *** 15,20 **** --- 15,21 ---- SetShort("a bottle of ale"); SetLong("A nice bottle of Lars' famous Ylsrim Ale."); SetMass(60); + SetBaseCost("electrum", 20); SetMealType(MEAL_DRINK | MEAL_ALCOHOL); SetStrength(10); SetMealMessages("You drink a wonderful bottle of Ylsrim Ale.", *************** *** 23,25 **** --- 24,29 ---- SetEmptyShort("an empty bottle of Ylsrim Ale"); SetEmptyLong("It is an empty brown bottle that once held some ale."); } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/npc/lars.c ds2.0r20b/lib/domains/Ylsrim/npc/lars.c *** ds2.0r18/lib/domains/Ylsrim/npc/lars.c Mon Nov 7 13:29:44 2005 --- ds2.0r20b/lib/domains/Ylsrim/npc/lars.c Thu Apr 6 22:53:15 2006 *************** *** 31,35 **** // He takes electrum SetLocalCurrency("electrum"); // What he sells ! SetMenuItems(([ "ale" : "/domains/Ylsrim"+ "/meal/ale" ])); } --- 31,40 ---- // He takes electrum SetLocalCurrency("electrum"); // What he sells ! SetMenuItems(([ ! ({ "ale", "beer" }) : "/domains/Ylsrim/meal/ale", ! ])); ! } ! void init(){ ! ::init(); } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/obj/stargate.c ds2.0r20b/lib/domains/Ylsrim/obj/stargate.c *** ds2.0r18/lib/domains/Ylsrim/obj/stargate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/Ylsrim/obj/stargate.c Thu Apr 13 21:12:48 2006 *************** *** 0 **** --- 1,28 ---- + #include + #include + #include "/lib/include/stargate.h" + + inherit LIB_STARGATE; + + int readScreen(); + + void create() + { + ::create(); + setOrigin("tower", "/domains/Ylsrim/room/tower"); + SetRead(([ ({ "screen" }) : (: readScreen :) ]) ); + SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) ); + } + + void init() + { + ::init(); + } + + int readScreen() + { + write("stargate network status\n"); + write("-----------------------\n"); + write("\n"); + + } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/room/furnace.c ds2.0r20b/lib/domains/Ylsrim/room/furnace.c *** ds2.0r18/lib/domains/Ylsrim/room/furnace.c Mon Jan 23 09:15:29 2006 --- ds2.0r20b/lib/domains/Ylsrim/room/furnace.c Wed Apr 12 23:47:49 2006 *************** *** 7,24 **** room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are periodically "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 360, load_object(base_name(this_object()))); SetNoModify(1); } int CanReceive(object ob){ return 1; } void init(){ ::init(); } --- 7,36 ---- room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 600, load_object(base_name(this_object()))); ! set_heart_beat(1); SetNoModify(1); } int CanReceive(object ob){ + if(interactive(ob)){ + tell_object(ob, "You fail to enter the furnace."); + return 0; + } return 1; } void init(){ ::init(); } + void heart_beat(){ + if(sizeof(all_inventory(this_object()))){ + foreach(object ob in deep_inventory(this_object())){ + ob->eventDestruct(); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/room/pub.c ds2.0r20b/lib/domains/Ylsrim/room/pub.c *** ds2.0r18/lib/domains/Ylsrim/room/pub.c Wed Jan 11 23:08:48 2006 --- ds2.0r20b/lib/domains/Ylsrim/room/pub.c Sun Apr 9 23:49:20 2006 *************** *** 13,31 **** // the menu int readMenu(object who, string str) { string array tmp = ({ sprintf("%:-20s %:-7s", "Drink", "Cost") }); object ob = present("lars"); if( !ob ) { // lars is dead! ! who->eventPrint("The menu is too bloodstained to read."); return 1; } ! foreach(string item in keys(ob->GetMenuItems())) { ! tmp += ({ sprintf("%:-20s %:-7d electrum", capitalize(item), ! ob->GetCost(item)) }); } // show the menu a page at a time ! who->eventPage(tmp, MSG_SYSTEM); // MSG_SYSTEM means ignore blocking return 1; } static void create() { --- 13,37 ---- // the menu int readMenu(object who, string str) { + string array tmp2 = ({}); string array tmp = ({ sprintf("%:-20s %:-7s", "Drink", "Cost") }); object ob = present("lars"); if( !ob ) { // lars is dead! ! this_player()->eventPrint("The menu is too bloodstained to read."); return 1; } ! foreach(string *item in keys(ob->GetMenuItems())) { ! tmp += ({ sprintf("%:-20s %d electrum", capitalize(item[0]), ! to_int(ob->GetCost(item))) }); } + foreach(string element in tmp){ + element = translate(element, this_player()->GetLanguageLevel("Edhellen")); + tmp2 += ({ element }); + } + tmp = tmp2; // show the menu a page at a time ! this_player()->eventPage(tmp, MSG_SYSTEM); // MSG_SYSTEM means ignore blocking return 1; } static void create() { *************** *** 40,45 **** --- 46,55 ---- "with a hodge-podge of writing in all different languages " "covering the wall. A menu of drinks is about the only " "readable thing on the wall. If you read Edhellen."); + SetLanguage("Edhellen"); + SetInventory(([ + "/domains/Ylsrim/npc/lars" : 1, + ])); SetListen("Rowdy party sounds make it hard to hear anything else."); SetSmell("The place smells like it is soaked in ale."); AddItem(({ "tables", "stools" }), "The tables and stools begin " *************** *** 53,59 **** SetObviousExits("e"); SetExits(([ "east" : "/domains/Ylsrim/room/"+ "s_bazaar" ])); // Bring in the Bar Keep - SetInventory(([ "/domains/Ylsrim"+ "/npc/lars" : 1 ])); // make the writing and the menu readable SetRead("writing", (: readMenu :)); SetRead("menu", (: readMenu :)); --- 63,68 ---- diff -c -r --new-file ds2.0r18/lib/domains/Ylsrim/room/tower.c ds2.0r20b/lib/domains/Ylsrim/room/tower.c *** ds2.0r18/lib/domains/Ylsrim/room/tower.c Mon Nov 7 13:29:44 2005 --- ds2.0r20b/lib/domains/Ylsrim/room/tower.c Thu Apr 13 21:03:39 2006 *************** *** 26,40 **** "heart of the hall." ]) ); SetObviousExits("d"); SetExits( ([ "down" : "/domains/Ylsrim/room/"+ "adv_hall" ]) ); - //AddJump("road", "/domains/Ylsrim/room/"+ "kaliid4", JUMP_INTO); - //AddJump("kaliid road", "/domains/Ylsrim/room/"+ "kaliid4", JUMP_INTO); - //AddJump("tower", "/domains/Ylsrim/room/"+ "kaliid4", JUMP_FROM); - SetJump( ([ - "road" : ({ "/domains/Ylsrim/room/kaliid4", JUMP_INTO }), - "kaliid road" : ({ "/domains/Ylsrim/room/kaliid4", JUMP_INTO }), - "tower" : ({ "/domains/Ylsrim/room/kaliid4", JUMP_FROM }), - ]) ); } void init(){ ::init(); --- 26,35 ---- "heart of the hall." ]) ); SetObviousExits("d"); SetExits( ([ "down" : "/domains/Ylsrim/room/"+ "adv_hall" ]) ); + SetInventory(([ + "/domains/Ylsrim/obj/stargate" : 1, + ])); } void init(){ ::init(); diff -c -r --new-file ds2.0r18/lib/domains/default/armor/robe.c ds2.0r20b/lib/domains/default/armor/robe.c *** ds2.0r18/lib/domains/default/armor/robe.c Sun Jan 29 23:45:31 2006 --- ds2.0r20b/lib/domains/default/armor/robe.c Sun Apr 9 23:49:20 2006 *************** *** 10,20 **** SetAdjectives(({"wizard","wizard's","soft"})); SetShort("a robe"); SetLong("This is a large, comfortable-looking robe, like a wizard might wear. It has many pockets and compartments for holding things."); - SetCanClose(1); - SetMaxCarry(500); SetProperties(([ "no steal" : 1, ])); SetMass(200); SetBaseCost("silver",100); SetDamagePoints(100); --- 10,21 ---- SetAdjectives(({"wizard","wizard's","soft"})); SetShort("a robe"); SetLong("This is a large, comfortable-looking robe, like a wizard might wear. It has many pockets and compartments for holding things."); SetProperties(([ + "gamma" : 3, "no steal" : 1, ])); + SetCanClose(1); + SetMaxCarry(5000); SetMass(200); SetBaseCost("silver",100); SetDamagePoints(100); diff -c -r --new-file ds2.0r18/lib/domains/default/armor/wizard_hat.c ds2.0r20b/lib/domains/default/armor/wizard_hat.c *** ds2.0r18/lib/domains/default/armor/wizard_hat.c Wed Feb 22 15:29:51 2006 --- ds2.0r20b/lib/domains/default/armor/wizard_hat.c Wed Apr 5 19:33:16 2006 *************** *** 12,17 **** --- 12,20 ---- SetLong("This is a large, floppy hat with a wide brim all "+ "around it, and a conical center. It is dark blue in color, "+ "and is decorated with pictures of yellow moons and stars."); + SetProperties(([ + "beta" : 2, + ])); SetMass(50); SetBaseCost("silver",500); SetDamagePoints(100); diff -c -r --new-file ds2.0r18/lib/domains/default/obj/chest.c ds2.0r20b/lib/domains/default/obj/chest.c *** ds2.0r18/lib/domains/default/obj/chest.c Mon Jan 23 08:51:33 2006 --- ds2.0r20b/lib/domains/default/obj/chest.c Thu Apr 6 22:53:15 2006 *************** *** 9,26 **** SetShort("a wooden chest"); SetLong("This is a sturdy wooden chest used to store valuable items."); SetInventory(([ - "/secure/obj/control" : 1, "/domains/default/armor/wizard_hat" : 1, "/domains/default/armor/robe" : 1, "/domains/town/armor/collar" : 1, "/secure/obj/machine" : 1, - "/domains/default/armor/badge" : 1, - "/domains/default/obj/manual" : 1, - "/secure/obj/memo" : 1, - "/domains/default/obj/meter" : 1, - "/domains/town/obj/pack" : 1, "/secure/obj/medtric" : 1, ! "/secure/obj/staff" : 1, ])); SetMass(2000); SetBaseCost(50); --- 9,27 ---- SetShort("a wooden chest"); SetLong("This is a sturdy wooden chest used to store valuable items."); SetInventory(([ "/domains/default/armor/wizard_hat" : 1, + "/domains/town/obj/pack" : 1, + "/domains/default/obj/meter" : 1, + "/domains/default/armor/badge" : 1, "/domains/default/armor/robe" : 1, + "/secure/obj/memo" : 1, + "/domains/default/obj/pinger" : 1, + "/domains/default/obj/manual" : 1, "/domains/town/armor/collar" : 1, + "/secure/obj/staff" : 1, "/secure/obj/machine" : 1, "/secure/obj/medtric" : 1, ! "/secure/obj/control" : 1, ])); SetMass(2000); SetBaseCost(50); diff -c -r --new-file ds2.0r18/lib/domains/default/obj/pinger.c ds2.0r20b/lib/domains/default/obj/pinger.c *** ds2.0r18/lib/domains/default/obj/pinger.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/default/obj/pinger.c Thu Apr 6 22:53:15 2006 *************** *** 0 **** --- 1,59 ---- + #include + #include + inherit LIB_ITEM; + + int count = 0; + int interval = 0; + string keepalive = ""; + + void create(){ + ::create(); + + SetKeyName("pinger"); + SetId( ({"thing"}) ); + SetAdjectives( ({"keepalive"}) ); + SetShort("a keepalive pinger"); + SetLong("This thing can be set to periodically output a string, " + "with the purpose of keeping fickle telnet connections up. " + "\nTo set the interval: interval \n" + "To set the string: keepalive "); + SetNoCondition(1); + SetMass(20); + SetBaseCost("silver",10); + set_heart_beat(1); + SetVendorType(VT_TREASURE); + } + + int SetInterval(string str){ + interval = atoi(str); + if(!intp(interval)){ + write("That is not a valid integer."); + return 1; + } + + write("Interval set to "+interval+" heartbeats."); + return 1; + } + + int SetKeepalive(string str){ + if(!str || str == "") keepalive = "\n"; + else keepalive = str; + write("Keepalive set."); + return 1; + } + + void init(){ + ::init(); + add_action("SetInterval","interval"); + add_action("SetKeepalive","keepalive"); + } + + void heart_beat(){ + count++; + if(interval > 0 && count > interval){ + count = 0; + if(living(environment(this_object()))){ + tell_object(environment(this_object()),keepalive); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/default/room/furnace.c ds2.0r20b/lib/domains/default/room/furnace.c *** ds2.0r18/lib/domains/default/room/furnace.c Fri Mar 24 14:36:36 2006 --- ds2.0r20b/lib/domains/default/room/furnace.c Wed Apr 12 23:47:49 2006 *************** *** 7,24 **** room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are periodically "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 60, load_object(base_name(this_object()))); SetNoModify(1); } int CanReceive(object ob){ return 1; } void init(){ ::init(); } --- 7,36 ---- room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 600, load_object(base_name(this_object()))); ! set_heart_beat(1); SetNoModify(1); } int CanReceive(object ob){ + if(interactive(ob)){ + tell_object(ob, "You fail to enter the furnace."); + return 0; + } return 1; } void init(){ ::init(); } + void heart_beat(){ + if(sizeof(all_inventory(this_object()))){ + foreach(object ob in deep_inventory(this_object())){ + ob->eventDestruct(); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/town/npc/bugg.c ds2.0r20b/lib/domains/town/npc/bugg.c *** ds2.0r18/lib/domains/town/npc/bugg.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/town/npc/bugg.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,25 ---- + #include + + inherit LIB_TEACHER; + void create(){ + teacher::create(); + SetKeyName("bugg"); + SetId( ({"teacher","dwarf","schoolteacher","bugg the schoolteacher"}) ); + SetGender("male"); + SetRace("dwarf"); + SetNativeLanguage("english"); + SetShort("Bugg the schoolteacher"); + SetLong("This is a person whose job it is to teach you things. "+ + "For example, 'ask teacher "+ + "to teach Malkierien' would prompt him to begin teaching a Malkierien "+ + "lesson to you, if he knows the language and you have "+ + "earned sufficient training points. If you lack training points, then "+ + "do some adventuring and earn a level promotion. You will "+ + "then be awarded training points."); + SetLevel(1); + SetLanguage("Malkierien", 100); + AddTeachingLanguages( ({"Malkierien", "English" }) ); + } + void init() { + ::init(); + } diff -c -r --new-file ds2.0r18/lib/domains/town/obj/fleas.c ds2.0r20b/lib/domains/town/obj/fleas.c *** ds2.0r18/lib/domains/town/obj/fleas.c Sat Mar 11 11:15:11 2006 --- ds2.0r20b/lib/domains/town/obj/fleas.c Wed Apr 12 23:47:50 2006 *************** *** 63,70 **** int eventSuffer(){ int x; x=random(500); ! if(x < 2) environment()->eventForce("sneeze"); ! else if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); --- 63,69 ---- int eventSuffer(){ int x; x=random(500); ! if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); *************** *** 94,106 **** int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+objective(this_player())+"self.", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+objective(this_player())+"self in a frenzy, ripping "+ ! possessive(this_player())+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; --- 93,105 ---- int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+reflexive(victim)+".", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+reflexive(victim)+" in a frenzy, ripping "+ ! possessive(victim)+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; diff -c -r --new-file ds2.0r18/lib/domains/town/obj/lice.c ds2.0r20b/lib/domains/town/obj/lice.c *** ds2.0r18/lib/domains/town/obj/lice.c Sat Mar 11 11:15:11 2006 --- ds2.0r20b/lib/domains/town/obj/lice.c Wed Apr 12 23:47:50 2006 *************** *** 61,68 **** int eventSuffer(){ int x; x=random(500); ! if(x < 2) environment()->eventForce("sneeze"); ! else if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); --- 61,67 ---- int eventSuffer(){ int x; x=random(500); ! if(x < 5) damage1(); else if(x < 10) damage2(); else if(x < 15) damage3(); else if(x < 20) damage4(); *************** *** 92,104 **** int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+objective(this_player())+"self.", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+objective(this_player())+"self in a frenzy, ripping "+ ! possessive(this_player())+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; --- 91,103 ---- int damage2(){ tell_object(victim,"You involuntarily start scratching at the maddening itch."); ! tell_room(environment(victim),victimname+" scratches desperately at "+reflexive(victim)+".", ({victim}) ); return 1; } int damage3(){ ! tell_room(environment(victim),victimname+" scratches at "+reflexive(victim)+" in a frenzy, ripping "+ ! possessive(victim)+" flesh and drawing blood.", ({victim}) ); tell_object(victim,"You scratch at yourself in a mad frenzy, ripping flesh and drawing blood."); if(DangerLevel() != 100) victim->eventReceiveDamage(this_object(),DISEASE,random(5)+4,0,"torso"); return 1; diff -c -r --new-file ds2.0r18/lib/domains/town/room/furnace.c ds2.0r20b/lib/domains/town/room/furnace.c *** ds2.0r18/lib/domains/town/room/furnace.c Fri Mar 24 14:36:38 2006 --- ds2.0r20b/lib/domains/town/room/furnace.c Wed Apr 12 23:47:50 2006 *************** *** 7,24 **** room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are periodically "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 60, load_object(base_name(this_object()))); SetNoModify(1); } int CanReceive(object ob){ return 1; } void init(){ ::init(); } --- 7,36 ---- room::create(); SetAmbientLight(30); SetShort("the furnace"); ! SetLong("The furnace. Things that arrive here are "+ "incinerated. You probably shouldn't be here. Go down to get out."); SetProperties(([ "no attack" : 1, ])); SetExits( ([ "down" : ROOM_START ]) ); ! call_out((: reload_room :), 600, load_object(base_name(this_object()))); ! set_heart_beat(1); SetNoModify(1); } int CanReceive(object ob){ + if(interactive(ob)){ + tell_object(ob, "You fail to enter the furnace."); + return 0; + } return 1; } void init(){ ::init(); } + void heart_beat(){ + if(sizeof(all_inventory(this_object()))){ + foreach(object ob in deep_inventory(this_object())){ + ob->eventDestruct(); + } + } + } diff -c -r --new-file ds2.0r18/lib/domains/town/room/hall.c ds2.0r20b/lib/domains/town/room/hall.c *** ds2.0r18/lib/domains/town/room/hall.c Wed Jan 4 20:42:53 2006 --- ds2.0r20b/lib/domains/town/room/hall.c Wed Dec 31 19:00:00 1969 *************** *** 1,25 **** - #include - inherit LIB_ROOM; - - static void create() { - room::create(); - SetClimate("outdoors"); - SetAmbientLight(30); - SetShort("copy of vill_road3.c"); - SetLong("A long road going through the village." + - "Town Hall is north. The main part of the town "+ - "is west of here. The post office is south."); - SetItems(([ - ({ "town hall", "hall" }) : "A place to conduct official business.", - ({ "post office", "office", "post" }) : "A place to send and receive mail.", - ])); - SetExits(([ - ])); - - SetEnters( ([ - "office" : "/domains/town/room/postoffice.c", - ]) ); - } - void init(){ - ::init(); - } --- 0 ---- diff -c -r --new-file ds2.0r18/lib/domains/town/room/school.c ds2.0r20b/lib/domains/town/room/school.c *** ds2.0r18/lib/domains/town/room/school.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/town/room/school.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,31 ---- + #include + inherit LIB_ROOM; + + static void create() { + room::create(); + SetTown("town"); + SetClimate("indoors"); + SetAmbientLight(30); + SetShort("Village Schoolhouse"); + SetLong("This simple, one-room schoolhouse is not especially large but it is clean, well-maintained, and clearly an important part of village life. People come here to be taught, mostly languages, by traveling teachers and guest lecturers."); + SetProperties (([ + "no attack":1, + "no bump":1, + "no steal":0, + "no magic":0, + "no paralyze":0, + "no teleport":0])); + SetItems(([])); + SetInventory(([ + "/domains/town/npc/bugg" : 1, + ])); + SetExits(([ + "south" : "/domains/town/room/vill_road4", + ])); + + } + void init() { + ::init(); + SetSmell(([])); + SetListen(([])); + } diff -c -r --new-file ds2.0r18/lib/domains/town/room/shore.c ds2.0r20b/lib/domains/town/room/shore.c *** ds2.0r18/lib/domains/town/room/shore.c Mon Nov 7 13:30:39 2005 --- ds2.0r20b/lib/domains/town/room/shore.c Wed Apr 5 19:33:17 2006 *************** *** 1,5 **** --- 1,6 ---- #include inherit LIB_ROOM; + static void create() { room::create(); SetClimate("outdoors"); *************** *** 8,14 **** SetLong("You are on the shore, at the far eastern end of town. " "A road travels west into the heart of town. "); SetExits( ([ ! "west" : "/domains/town/room/vill_road3", ]) ); ! SetObviousExits("w"); } --- 9,17 ---- SetLong("You are on the shore, at the far eastern end of town. " "A road travels west into the heart of town. "); SetExits( ([ ! "west" : "/domains/town/room/vill_road4.c", ]) ); ! } ! void init(){ ! ::init(); } diff -c -r --new-file ds2.0r18/lib/domains/town/room/vill_road3.c ds2.0r20b/lib/domains/town/room/vill_road3.c *** ds2.0r18/lib/domains/town/room/vill_road3.c Thu Jan 5 00:17:31 2006 --- ds2.0r20b/lib/domains/town/room/vill_road3.c Wed Apr 5 19:33:17 2006 *************** *** 12,26 **** ({ "building", "buildings" }) : "Structures designed for human occupancy.", ({ "hall", "town hall" }) : "This is the modest building where official town business takes place.", ])); - SetEnters( ([ - "town hall" : "/domains/town/room/thall", - "office" : "/domains/town/room/postoffice.c", - ]) ); SetExits( ([ ! "east" : "/domains/town/room/shore", "west" : "/domains/town/room/vill_road2", "north" : "/domains/town/room/thall", ! "south" : "/domains/town/room/postoffice", ]) ); } void init(){ --- 12,26 ---- ({ "building", "buildings" }) : "Structures designed for human occupancy.", ({ "hall", "town hall" }) : "This is the modest building where official town business takes place.", ])); SetExits( ([ ! "south" : "/domains/town/room/postoffice", "west" : "/domains/town/room/vill_road2", "north" : "/domains/town/room/thall", ! "east" : "/domains/town/room/vill_road4.c", ! ]) ); ! SetEnters( ([ ! "town hall" : "/domains/town/room/thall", ! "office" : "/domains/town/room/postoffice.c", ]) ); } void init(){ diff -c -r --new-file ds2.0r18/lib/domains/town/room/vill_road4.c ds2.0r20b/lib/domains/town/room/vill_road4.c *** ds2.0r18/lib/domains/town/room/vill_road4.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/domains/town/room/vill_road4.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,26 ---- + #include + inherit LIB_ROOM; + + static void create() { + room::create(); + SetClimate("outdoors"); + SetAmbientLight(30); + SetShort("Village Path"); + SetLong("As it travels from west to east, Village Road becomes less of a road here and more of a dirt path. The shore of the eastern sea is almost visible from here. The village schoolhouse is north, and the shore is east."); + SetItems(([ + ({ "building", "schoolhouse", "school", "village school", "village schoolhouse" }) : "A small but well-kept wooden building where townsfolk and their children go to acquire knowledge.", + ({ "building", "buildings" }) : "Structures designed for human occupancy.", + ({ "shore", "village shore" }) : "The shore of the eastern sea is east of here.", + ])); + SetExits( ([ + "west" : "/domains/town/room/vill_road3", + "east" : "/domains/town/room/shore", + "north" : "/domains/town/room/school.c", + ]) ); + SetEnters( ([ + ]) ); + + } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r18/lib/domains/town/room/voters.c ds2.0r20b/lib/domains/town/room/voters.c *** ds2.0r18/lib/domains/town/room/voters.c Mon Dec 12 19:51:56 2005 --- ds2.0r20b/lib/domains/town/room/voters.c Wed Apr 12 23:47:50 2006 *************** *** 28,35 **** SetInventory(([ ])); AddExit("west", "/domains/town/room/thall"); - //funs - //snuf } mixed ReadList() { --- 28,33 ---- *************** *** 47,58 **** if( VOTING_D->GetStatus() == VOTE_NOT_RUNNING ) { ! this_player()->eventPrint("\nSince the elections are not " ! "currently running, the list is blank."); return 1; } ! msg = "\n\tCandidates for Dead Souls Offices\n\n"; foreach( string sClass in CLASSES_D->GetClasses() ) { msg += capitalize( sClass ) + " : "; --- 45,56 ---- if( VOTING_D->GetStatus() == VOTE_NOT_RUNNING ) { ! this_player()->eventPrint(VOTING_D->GetCurrentCouncil()); return 1; } ! msg = VOTING_D->GetCurrentCouncil(); ! msg += "\n\tCandidates for Dead Souls Offices\n\n"; foreach( string sClass in CLASSES_D->GetClasses() ) { msg += capitalize( sClass ) + " : "; *************** *** 121,128 **** break; case VOTE_MODE_CANDIDATES : ! this_player()->eventPrint("Voting has not yet started, " ! "nominate a candidate instead."); break; case VOTE_NOT_PRIMARY : --- 119,127 ---- break; case VOTE_MODE_CANDIDATES : ! this_player()->eventPrint("Voting has not yet started. We are " ! "still nominating candidates. Please nominate a candidate " ! "instead."); break; case VOTE_NOT_PRIMARY : diff -c -r --new-file ds2.0r18/lib/domains/town/weap/gstaff.c ds2.0r20b/lib/domains/town/weap/gstaff.c *** ds2.0r18/lib/domains/town/weap/gstaff.c Mon Nov 7 13:30:39 2005 --- ds2.0r20b/lib/domains/town/weap/gstaff.c Wed Apr 12 23:47:50 2006 *************** *** 3,8 **** --- 3,9 ---- #include inherit LIB_ITEM; + inherit LIB_CLAN; static void create(){ item::create(); SetKeyName("golden staff"); diff -c -r --new-file ds2.0r18/lib/include/stargate.h ds2.0r20b/lib/include/stargate.h *** ds2.0r18/lib/include/stargate.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/include/stargate.h Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,20 ---- + /** + * + * $Id: stargate.h,v 1.1 2006/04/05 05:48:39 jam Exp $ + * + */ + + #ifndef startgate_h + #define stargate_h + + #define GATE_TIMEOUT (10+random(5)) + + // address (i.e. "sgc") is a key in a mapping in the stargate daemon so it is not included here + class stargate + { + string status; + string destination; + string endpoint; + } + + #endif diff -c -r --new-file ds2.0r18/lib/lib/blank_pile.c ds2.0r20b/lib/lib/blank_pile.c *** ds2.0r18/lib/lib/blank_pile.c Mon Nov 7 13:28:59 2005 --- ds2.0r20b/lib/lib/blank_pile.c Fri Apr 14 18:27:24 2006 *************** *** 6,12 **** --- 6,16 ---- int PileAmount = 0; static void create() { + string *saveds; item::create(); + saveds = item::GetSave(); + saveds += ({ "PileType", "PileAmount" }); + AddSave( saveds ); SetKeyName("money"); } diff -c -r --new-file ds2.0r18/lib/lib/body.c ds2.0r20b/lib/lib/body.c *** ds2.0r18/lib/lib/body.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/lib/body.c Wed Apr 12 23:47:53 2006 *************** *** 8,13 **** --- 8,14 ---- */ #include + #include #include #include #include *************** *** 31,37 **** private float StaminaPoints; private string Torso, Biter; private mapping Fingers, Limbs, MissingLimbs; ! private static int Dying, LastHeal; private static function Protect; private static mapping WornItems; private static class MagicProtection *Protection; --- 32,38 ---- private float StaminaPoints; private string Torso, Biter; private mapping Fingers, Limbs, MissingLimbs; ! private static int Dying, LastHeal, Encumbrance; private static function Protect; private static mapping WornItems; private static class MagicProtection *Protection; *************** *** 66,71 **** --- 67,85 ---- ExtraChannels = ({}); } + int GetEncumbrance(){ + int encumbrance = 0; + object *stuff = filter(all_inventory(this_object()), (: !($1->GetWorn()) :) ); + + //tc("ENABLE_ENCUMBRANCE: "+ENABLE_ENCUMBRANCE,"cyan"); + if(!(ENABLE_ENCUMBRANCE) || inherits(LIB_NPC,this_object()) ) return encumbrance; + //tc("bad encumbrance","red"); + if(sizeof(stuff)) foreach(object item in stuff) + encumbrance += item->GetMass(); + if(sizeof(stuff)) encumbrance *= sizeof(stuff); + return encumbrance; + } + string SetBodyComposition(string str){ if(!str) return ""; else BodyComposition = str; *************** *** 693,698 **** --- 707,721 ---- return 1; } + string *GetEquippedLimbs(){ + string *equipped_limbs = ({}); + object *wornstuff = filter(all_inventory(this_object()), (: $1->GetWorn() :) ); + + foreach(object item in wornstuff){ + equipped_limbs += item->GetWorn(); + } + return equipped_limbs; + } /************ /lib/body.c Data manipulation functions *************/ void NewBody(string race) { if(!race) *************** *** 982,987 **** --- 1005,1015 ---- return 1; } + int HealLimb(string limb){ + Limbs[limb]["health"] = GetMaxHealthPoints(limb); + return Limbs[limb]["health"]; + } + int RestoreLimb(string limb) { if( !MissingLimbs[limb] ) return 0; Limbs[limb] = MissingLimbs[limb]; diff -c -r --new-file ds2.0r18/lib/lib/clan.c ds2.0r20b/lib/lib/clan.c *** ds2.0r18/lib/lib/clan.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/lib/clan.c Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,162 ---- + #include + #include "include/clan.h" + + private class ClanClass Clan; + + private int isWelcomed; + + static void create() { + Clan = new(class ClanClass); + Clan->leader = 0; + Clan->name = 0; + Clan->objectName = 0; + Clan->skill = 0; + isWelcomed = 0; + } + + static void init() { + if(!present(this_object(), this_player())) return; + if((string)this_player()->GetClan() != (string)GetClanName()) return; + if((string)this_player()->GetKeyName() == (string)GetLeader()) { + add_action("eventBring", "bring"); + add_action("eventInitiate", "initiate"); + add_action("eventRetire", "retire"); + } + this_player()->eventPrint("\n"); + if(!isWelcomed) { + this_player()->AddChannel(GetClanName()); + eventWelcome(this_player()); + isWelcomed = 1; + } + } + + mixed CanJoin(object ob) { return 1; } + + string GetAffectLong(object ob) { + if(!ob || !living(ob)) return 0; + return ob->GetName() + " is a member of the " + + pluralize(GetClanName()) + "."; + } + + string SetLeader(string str) { + if(!user_exists(str)) error("No such user: " + str + + ". You must have a real leader."); + if(!stringp(Clan->leader)) + Clan->leader = str; + return Clan->leader; + } + + string GetLeader() { return Clan->leader; } + + string SetClanName(string str) { + if(!stringp(Clan->name)) Clan->name = str; + return Clan->name; + } + + string GetClanName() { return Clan->name; } + + string SetClanObject(string str) { + if(!stringp(Clan->objectName)) Clan->objectName = str; + return Clan->objectName; + } + + string GetClanObject() { return Clan->objectName; } + + string SetClanSkill(string str) { + if(!stringp(Clan->skill)) Clan->skill = str; + return Clan->skill; + } + + string GetClanSkill() { return Clan->skill; } + + int eventBring(string str) { + object who; + + if(!str) return notify_fail("Bring whom?\n"); + who = find_player(lower_case(str)); + if(!who) + return notify_fail(who->GetName() + " is nowhere to be found.\n"); + if((string)who->GetClan() != (string)GetClanName()) + return notify_fail(who->GetName() + " is not one of you!\n"); + if( environment(who)->GetProperty("no teleport") + || environment(this_player())->GetProperty("no teleport") + || environment(this_player())->GetProperty("no magic")) + return notify_fail("A magic force blocks your powers.\n"); + if(present(who, environment(this_player()))) + return notify_fail(capitalize(str) + " is here.\n"); + if((int)this_player()->GetMagicPoints() < 70) + return notify_fail("Too low on magic power.\n"); + this_player()->AddMagicPoints(-70); + who->eventPrint("%^CYAN%^Your clan leader summons you.%^RESET%^"); + who->eventMoveLiving(environment(this_player())); + if(!present(who, environment(this_player()))) + this_player()->eventPrint("%^CYAN%^" + capitalize(str) + + " is beyond your reach.%^RESET%^"); + return 1; + } + + int eventInitiate(string str) { + object initiate; + object clanObject; + mixed ret; + + if(!str) return notify_fail("Initiate whom?\n"); + initiate = present(lower_case(str), environment(this_player())); + if(!initiate || !living(initiate)) + return notify_fail("No one of that nature here.\n"); + if(stringp(ret = CanJoin(initiate))) return notify_fail(ret); + else if(!ret) return ret; + if((int)this_player()->GetMagicPoints() < 300) + return notify_fail("Too low on magic power.\n"); + if(initiate->GetClan()) + return notify_fail("You may only initiate people without clan " + + "affiliation.\n"); + initiate->SetClan((string)GetClanName()); + initiate->SetSkill(GetClanSkill(), 1, 1); + if(clanObject = new((string)GetClanObject())) + clanObject->eventMove(initiate); + this_player()->AddMagicPoints(-300); + eventJoin(initiate); + return 1; + } + + void eventJoin(object ob) { + ob->eventPrint("%^YELLOW%^You are now a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^"); + environment(ob)->eventPrint("%^YELLOW%^" +(string)ob->GetName() + + " is now a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^", ob); + } + + int eventRetire(string str) { + object retiree; + object clanObject; + + if(!str) return notify_fail("Retire whom?\n"); + retiree = present(lower_case(str), environment(this_player())); + if(!retiree || !living(retiree)) + return notify_fail("No one of that nature here.\n"); + if((string)retiree->GetClan() != (string)GetClanName()) + return notify_fail(retiree->GetName() + " is not one of us!\n"); + clanObject = present(GetClanName() + "_clan_object", retiree); + if(!clanObject) error("Problem with clan object."); + clanObject->eventDestruct(); + retiree->SetClan(0); + // retiree->SetSkill(GetClanSkill(), 1, 1); We need to remove skill here. + eventUnjoin(retiree); + return 1; + } + + void eventUnjoin(object ob) { + ob->eventPrint("%^RED%^You are no longer a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^"); + environment(ob)->eventPrint("%^RED%^" + (string)ob->GetName() + + " is no longer a member of the " + + pluralize((string)GetClanName()) + ".%^RESET%^", ob); + } + + void eventWelcome(object ob) { + ob->eventPrint("%^YELLOW%^Welcome, fellow " + (string)GetClanName() + + ".%^RESET%^"); + } + diff -c -r --new-file ds2.0r18/lib/lib/classes.c ds2.0r20b/lib/lib/classes.c *** ds2.0r18/lib/lib/classes.c Mon Jan 16 23:03:04 2006 --- ds2.0r20b/lib/lib/classes.c Wed Apr 12 23:48:35 2006 *************** *** 1,6 **** /* /lib/classes.c * from the Dead Souls LPC Library ! * classes and guild handling object * created by Descartes of Borg 950123 * Version: @(#) classes.c 1.4@(#) * Last modified: 96/12/13 --- 1,6 ---- /* /lib/classes.c * from the Dead Souls LPC Library ! * classes and clan handling object * created by Descartes of Borg 950123 * Version: @(#) classes.c 1.4@(#) * Last modified: 96/12/13 *************** *** 13,19 **** inherit LIB_ABILITIES; private int Morality; ! private string Class, Guild; private mapping SkillModifiers; private string *Religion; --- 13,19 ---- inherit LIB_ABILITIES; private int Morality; ! private string Class, Clan; private mapping SkillModifiers; private string *Religion; *************** *** 22,28 **** SkillModifiers = ([]); Religion = allocate(2); Class = 0; ! Guild = 0; Morality = 0; } --- 22,28 ---- SkillModifiers = ([]); Religion = allocate(2); Class = 0; ! Clan = 0; Morality = 0; } *************** *** 107,115 **** return (int)CLASSES_D->ClassMember(Class, class_name); } ! string SetGuild(string guild) { return (Guild = guild); } ! string GetGuild() { return Guild; } int GetBaseStatLevel(string stat) { return 0; } --- 107,115 ---- return (int)CLASSES_D->ClassMember(Class, class_name); } ! string SetClan(string clan) { return (Clan = clan); } ! string GetClan() { return Clan; } int GetBaseStatLevel(string stat) { return 0; } diff -c -r --new-file ds2.0r18/lib/lib/combat.c ds2.0r20b/lib/lib/combat.c *** ds2.0r18/lib/lib/combat.c Fri Mar 24 14:36:38 2006 --- ds2.0r20b/lib/lib/combat.c Wed Apr 12 23:48:35 2006 *************** *** 126,132 **** --- 126,137 ---- } mixed *RemoveNonTargets(mixed val){ + if(!val) val = ({}); if(!arrayp(val)) val = ({ val }); + if(!sizeof(val)){ + NonTargets = ({}); + return NonTargets; + } foreach(object member in val){ if(member_array(member,NonTargets) != -1){ NonTargets -= ({ member }); *************** *** 402,407 **** --- 407,413 ---- else { TargetLimb = limb; } + //tc("chance: "+chance); return chance; } *************** *** 428,433 **** --- 434,440 ---- else { TargetLimb = limb; } + //tc("chance: "+chance); return chance; } else { *************** *** 450,455 **** --- 457,463 ---- else { TargetLimb = limb; } + //tc("chance: "+chance); return chance; } } *************** *** 621,634 **** SendWeaponMessages(target, -1, weapon, TargetLimb); } else { // I hit, but how hard did I hit? ! int damage_type, damage, weapon_damage, actual_damage; eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus); damage_type = weapon->GetDamageType(); damage = (weapon->eventStrike(target) * pro)/(GetLevel()*2); damage = GetDamage(damage, weapon_type + " attack"); actual_damage = target->eventReceiveDamage(this_object(), damage_type, damage, 0, TargetLimb); ! if( actual_damage < 1 ) { actual_damage = 0; } weapon_damage = damage - actual_damage; --- 629,650 ---- SendWeaponMessages(target, -1, weapon, TargetLimb); } else { // I hit, but how hard did I hit? ! int damage_type, damage, weapon_damage, actual_damage, encumbrance; ! encumbrance = this_object()->GetEncumbrance(); ! //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 30){ ! //tc("feep","yellow"); ! tell_object(this_object(),"You struggle to fight while heavily encumbered."); ! } eventTrainSkill(weapon_type + " attack", pro*2, con, 1, bonus); damage_type = weapon->GetDamageType(); damage = (weapon->eventStrike(target) * pro)/(GetLevel()*2); damage = GetDamage(damage, weapon_type + " attack"); + damage -= encumbrance; + if(damage < 0) damage = 0; actual_damage = target->eventReceiveDamage(this_object(), damage_type, damage, 0, TargetLimb); ! if( actual_damage < 0 ) { actual_damage = 0; } weapon_damage = damage - actual_damage; *************** *** 706,718 **** GetCombatBonus(target->GetLevel())); } else { ! int x; ! // I hit, how hard? eventTrainSkill("melee attack", pro, con, 1, GetCombatBonus(target->GetLevel())); if(this_object()->GetMelee()) x = GetDamage(3*chance/4, "melee attack"); else x = GetDamage(3*chance/20, "melee attack"); x = target->eventReceiveDamage(this_object(), BLUNT, x, 0, TargetLimb); if( !target->GetDying() ) { --- 722,741 ---- GetCombatBonus(target->GetLevel())); } else { ! int x, encumbrance; ! encumbrance = this_object()->GetEncumbrance(); ! //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 30){ ! //tc("feep","blue"); ! tell_object(this_object(),"You struggle to fight while heavily encumbered."); ! } // I hit, how hard? eventTrainSkill("melee attack", pro, con, 1, GetCombatBonus(target->GetLevel())); if(this_object()->GetMelee()) x = GetDamage(3*chance/4, "melee attack"); else x = GetDamage(3*chance/20, "melee attack"); + x -= encumbrance; + if(x < 0) x = 0; x = target->eventReceiveDamage(this_object(), BLUNT, x, 0, TargetLimb); if( !target->GetDying() ) { *************** *** 887,898 **** if( !ob ) return; Enemies -= ({ ob }); Hostiles -= ({ ob }); } varargs int eventReceiveDamage(object agent, int type, int x, int internal, mixed limbs) { ! int hp; ! x = race::eventReceiveDamage(agent, type, x, internal, limbs); if( !Wimpy ) return x; if( (hp = GetHealthPoints()) < 1 ) return x; --- 910,928 ---- if( !ob ) return; Enemies -= ({ ob }); Hostiles -= ({ ob }); + if(!sizeof(SpecialTargets) || (!sizeof(Enemies) || !sizeof(Hostiles))) + NonTargets = ({}); } varargs int eventReceiveDamage(object agent, int type, int x, int internal, mixed limbs) { ! int hp,encumbrance; ! encumbrance = this_object()->GetEncumbrance(); ! //tc("encumbrance: "+encumbrance,"white"); ! if(encumbrance > 30){ ! //tc("feep","green"); ! tell_object(this_object(),"You try to dodge while weighed down."); ! } x = race::eventReceiveDamage(agent, type, x, internal, limbs); if( !Wimpy ) return x; if( (hp = GetHealthPoints()) < 1 ) return x; diff -c -r --new-file ds2.0r18/lib/lib/command.c ds2.0r20b/lib/lib/command.c *** ds2.0r18/lib/lib/command.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/lib/command.c Wed Apr 12 23:48:35 2006 *************** *** 26,32 **** apostrophe_exceptions += ({"say","speak","yell","whisper","shout"}); //Fix here courtesy of Jonez apostrophe_exceptions += ({"ping", "reply"}); ! SearchPath = ({ DIR_PLAYER_CMDS, DIR_SECURE_PLAYER_CMDS, DIR_GUILD_CMDS, DIR_COMMON_CMDS, DIR_SECURE_COMMON_CMDS }); } --- 26,32 ---- apostrophe_exceptions += ({"say","speak","yell","whisper","shout"}); //Fix here courtesy of Jonez apostrophe_exceptions += ({"ping", "reply"}); ! SearchPath = ({ DIR_PLAYER_CMDS, DIR_SECURE_PLAYER_CMDS, DIR_CLAN_CMDS, DIR_COMMON_CMDS, DIR_SECURE_COMMON_CMDS }); } diff -c -r --new-file ds2.0r18/lib/lib/comp/holder.c ds2.0r20b/lib/lib/comp/holder.c *** ds2.0r18/lib/lib/comp/holder.c Mon Nov 7 13:31:06 2005 --- ds2.0r20b/lib/lib/comp/holder.c Sun Apr 9 23:49:20 2006 *************** *** 82,87 **** --- 82,88 ---- return tmp; } AddCarriedMass(ob->GetMass()); + this_object()->SetMass(this_object()->GetMass() + ob->GetMass()); parse_refresh(); return 1; } *************** *** 90,96 **** int x; x = container::eventReleaseObject(ob); ! call_out((: parse_refresh :), 0); return x; } --- 91,100 ---- int x; x = container::eventReleaseObject(ob); ! //call_out((: parse_refresh :), 0); ! AddCarriedMass(-(ob->GetMass())); ! this_object()->SetMass(this_object()->GetMass() - ob->GetMass()); ! parse_refresh(); return x; } diff -c -r --new-file ds2.0r18/lib/lib/creator.c ds2.0r20b/lib/lib/creator.c *** ds2.0r18/lib/lib/creator.c Sat Mar 11 11:16:11 2006 --- ds2.0r20b/lib/lib/creator.c Wed Apr 12 23:48:35 2006 *************** *** 178,184 **** laston = GetLoginTime(); if( !player::Setup() ) return 0; ! AddChannel(({"cre", "newbie", "gossip", "ds", "death" })); AddChannel((string array)CLASSES_D->GetClasses()); if( archp() ) AddChannel( ({ "admin", "error" }) ); AddSearchPath( ({ DIR_CREATOR_CMDS, DIR_SECURE_CREATOR_CMDS }) ); --- 178,184 ---- laston = GetLoginTime(); if( !player::Setup() ) return 0; ! AddChannel(({"cre", "newbie", "gossip", "ds", "ds_test", "lpuni", "death","intergossip","intercre" })); AddChannel((string array)CLASSES_D->GetClasses()); if( archp() ) AddChannel( ({ "admin", "error" }) ); AddSearchPath( ({ DIR_CREATOR_CMDS, DIR_SECURE_CREATOR_CMDS }) ); diff -c -r --new-file ds2.0r18/lib/lib/donate.c ds2.0r20b/lib/lib/donate.c *** ds2.0r18/lib/lib/donate.c Thu Jan 5 00:17:58 2006 --- ds2.0r20b/lib/lib/donate.c Wed Apr 12 23:48:35 2006 *************** *** 16,22 **** static void init() { if( (string)this_player()->ClassMember((string)GetOwner()) || ! (string)this_player()->GetGuild() == (string)GetOwner() ) { add_action( (: eventDonate :) , "donate" ); } } --- 16,22 ---- static void init() { if( (string)this_player()->ClassMember((string)GetOwner()) || ! (string)this_player()->GetClan() == (string)GetOwner() ) { add_action( (: eventDonate :) , "donate" ); } } diff -c -r --new-file ds2.0r18/lib/lib/events/put.c ds2.0r20b/lib/lib/events/put.c *** ds2.0r18/lib/lib/events/put.c Wed Dec 7 14:03:05 2005 --- ds2.0r20b/lib/lib/events/put.c Thu Apr 13 21:03:52 2006 *************** *** 24,35 **** mixed tmp; if( (tmp = CanDrop(who)) != 1 ) return tmp; if( !environment() ) { destruct(this_object()); return 1; } ! if( environment() != this_player() ) return 0; if( !PreventPut ) return 1; if( stringp(PreventPut) && PreventPut == "PERMIT" ) return 1; if( intp(PreventPut) ) return 0; if( stringp(PreventPut) ) return PreventPut; if( objectp(PreventPut) ) { if( PreventPut == who ) return "You cannot put " + GetShort() + " anywhere."; --- 24,43 ---- mixed tmp; if( (tmp = CanDrop(who)) != 1 ) return tmp; + //debug("i dunno 1"); if( !environment() ) { destruct(this_object()); return 1; } ! //debug("i dunno 2"); ! if( environment() != this_player() && ! environment() != environment(this_player())) return 0; ! //debug("i dunno 3"); if( !PreventPut ) return 1; + //debug("i dunno 4"); if( stringp(PreventPut) && PreventPut == "PERMIT" ) return 1; + //debug("i dunno 5"); if( intp(PreventPut) ) return 0; + //debug("i dunno 6"); if( stringp(PreventPut) ) return PreventPut; + //debug("i dunno 7"); if( objectp(PreventPut) ) { if( PreventPut == who ) return "You cannot put " + GetShort() + " anywhere."; *************** *** 80,82 **** --- 88,94 ---- return CanPut(this_player()); } + mixed direct_put_wrd_wrd_word_obj(){ + return CanPut(this_player()); + } + diff -c -r --new-file ds2.0r18/lib/lib/genetics.c ds2.0r20b/lib/lib/genetics.c *** ds2.0r18/lib/lib/genetics.c Sat Mar 11 11:16:11 2006 --- ds2.0r20b/lib/lib/genetics.c Sun Apr 9 23:49:20 2006 *************** *** 99,111 **** varargs void AddStat(string stat, int base, int cls) { int level; ! if( userp(this_object()) ) level = 1; else level = GetLevel(); if( !stat || cls < 1 || cls > 5 ) return; base += ((5 - cls) * random(10)) + (3 * (level + 1))/(cls * 4); if( userp(this_object()) && base > 90 ) base = 90; else if( base > 100 ) base = 100; SetStat(stat, base, cls); } --- 99,112 ---- varargs void AddStat(string stat, int base, int cls) { int level; ! //tc("stat: "+stat+", base: "+base+", cls: "+cls,"red"); if( userp(this_object()) ) level = 1; else level = GetLevel(); if( !stat || cls < 1 || cls > 5 ) return; base += ((5 - cls) * random(10)) + (3 * (level + 1))/(cls * 4); if( userp(this_object()) && base > 90 ) base = 90; else if( base > 100 ) base = 100; + //tc("stat: "+stat+", base: "+base+", cls: "+cls,"green"); SetStat(stat, base, cls); } diff -c -r --new-file ds2.0r18/lib/lib/guild.c ds2.0r20b/lib/lib/guild.c *** ds2.0r18/lib/lib/guild.c Wed Dec 7 14:03:18 2005 --- ds2.0r20b/lib/lib/guild.c Wed Dec 31 19:00:00 1969 *************** *** 1,165 **** - - #include - #include "include/guild.h" - - class GuildClass Guild; - - //private static class GuildClass; - private int isWelcomed; - class Guild = new(class GuildClass); - - static void create() { - Guild = new(class GuildClass); - Guild->leader = 0; - Guild->name = 0; - Guild->objectName = 0; - Guild->skill = 0; - isWelcomed = 0; - } - - static void init() { - if(!present(this_object(), this_player())) return; - if((string)this_player()->GetGuild() != (string)GetGuildName()) return; - if((string)this_player()->GetKeyName() == (string)GetLeader()) { - add_action((:eventBring:), "bring"); - add_action((:eventInitiate:), "initiate"); - add_action((:eventRetire:), "retire"); - } - this_player()->eventPrint("\n"); - if(!isWelcomed) { - this_player()->AddChannel(GetGuildName()); - eventWelcome(this_player()); - isWelcomed = 1; - } - } - - mixed CanJoin(object ob) { return 1; } - - string GetAffectLong(object ob) { - if(!ob || !living(ob)) return 0; - return ob->GetName() + " is a member of the " - + pluralize(GetGuildName()) + "."; - } - - string SetLeader(string str) { - if(!user_exists(str)) error("No such user: " + str - + ". You must have a real leader."); - if(!stringp(Guild->leader)) - Guild->leader = str; - return Guild->leader; - } - - string GetLeader() { return Guild->leader; } - - string SetGuildName(string str) { - if(!stringp(Guild->name)) Guild->name = str; - return Guild->name; - } - - string GetGuildName() { return Guild->name; } - - string SetGuildObject(string str) { - if(!stringp(Guild->objectName)) Guild->objectName = str; - return Guild->objectName; - } - - string GetGuildObject() { return Guild->objectName; } - - string SetGuildSkill(string str) { - if(!stringp(Guild->skill)) Guild->skill = str; - return Guild->skill; - } - - string GetGuildSkill() { return Guild->skill; } - - int eventBring(string str) { - object who; - - if(!str) return notify_fail("Bring whom?\n"); - who = find_player(lower_case(str)); - if(!who) - return notify_fail(who->GetName() + " is nowhere to be found.\n"); - if((string)who->GetGuild() != (string)GetGuildName()) - return notify_fail(who->GetName() + " is not one of you!\n"); - if( environment(who)->GetProperty("no teleport") - || environment(this_player())->GetProperty("no teleport") - || environment(this_player())->GetProperty("no magic")) - return notify_fail("A magic force blocks your powers.\n"); - if(present(who, environment(this_player()))) - return notify_fail(capitalize(str) + " is here.\n"); - if((int)this_player()->GetMagicPoints() < 70) - return notify_fail("Too low on magic power.\n"); - this_player()->AddMagicPoints(-70); - who->eventPrint("%^CYAN%^Your guild leader summons you.%^RESET%^"); - who->eventMoveLiving(environment(this_player())); - if(!present(who, environment(this_player()))) - this_player()->eventPrint("%^CYAN%^" + capitalize(str) - + " is beyond your reach.%^RESET%^"); - return 1; - } - - int eventInitiate(string str) { - object initiate; - object guildObject; - mixed ret; - - if(!str) return notify_fail("Initiate whom?\n"); - initiate = present(lower_case(str), environment(this_player())); - if(!initiate || !living(initiate)) - return notify_fail("No one of that nature here.\n"); - if(stringp(ret = CanJoin(initiate))) return notify_fail(ret); - else if(!ret) return ret; - if((int)this_player()->GetMagicPoints() < 300) - return notify_fail("Too low on magic power.\n"); - if(initiate->GetGuild()) - return notify_fail("You may only initiate people without guild " - + "affiliation.\n"); - initiate->SetGuild((string)GetGuildName()); - initiate->SetSkill(GetGuildSkill(), 1, 1); - if(guildObject = new((string)GetGuildObject())) - guildObject->eventMove(initiate); - this_player()->AddMagicPoints(-300); - eventJoin(initiate); - return 1; - } - - void eventJoin(object ob) { - ob->eventPrint("%^YELLOW%^You are now a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^"); - environment(ob)->eventPrint("%^YELLOW%^" +(string)ob->GetName() - + " is now a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^", ob); - } - - int eventRetire(string str) { - object retiree; - object guildObject; - - if(!str) return notify_fail("Retire whom?\n"); - retiree = present(lower_case(str), environment(this_player())); - if(!retiree || !living(retiree)) - return notify_fail("No one of that nature here.\n"); - if((string)retiree->GetGuild() != (string)GetGuildName()) - return notify_fail(retiree->GetName() + " is not one of us!\n"); - guildObject = present(GetGuildName() + "_guild_object", retiree); - if(!guildObject) error("Problem with guild object."); - guildObject->eventDestruct(); - retiree->SetGuild(0); - // retiree->SetSkill(GetGuildSkill(), 1, 1); We need to remove skill here. - eventUnjoin(retiree); - return 1; - } - - void eventUnjoin(object ob) { - ob->eventPrint("%^RED%^You are no longer a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^"); - environment(ob)->eventPrint("%^RED%^" + (string)ob->GetName() - + " is no longer a member of the " - + pluralize((string)GetGuildName()) + ".%^RESET%^", ob); - } - - void eventWelcome(object ob) { - ob->eventPrint("%^YELLOW%^Welcome, fellow " + (string)GetGuildName() - + ".%^RESET%^"); - } - --- 0 ---- diff -c -r --new-file ds2.0r18/lib/lib/include/bait.h ds2.0r20b/lib/lib/include/bait.h *** ds2.0r18/lib/lib/include/bait.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/bait.h Wed Apr 5 19:33:17 2006 *************** *** 1,19 **** #ifndef l_bait_h #define l_bait_h ! static void create(); ! mixed indirect_bait_obj_with_obj(); ! int SetBaitStrength(int x); int GetBaitStrength(); ! mixed eventBait(object who, object pole); ! /* virtual functions */ ! static mixed AddSave(mixed *vars); string GetShort(); int eventDestruct(); ! #endif --- 1,19 ---- #ifndef l_bait_h #define l_bait_h ! static void create(); ! mixed indirect_bait_obj_with_obj(); ! int SetBaitStrength(int x); int GetBaitStrength(); ! mixed eventBait(object who, object pole); ! /* virtual functions */ ! static mixed AddSave(mixed *vars); string GetShort(); int eventDestruct(); ! #endif diff -c -r --new-file ds2.0r18/lib/lib/include/bank.h ds2.0r20b/lib/lib/include/bank.h *** ds2.0r18/lib/lib/include/bank.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/bank.h Wed Apr 5 19:33:17 2006 *************** *** 1,10 **** #ifndef l_bank_h #define l_bank_h ! static void create(); ! mixed CanBank(object who, string currency); ! string SetBank(string str); string SetCurrency(string str); int SetSurcharge(int amount); --- 1,10 ---- #ifndef l_bank_h #define l_bank_h ! static void create(); ! mixed CanBank(object who, string currency); ! string SetBank(string str); string SetCurrency(string str); int SetSurcharge(int amount); *************** *** 19,31 **** int GetMinimumTransaction(); float GetExchangePercentage(); mixed GetCurrencies(); ! int AddSurcharge(object who, string currency, int amount); ! mixed eventDeposit(object who, string currency, int amount); mixed eventWithdraw(object who, string currency, int amount); mixed eventBalance(object who); mixed eventExchange(object who, int amount, string str1, string str2); mixed eventOpenAccount(object who); ! #endif /* l_bank_h */ --- 19,31 ---- int GetMinimumTransaction(); float GetExchangePercentage(); mixed GetCurrencies(); ! int AddSurcharge(object who, string currency, int amount); ! mixed eventDeposit(object who, string currency, int amount); mixed eventWithdraw(object who, string currency, int amount); mixed eventBalance(object who); mixed eventExchange(object who, int amount, string str1, string str2); mixed eventOpenAccount(object who); ! #endif /* l_bank_h */ diff -c -r --new-file ds2.0r18/lib/lib/include/body.h ds2.0r20b/lib/lib/include/body.h *** ds2.0r18/lib/lib/include/body.h Mon Jan 16 23:03:04 2006 --- ds2.0r20b/lib/lib/include/body.h Wed Apr 5 19:33:17 2006 *************** *** 1,6 **** #ifndef l_body_h #define l_body_h ! static void create(); static void heart_beat(); void restart_heart(); --- 1,6 ---- #ifndef l_body_h #define l_body_h ! static void create(); static void heart_beat(); void restart_heart(); *************** *** 13,24 **** varargs int eventHealDamage(int x, int internal, mixed limbs); varargs int eventReceiveDamage(object agent, int type, int x, int internal, mixed limbs); int eventCheckProtection(object agent, int type, int damage); ! mixed eventReceiveThrow(object who, object what); varargs int eventDie(object agent); int eventRemoveItem(object ob); int eventWear(object ob, mixed limbs); ! void NewBody(string race); mixed CanWear(object armor, string *limbs); varargs int AddLimb(string limb, string parent, int classes, int *armors); --- 13,24 ---- varargs int eventHealDamage(int x, int internal, mixed limbs); varargs int eventReceiveDamage(object agent, int type, int x, int internal, mixed limbs); int eventCheckProtection(object agent, int type, int damage); ! mixed eventReceiveThrow(object who, object what); varargs int eventDie(object agent); int eventRemoveItem(object ob); int eventWear(object ob, mixed limbs); ! void NewBody(string race); mixed CanWear(object armor, string *limbs); varargs int AddLimb(string limb, string parent, int classes, int *armors); *************** *** 78,83 **** /* pure virtual */ varargs mixed eventPrint(mixed msg, mixed cl, mixed three); /* pure virtual */ varargs int SetParalyzed(int x, function f); /* pure virtual */ varargs mixed eventMoveLiving(mixed dest, string omsg, ! string imsg); #endif /* l_body_h */ --- 78,83 ---- /* pure virtual */ varargs mixed eventPrint(mixed msg, mixed cl, mixed three); /* pure virtual */ varargs int SetParalyzed(int x, function f); /* pure virtual */ varargs mixed eventMoveLiving(mixed dest, string omsg, ! string imsg); #endif /* l_body_h */ diff -c -r --new-file ds2.0r18/lib/lib/include/clan.h ds2.0r20b/lib/lib/include/clan.h *** ds2.0r18/lib/lib/include/clan.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/lib/include/clan.h Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,38 ---- + + + #ifndef l_clan_h + #define l_clan_h + + + class ClanClass { + string leader; + string name; + string objectName; + string skill; + } + + static void create(); + static void init(); + + mixed CanJoin(object ob); + string GetAffectLong(object ob); + string SetLeader(string str); + string GetLeader(); + string SetClanName(string str); + string GetClanName(); + string SetClanObject(string str); + string GetClanObject(); + string SetClanSkill(string str); + string GetClanSkill(); + + int eventBring(string str); + int eventInitiate(string str); + void eventJoin(object ob); + int eventRetire(string str); + void eventUnjoin(object ob); + void eventWelcome(object ob); + + + #endif /* l_clan_h */ + + diff -c -r --new-file ds2.0r18/lib/lib/include/classes.h ds2.0r20b/lib/lib/include/classes.h *** ds2.0r18/lib/lib/include/classes.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/classes.h Wed Apr 12 23:48:44 2006 *************** *** 10,17 **** string GetSkillModifier(string skill); string SetClass(string classes); string GetClass(); ! string SetGuild(string guild); ! string GetGuild(); int GetBaseStatLevel(string stat); int SetMorality(int x); int GetMorality(); --- 10,17 ---- string GetSkillModifier(string skill); string SetClass(string classes); string GetClass(); ! string SetClan(string clan); ! string GetClan(); int GetBaseStatLevel(string stat); int SetMorality(int x); int GetMorality(); diff -c -r --new-file ds2.0r18/lib/lib/include/combatmsg.h ds2.0r20b/lib/lib/include/combatmsg.h *** ds2.0r18/lib/lib/include/combatmsg.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/combatmsg.h Wed Apr 5 19:33:17 2006 *************** *** 1,6 **** #ifndef l_combatmsg_h #define l_combatmsg_h ! mixed GetMissData(object target, int type, string limb); static void eventSendMissMessages(object target, int x, string limb); mixed GetCombatVerbs(string type, int damage); --- 1,6 ---- #ifndef l_combatmsg_h #define l_combatmsg_h ! mixed GetMissData(object target, int type, string limb); static void eventSendMissMessages(object target, int x, string limb); mixed GetCombatVerbs(string type, int damage); *************** *** 11,15 **** /* virtual only */ string GetName(); varargs int eventPrint(string msg, mixed arg2, mixed arg3); ! #endif /* l_combatmsg_h */ --- 11,15 ---- /* virtual only */ string GetName(); varargs int eventPrint(string msg, mixed arg2, mixed arg3); ! #endif /* l_combatmsg_h */ diff -c -r --new-file ds2.0r18/lib/lib/include/detect.h ds2.0r20b/lib/lib/include/detect.h *** ds2.0r18/lib/lib/include/detect.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/detect.h Wed Apr 5 19:33:17 2006 *************** *** 1,12 **** #ifndef __detect_h__ #define __detect_h__ ! int direct_detect_wrd_in_obj(string word); mixed eventDetect(object who, string str, int ability); ! /* virtuals */ ! mixed GetProperty(string str); string GetShort(); ! #endif --- 1,12 ---- #ifndef __detect_h__ #define __detect_h__ ! int direct_detect_wrd_in_obj(string word); mixed eventDetect(object who, string str, int ability); ! /* virtuals */ ! mixed GetProperty(string str); string GetShort(); ! #endif diff -c -r --new-file ds2.0r18/lib/lib/include/guild.h ds2.0r20b/lib/lib/include/guild.h *** ds2.0r18/lib/lib/include/guild.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/guild.h Wed Dec 31 19:00:00 1969 *************** *** 1,38 **** - - - #ifndef l_guild_h - #define l_guild_h - - - class GuildClass { - string leader; - string name; - string objectName; - string skill; - } - - static void create(); - static void init(); - - mixed CanJoin(object ob); - string GetAffectLong(object ob); - string SetLeader(string str); - string GetLeader(); - string SetGuildName(string str); - string GetGuildName(); - string SetGuildObject(string str); - string GetGuildObject(); - string SetGuildSkill(string str); - string GetGuildSkill(); - - int eventBring(string str); - int eventInitiate(string str); - void eventJoin(object ob); - int eventRetire(string str); - void eventUnjoin(object ob); - void eventWelcome(object ob); - - - #endif /* l_guild_h */ - - --- 0 ---- diff -c -r --new-file ds2.0r18/lib/lib/include/holder.h ds2.0r20b/lib/lib/include/holder.h *** ds2.0r18/lib/lib/include/holder.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/holder.h Wed Apr 5 19:33:17 2006 *************** *** 12,18 **** mixed direct_look_in_obj(object target, string id); mixed direct_look_inside_obj(object target, string id); mixed indirect_look_at_obj_word_obj(object target, string wrd, object ob, ! string id, string my_id); mixed indirect_put_obj_word_obj(object what, string word, object storage); mixed indirect_put_obs_word_obj(object *items, string word, object storage); --- 12,18 ---- mixed direct_look_in_obj(object target, string id); mixed direct_look_inside_obj(object target, string id); mixed indirect_look_at_obj_word_obj(object target, string wrd, object ob, ! string id, string my_id); mixed indirect_put_obj_word_obj(object what, string word, object storage); mixed indirect_put_obs_word_obj(object *items, string word, object storage); diff -c -r --new-file ds2.0r18/lib/lib/include/lock.h ds2.0r20b/lib/lib/include/lock.h *** ds2.0r18/lib/lib/include/lock.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/lock.h Wed Apr 5 19:33:17 2006 *************** *** 4,12 **** static void create(); mixed direct_lock_obj_with_obj(object target, object tool, string id); mixed direct_pick_str_on_obj(string str, object target, string str2, ! string id); mixed direct_pick_str_on_obj_with_obj(string str, object target, object tool, ! string str2, string targ_id); mixed direct_unlock_obj_with_obj(object target, object key, string id); mixed CanLock(object who, string id); --- 4,12 ---- static void create(); mixed direct_lock_obj_with_obj(object target, object tool, string id); mixed direct_pick_str_on_obj(string str, object target, string str2, ! string id); mixed direct_pick_str_on_obj_with_obj(string str, object target, object tool, ! string str2, string targ_id); mixed direct_unlock_obj_with_obj(object target, object key, string id); mixed CanLock(object who, string id); diff -c -r --new-file ds2.0r18/lib/lib/include/player.h ds2.0r20b/lib/lib/include/player.h *** ds2.0r18/lib/lib/include/player.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/player.h Wed Apr 12 23:48:52 2006 *************** *** 57,63 **** string GetCapName(); int ResetLevel(); string SetClass(string str); ! string SetGuild(string guild); varargs static int AddHealthPoints(int x, string limb, object agent); int GetLanguageLevel(string lang); int is_living(); --- 57,63 ---- string GetCapName(); int ResetLevel(); string SetClass(string str); ! string SetClan(string clan); varargs static int AddHealthPoints(int x, string limb, object agent); int GetLanguageLevel(string lang); int is_living(); diff -c -r --new-file ds2.0r18/lib/lib/include/pole.h ds2.0r20b/lib/lib/include/pole.h *** ds2.0r18/lib/lib/include/pole.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/pole.h Wed Apr 5 19:33:17 2006 *************** *** 1,17 **** #ifndef l_pole_h #define l_pole_h ! static void create(); mixed direct_bait_obj_with_obj(); mixed direct_fish_with_obj(); mixed CanCast(object who); ! int eventBait(object who, object bait); int eventBreak(); mixed eventCatch(object who, string fish); int eventFish(object who); ! int SetBait(int x); int AddBait(int x); int GetBait(); --- 1,17 ---- #ifndef l_pole_h #define l_pole_h ! static void create(); mixed direct_bait_obj_with_obj(); mixed direct_fish_with_obj(); mixed CanCast(object who); ! int eventBait(object who, object bait); int eventBreak(); mixed eventCatch(object who, string fish); int eventFish(object who); ! int SetBait(int x); int AddBait(int x); int GetBait(); *************** *** 20,32 **** int GetChance(); int SetStrength(int x); int GetStrength(); ! /* virtual functions */ ! mixed AddSave(mixed *vars); string GetShort(); int SetBroken(int x); int GetBroken(); ! ! #endif /* l_pole_h */ --- 20,32 ---- int GetChance(); int SetStrength(int x); int GetStrength(); ! /* virtual functions */ ! mixed AddSave(mixed *vars); string GetShort(); int SetBroken(int x); int GetBroken(); ! ! #endif /* l_pole_h */ diff -c -r --new-file ds2.0r18/lib/lib/include/stargate.h ds2.0r20b/lib/lib/include/stargate.h *** ds2.0r18/lib/lib/include/stargate.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/lib/include/stargate.h Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,18 ---- + /** + * + * $Id: stargate.h,v 1.1 2006/04/05 05:48:39 jam Exp $ + * + */ + + #include "/include/stargate.h" + + #ifndef lib_stargate_h + #define lib_stargate_h + + void setOrigin(string o, string d); + string getOrigin(); + void connect(string destination); + int disconnect(); + string status(); + + #endif diff -c -r --new-file ds2.0r18/lib/lib/include/storage.h ds2.0r20b/lib/lib/include/storage.h *** ds2.0r18/lib/lib/include/storage.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/storage.h Wed Apr 5 19:33:17 2006 *************** *** 8,14 **** mixed indirect_get_obj_out_of_obj(object item); mixed direct_look_inside_obj(object target, string id); mixed indirect_look_at_obj_word_obj(object target, string wrd, object ob, ! string id, string my_id); int direct_unlock(); int inventory_accessible(); int inventory_visible(); --- 8,14 ---- mixed indirect_get_obj_out_of_obj(object item); mixed direct_look_inside_obj(object target, string id); mixed indirect_look_at_obj_word_obj(object target, string wrd, object ob, ! string id, string my_id); int direct_unlock(); int inventory_accessible(); int inventory_visible(); diff -c -r --new-file ds2.0r18/lib/lib/include/teacher.h ds2.0r20b/lib/lib/include/teacher.h *** ds2.0r18/lib/lib/include/teacher.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/lib/include/teacher.h Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,22 ---- + #ifndef __trainer_h__ + #define __trainer_h__ + + static void create(); + static void init(); + + mixed AddTeachingLanguages(string *args...); + mixed RemoveTeachingLanguages(string *args...); + string *GetTeachingLanguages(); + mapping GetStudents(); + + int eventHelp(object who, string unused); + int eventTeach(object who, string verb, string language); + + static int ContinueTeaching(object who, string language, int x); + + int eventStart(object who, string language); + int eventContinue(object who, string language, int x); + int eventComplete(object who, string language); + + #define TEACHING_WAIT 10 + #endif __trainer_h__ diff -c -r --new-file ds2.0r18/lib/lib/include/teller.h ds2.0r20b/lib/lib/include/teller.h *** ds2.0r18/lib/lib/include/teller.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/teller.h Wed Apr 5 19:33:17 2006 *************** *** 1,6 **** #ifndef l_teller_h #define l_teller_h ! static void create(); string SetBankName(string str); string SetLocalCurrency(string str); --- 1,6 ---- #ifndef l_teller_h #define l_teller_h ! static void create(); string SetBankName(string str); string SetLocalCurrency(string str); *************** *** 23,28 **** int eventExchange(object who, int amount, string str1, string str2); int eventOpenAccount(object who); int cmdParse(object who, string cmd, string str); ! #endif --- 23,28 ---- int eventExchange(object who, int amount, string str1, string str2); int eventOpenAccount(object who); int cmdParse(object who, string cmd, string str); ! #endif diff -c -r --new-file ds2.0r18/lib/lib/include/trainer.h ds2.0r20b/lib/lib/include/trainer.h *** ds2.0r18/lib/lib/include/trainer.h Wed Sep 28 19:34:11 2005 --- ds2.0r20b/lib/lib/include/trainer.h Wed Apr 5 19:33:18 2006 *************** *** 1,22 **** #ifndef __trainer_h__ #define __trainer_h__ ! static void create(); static void init(); ! mixed AddTrainingSkills(string *args...); mixed RemoveTrainingSkills(string *args...); string *GetTrainingSkills(); mapping GetStudents(); ! int eventHelp(object who, string unused); int eventTrain(object who, string verb, string skill); ! static int ContinueTraining(object who, string skill, int x); ! int eventStart(object who, string skill); int eventContinue(object who, string skill, int x); int eventComplete(object who, string skill); ! #define TRAINING_WAIT 10 #endif __trainer_h__ --- 1,22 ---- #ifndef __trainer_h__ #define __trainer_h__ ! static void create(); static void init(); ! mixed AddTrainingSkills(string *args...); mixed RemoveTrainingSkills(string *args...); string *GetTrainingSkills(); mapping GetStudents(); ! int eventHelp(object who, string unused); int eventTrain(object who, string verb, string skill); ! static int ContinueTraining(object who, string skill, int x); ! int eventStart(object who, string skill); int eventContinue(object who, string skill, int x); int eventComplete(object who, string skill); ! #define TRAINING_WAIT 10 #endif __trainer_h__ diff -c -r --new-file ds2.0r18/lib/lib/interactive.c ds2.0r20b/lib/lib/interactive.c *** ds2.0r18/lib/lib/interactive.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/lib/interactive.c Thu Apr 13 21:03:57 2006 *************** *** 152,157 **** --- 152,158 ---- get_livings(load_object("/secure/room/control"))->eventPrint("[" + GetKeyName()+ " goes net-dead]", MSG_SYSTEM); } + SNOOP_D->ReportLinkDeath(this_object()->GetKeyName()); eventMove(ROOM_FREEZER); if(query_snoop(this_object())) query_snoop(this_object())->eventPrint(GetCapName() + " has gone " *************** *** 203,214 **** break; } if( !brief ) { ! if( i == VISION_CLEAR ) { desc = (string)env->GetObviousExits() || ""; ! desc = capitalize((string)env->GetShort() || "") ! + " [" + desc + "]\n"; } ! else desc = ""; if( i == VISION_CLEAR || i == VISION_LIGHT || i == VISION_DIM ) desc += (string)env->GetLong(); if(functionp(tmp = (mixed)env->GetSmell("default"))) --- 204,217 ---- break; } if( !brief ) { ! if( i == VISION_CLEAR ){ desc = (string)env->GetObviousExits() || ""; ! if(desc && desc != "") ! desc = capitalize((string)env->GetShort() || "") ! + " [" + desc + "]\n"; ! else desc = capitalize((string)env->GetShort()+"\n" || "\n"); } ! else desc = "\n"; if( i == VISION_CLEAR || i == VISION_LIGHT || i == VISION_DIM ) desc += (string)env->GetLong(); if(functionp(tmp = (mixed)env->GetSmell("default"))) *************** *** 222,233 **** touch = tmp; } else { ! if( i == VISION_CLEAR || i == VISION_LIGHT || i == VISION_DIM ) { desc = (string)env->GetShort(); if( (tmp = (string)env->GetObviousExits()) && tmp != "" ) desc += " [" + tmp + "]"; } ! else desc = ""; } if( desc ) eventPrint(desc, MSG_ROOMDESC); if( smell ) eventPrint("%^GREEN%^" + smell, MSG_ROOMDESC); --- 225,237 ---- touch = tmp; } else { ! if(i == VISION_CLEAR || i == VISION_LIGHT || i == VISION_DIM){ desc = (string)env->GetShort(); if( (tmp = (string)env->GetObviousExits()) && tmp != "" ) desc += " [" + tmp + "]"; + else desc += "\n"; } ! else desc = "\n"; } if( desc ) eventPrint(desc, MSG_ROOMDESC); if( smell ) eventPrint("%^GREEN%^" + smell, MSG_ROOMDESC); diff -c -r --new-file ds2.0r18/lib/lib/language.c ds2.0r20b/lib/lib/language.c *** ds2.0r18/lib/lib/language.c Mon Nov 7 13:29:00 2005 --- ds2.0r20b/lib/lib/language.c Wed Apr 5 19:33:18 2006 *************** *** 18,23 **** --- 18,24 ---- // abstract methods int GetHeartRate(); int GetStatLevel(string stat); + string GetNativeLanguage(); // end abstract methods int GetNextLevel(string lang, int curr_level); *************** *** 32,42 **** } mapping RemoveLanguage(string lang) { ! lang = convert_name(lang); map_delete(Languages, lang); return Languages; } varargs void SetLanguageComprehension(function check, int time, function end) { if( !check ) { Comprehension = 0; --- 33,53 ---- } mapping RemoveLanguage(string lang) { ! if(lang && sizeof(lang)) lang = convert_name(lang); ! else return Languages; map_delete(Languages, lang); return Languages; } + mapping SetNativeLanguage(string lang){ + string key = convert_name(lang); + string old_lang = GetNativeLanguage(); + RemoveLanguage(old_lang); + SetLanguage(old_lang, 100); + SetLanguage(lang, 100, 1); + return Languages; + } + varargs void SetLanguageComprehension(function check, int time, function end) { if( !check ) { Comprehension = 0; *************** *** 73,90 **** int y; key = convert_name(lang); ! if( !Languages[key] ) SetLanguage(lang, 0, 0); Languages[key]["points"] += points; ! while( Languages[key]["points"] > ! (y = GetNextLevel(key, Languages[key]["level"])) ) { ! Languages[key]["points"] -= y; ! Languages[key]["level"]++; ! } ! while( Languages[key]["points"] < 0 ) { ! y = GetNextLevel(key, Languages[key]["level"] - 1); ! Languages[key]["points"] = y + Languages[key]["points"]; ! Languages[key]["level"]--; ! } return Languages[key]["points"]; } --- 84,95 ---- int y; key = convert_name(lang); ! if( !Languages[key] ) SetLanguage(key, 0, 0); ! //tc("thing1: "+identify(Languages[key]["points"])); Languages[key]["points"] += points; ! //tc("thing2: "+identify(Languages[key]["points"])); ! Languages[key]["level"] = Languages[key]["points"]; ! if(Languages[key]["level"] > 100) Languages[key]["level"] = 100; return Languages[key]["points"]; } diff -c -r --new-file ds2.0r18/lib/lib/nmsh.c ds2.0r20b/lib/lib/nmsh.c *** ds2.0r18/lib/lib/nmsh.c Sat Mar 11 11:16:12 2006 --- ds2.0r20b/lib/lib/nmsh.c Wed Apr 5 19:33:18 2006 *************** *** 14,20 **** inherit LIB_HISTORY; #define DIRECTORY_STACK_SIZE 5 ! #define MAX_CMD_ALIASES 72 private string CurrentWorkingDirectory; private string PreviousWorkingDirectory; --- 14,20 ---- inherit LIB_HISTORY; #define DIRECTORY_STACK_SIZE 5 ! #define MAX_CMD_ALIASES 128 private string CurrentWorkingDirectory; private string PreviousWorkingDirectory; *************** *** 32,38 **** "sw" : "go southwest", "d" : "go down", "u" : "go up", "out": "go out", "exa" : "look at $*", "p" : "people", "sc" : "status", "inf" : "score", "eq" : "inventory", "where" : "people", "prac" : "skills", ! "practice" : "skills", "trophy" : "kills" ]); Xverbs = (["'":"say $*",":":"emote $*","\"":"say $*",]); } --- 32,42 ---- "sw" : "go southwest", "d" : "go down", "u" : "go up", "out": "go out", "exa" : "look at $*", "p" : "people", "sc" : "status", "inf" : "score", "eq" : "inventory", "where" : "people", "prac" : "skills", ! "practice" : "skills", "trophy" : "kills", ! "northwest" : "go northwest", "northeast" : "go northeast", ! "southwest" : "go southwest", "southeast" : "go southeast", ! "north" : "go north", "south": "go south", "east" : "go east", ! "west" : "go west", "up" : "go up", "down": "go down" ]); Xverbs = (["'":"say $*",":":"emote $*","\"":"say $*",]); } diff -c -r --new-file ds2.0r18/lib/lib/pager.c ds2.0r20b/lib/lib/pager.c *** ds2.0r18/lib/lib/pager.c Mon Nov 7 13:29:00 2005 --- ds2.0r20b/lib/lib/pager.c Wed Apr 5 19:33:18 2006 *************** *** 104,110 **** if( endline < file->Size - 1 ) { prompt += "(" + (file->CurrentLine+1) + "-" + (endline+1) + " "; prompt += ((endline * 100)/(file->Size - 1)) + "%) press enter: "; ! prompt = "%^BOLD%^" + prompt + "%^RESET%^"; file->CurrentLine = endline + 1; eventPrint(prompt, MSG_PROMPT); input_to((: cmdPage :), file); --- 104,111 ---- if( endline < file->Size - 1 ) { prompt += "(" + (file->CurrentLine+1) + "-" + (endline+1) + " "; prompt += ((endline * 100)/(file->Size - 1)) + "%) press enter: "; ! // Following fix courtesy of Brodbane ! prompt = "%^BOLD%^" + prompt + "%^RESET%^\n"; file->CurrentLine = endline + 1; eventPrint(prompt, MSG_PROMPT); input_to((: cmdPage :), file); *************** *** 126,132 **** int fp, x, scrlen; if( !str || trim(str) == "" ) { ! if( file->CurrentLine >= (file->Size - 1) ) { fp = functionp(file->Callback); if( !fp || (fp == FP_OWNER_DESTED) ) return; if( file->Args ) evaluate(file->Callback, file->Args...); --- 127,133 ---- int fp, x, scrlen; if( !str || trim(str) == "" ) { ! if( file->CurrentLine >= (file->Size) ) { fp = functionp(file->Callback); if( !fp || (fp == FP_OWNER_DESTED) ) return; if( file->Args ) evaluate(file->Callback, file->Args...); diff -c -r --new-file ds2.0r18/lib/lib/persist.c ds2.0r20b/lib/lib/persist.c *** ds2.0r18/lib/lib/persist.c Mon Nov 7 13:29:00 2005 --- ds2.0r20b/lib/lib/persist.c Wed Apr 12 23:48:53 2006 *************** *** 15,20 **** --- 15,21 ---- string *flat = ({}); mixed *tmp; + //tc("Hit eventConvertObject","red"); if( val[0] != base_name(this_object()) ) error("Invalid save string.\n"); tmp = map(Saved, (: functionp($1) ? evaluate($1, "loading") : $1 :)); foreach(mixed elem in tmp) { *************** *** 108,115 **** if( arrayp(elem) ) flat += elem; else flat += ({ elem }); } ! flat -= ({ 0 }); ! foreach(string var in flat) mp[var] = fetch_variable(var); mp["#base_name#"] = base_name(this_object()); if( SaveRecurse ) mp["#inventory#"] = (string *)all_inventory()->GetSaveString() - ({ 0 }); --- 109,120 ---- if( arrayp(elem) ) flat += elem; else flat += ({ elem }); } ! if(flat && sizeof(flat)){ ! flat -= ({ 0 }); ! foreach(mixed var in flat) { ! if(stringp(var)) mp[var] = fetch_variable(var); ! } ! } mp["#base_name#"] = base_name(this_object()); if( SaveRecurse ) mp["#inventory#"] = (string *)all_inventory()->GetSaveString() - ({ 0 }); diff -c -r --new-file ds2.0r18/lib/lib/pile.c ds2.0r20b/lib/lib/pile.c *** ds2.0r18/lib/lib/pile.c Mon Nov 7 13:29:00 2005 --- ds2.0r20b/lib/lib/pile.c Fri Apr 14 18:27:24 2006 *************** *** 14,20 **** --- 14,24 ---- private int PileAmount = 0; static void create() { + string *saveds; item::create(); + saveds = item::GetSave(); + saveds += ({ "PileType", "PileAmount" }); + AddSave( saveds ); SetKeyName("pile"); } diff -c -r --new-file ds2.0r18/lib/lib/player.c ds2.0r20b/lib/lib/player.c *** ds2.0r18/lib/lib/player.c Sat Mar 11 11:16:12 2006 --- ds2.0r20b/lib/lib/player.c Wed Apr 12 23:48:53 2006 *************** *** 28,34 **** /* ***************** /lib/player.c driver applies ***************** */ static void create() { ! AddSave( ({ "CarriedMass", "Muffed" }) ); interactive::create(); living::create(); --- 28,34 ---- /* ***************** /lib/player.c driver applies ***************** */ static void create() { ! AddSave( ({ "Properties", "CarriedMass", "Muffed" }) ); interactive::create(); living::create(); *************** *** 213,221 **** base_name(environment(this_player()))); } - if(this_player()->GetProperty("debug")) - tell_player(this_player(),"Calling stack for move: "+get_stack()); - ret = interactive::eventMove(dest); eventMoveFollowers(environment(this_object())); return ret; --- 213,218 ---- *************** *** 439,444 **** --- 436,445 ---- if(GetProperty("brand_spanking_new")){ object jeans, shirt, book; + + if(ENGLISH_ONLY) this_object()->SetNativeLanguage("English"); + PLAYERS_D->AddPlayerInfo(this_object()); + jeans = new("/domains/default/armor/jeans"); shirt = new("/domains/default/armor/shirt"); book = new("/domains/default/obj/handbook"); diff -c -r --new-file ds2.0r18/lib/lib/props/description.c ds2.0r20b/lib/lib/props/description.c *** ds2.0r18/lib/lib/props/description.c Sat Mar 11 11:16:12 2006 --- ds2.0r20b/lib/lib/props/description.c Sun Apr 9 23:49:21 2006 *************** *** 41,46 **** --- 41,49 ---- mixed direct_reload() { return 1; } mixed indirect_reload() { return 1; } + mixed direct_reload_every_str() { return 1; } + mixed indirect_reload_every_str() { return 1; } + mixed direct_copy_obj_to_obj() { return 1; } mixed direct_copy_obj_str() { return 1; } diff -c -r --new-file ds2.0r18/lib/lib/props/properties.c ds2.0r20b/lib/lib/props/properties.c *** ds2.0r18/lib/lib/props/properties.c Mon Nov 7 13:31:06 2005 --- ds2.0r20b/lib/lib/props/properties.c Wed Apr 5 19:33:18 2006 *************** *** 6,12 **** * Last modified: 96/12/22 */ ! private static mapping Properties = ([]); mixed AddProperty(string prop, mixed val) { if( Properties[prop] ) { --- 6,13 ---- * Last modified: 96/12/22 */ ! //private static mapping Properties = ([]); ! mapping Properties = ([]); mixed AddProperty(string prop, mixed val) { if( Properties[prop] ) { diff -c -r --new-file ds2.0r18/lib/lib/race.c ds2.0r20b/lib/lib/race.c *** ds2.0r18/lib/lib/race.c Fri Mar 24 14:36:39 2006 --- ds2.0r20b/lib/lib/race.c Sun Apr 9 23:49:21 2006 *************** *** 7,12 **** --- 7,13 ---- */ #include + #include #include #include #include *************** *** 102,113 **** } foreach(tmp in args[1]) { mixt = copy(args[1]); AddStat(tmp...); } if( stringp(args[2]) ) { mixt = copy(args[2]); ! SetLanguage(args[2], 100, 1); } if( sizeof(args[3]) == 2 ) { mixt = copy(args[3]); --- 103,120 ---- } foreach(tmp in args[1]) { mixt = copy(args[1]); + //tc("mixt: "+identify(mixt),"blue"); AddStat(tmp...); } if( stringp(args[2]) ) { mixt = copy(args[2]); ! if(!ENGLISH_ONLY){ ! SetLanguage(args[2], 100, 1); ! } ! else { ! SetLanguage("English", 100, 1); ! } } if( sizeof(args[3]) == 2 ) { mixt = copy(args[3]); diff -c -r --new-file ds2.0r18/lib/lib/sentient.c ds2.0r20b/lib/lib/sentient.c *** ds2.0r18/lib/lib/sentient.c Mon Jan 23 08:52:38 2006 --- ds2.0r20b/lib/lib/sentient.c Wed Apr 5 19:33:18 2006 *************** *** 8,13 **** --- 8,16 ---- #include #include + #include + #include + inherit LIB_NPC; *************** *** 204,214 **** varargs mixed eventReceiveEmote(object who, string verb, string info) { mixed val = EmoteResponses[verb]; if( !val ) { return 0; } if( stringp(val) ) { ! eventSpeak(val); return 1; } return evaluate(val, this_player(), verb, info); --- 207,222 ---- varargs mixed eventReceiveEmote(object who, string verb, string info) { mixed val = EmoteResponses[verb]; + //debug("who",who,"red"); + //debug("verb",verb,"red"); + //debug("info",info,"red"); + //debug("responses",EmoteResponses,"red"); if( !val ) { return 0; } if( stringp(val) ) { ! //debug("val",val,"red"); ! eventSpeak(who,TALK_LOCAL,val); return 1; } return evaluate(val, this_player(), verb, info); diff -c -r --new-file ds2.0r18/lib/lib/stargate.c ds2.0r20b/lib/lib/stargate.c *** ds2.0r18/lib/lib/stargate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/lib/stargate.c Thu Apr 13 21:14:09 2006 *************** *** 0 **** --- 1,244 ---- + #include + #include + #include "/lib/include/stargate.h" + + /** + * 2006-03-28, jonez + * - based on a suggestion from rhk, changed so that one cannot enter the + * gate unless status is "outbound". this makes the object closer to the + * (theoretical) math and also to what happens on the show. + */ + + /** + * based on portal.c by Brodbane - March 2006 + * + * $Id: stargate.c,v 1.1 2006/04/05 05:48:39 jam Exp $ + * + * The desired functionality is much like a "star gate": users dialed + * letters or full words that lined up with destinations. A portal opens to + * that destination briefly. To define destinations you must setup a + * constant below then add it to the switch statement in the cmdDial + * function. This object is crude and basic, but gets the job done. + * + * 2006-03-22, jonez + * - original version of this file is from Daelas@Moraelinost + * 2006-03-23, jonez + * - altered so code uses existing verbs (touch, enter) where possible. last add_action is for dial command. + * - added single mapping called "database" and made the "dial" command use it. + * - dial command no longer uses switch/case, making adding a new destination simpler + * - made use of SetPreventGet() / SetPreventPut() + * - made use of new stargate daemon + * - made use of LIB_STARGATE + * - made use of STARGATE_D + * + * IDEAS: + * - create a daemon that holds the stargate network [DONE] + * - allow for stargate failure + * - add dhd object + * - change the code so that it uses a single mapping of names and + * destinations, perhaps in a database file. currently an update to the + * object requires an update for all the objects. [DONE] + * - dhd skill (thanks plato) + * - delay when dialing gate. destination dhd lights up? + * - player should not be able to dial earth if earth is already connected elsewhere (need daemon) [DONE] + * - make use of existing verbs (enter, touch) instead of doing our own thing. [DONE] + * - daemon should contain a class that maps the various gates to each other. see lib/include/door.h [DONE] + * - shout "off world activation" into the gateroom when the gate engages. + * - track status as "incoming" or "outgoing".. you can only "enter" an outgoing gate (rhk) [DONE] + * - if room is empty, shut down the gate (rhk) + * - change callout time when someone goes through the gate (rhk) + */ + + inherit LIB_ITEM; + + static private string origin; + + string displayLong(); + string displayShort(); + + void create() + { + item::create(); + + SetKeyName("stargate"); + SetId(({"stargate", "gate", "portal", "ring"})); + SetAdjectives(({"stargate"})); + SetShort( (: displayShort :) ); + + SetLong( (: displayLong :) ); + + AddItem( "inner ring", "The second ring - the inner ring - is placed " + "inside the larger ring and seems to be able to move."); + SetMass(1000); + SetBaseCost("silver",50); + SetPreventGet("The gate is pure naquadah and cannot be moved"); + SetPreventPut("The gate is pure naquadah and cannot be moved"); + SetTouch("You feel the stargate beneath your hand humming with energy."); + } + + void init() + { + ::init(); + add_action( "cmdDial", "dial" ); + add_action( "cmdEnter", "enter"); + } + + + void setOrigin(string o, string d) + { + if (o == "" || d == "") return; + origin = lower_case(o); + STARGATE_D->setStargate(origin, d); + } + + string getOrigin() + { + return origin; + } + + void connect(string destination) + { + int ret; + + destination = lower_case(destination); + + if (origin == destination) + { + write("You attempt to dial the gate, but the last chevron does not engage"); + say(this_player()->GetName() + " tries to dial the gate but the last chevron does not engage"); + return; + } + + ret = STARGATE_D->connect(origin, destination); + if (ret) + { + string d = STARGATE_D->getDestination(destination); + write("The ancient rings lock into place and a portal forms in an explosion of energy."); + say("The ancient rings lock into place and a portal forms in an explosion of energy."); + tell_room(d, "The ancient rings lock into place and a portal forms in an explosion of energy"); + call_out("disconnect", 10+random(5)); + return; + } + + write("You attempt to dial the stargate, but nothing happens."); + say(this_player()->GetName() + " tries to dial the gate but fails."); + + return; + } + + int disconnect() + { + string e = STARGATE_D->getEndpoint(origin); + string d = STARGATE_D->getDestination(e); + + debug(sprintf("stargate_lib->disconnect(%s), e=%s, d=%s", origin, e, d)); + + // FIX: does the player get a message if they come through the gate and then leave the room? + write("The chevrons on the stargate disengage and the portal disappears."); + say("The chevrons on the stargate disengage and the portal disappears."); + tell_room(d, "The chevrons on the stargate disengage and the portal disappears", ({ this_player() })); + + return STARGATE_D->disconnect(origin); + } + + string status() + { + return STARGATE_D->getStatus(origin); + } + + mixed cmdDial(string s) + { + if (s) + { + connect(s); + return 1; + } + + return 0; + + } + + int cmdEnter(string what) + { + string endpoint, destination; + object who; + + if (what != "gate" && what != "stargate") + { + return 0; + } + + if (status() != "outbound") + { + return 0; + } + + who = this_player(); + endpoint = STARGATE_D->getEndpoint(origin); + destination = STARGATE_D->getDestination(endpoint); + debug("endpoint=" + endpoint); + debug("destination=" + destination); + who->eventPrint("You step through the event horizon of the stargate."); + who->eventMoveLiving(destination, + "$N steps into the event horizon and disappears", + "$N steps out of the event horizon"); + return 1; + + } + + int eventEnter(object who) + { + string endpoint; + + if (!who) return 0; + + endpoint = STARGATE_D->getEndpoint(origin); + if (status() == "connected") + { + who->eventPrint("You step through the event horizon of the stargate."); + who->eventMoveLiving(endpoint, + "$N steps into the event horizon and disappears", + "$N steps out of the event horizon"); + } + return 1; + } + + string displayLong() + { + string buf, stat; + + buf = "This is the Stargate of legend. The Stargate was created " + "from naquadah ore, similar to black quartz. It is a perfectly " + "circular device approximately ten meters in diameter and " + "comprised of two sets of rings and nine chevrons placed " + "equidistant along its outer circumfrence."; + + stat = status(); + + if (stat == "outbound" || stat == "inbound") + { + buf += " There is an event horizon in the center of the ring that looks like shimmering water."; + } + else if (stat == "idle") + { + buf += " This gate is currently idle."; + } + return buf; + } + + string displayShort() + { + string stat; + stat = status(); + switch (stat) + { + case "inbound": + return "an inbound stargate"; + case "outbound": + return "an outbound stargate"; + case "idle": + return "an idle stargate"; + default: + return "a broken stargate"; + } + } diff -c -r --new-file ds2.0r18/lib/lib/std/armor.c ds2.0r20b/lib/lib/std/armor.c *** ds2.0r18/lib/lib/std/armor.c Mon Nov 7 13:31:06 2005 --- ds2.0r20b/lib/lib/std/armor.c Wed Apr 5 19:33:18 2006 *************** *** 174,179 **** --- 174,181 ---- } static mixed array AddSave(mixed array vars) { + if(!vars) vars = ({}); + vars += ({ "Properties" }); return persist::AddSave(vars); } diff -c -r --new-file ds2.0r18/lib/lib/std/barkeep.c ds2.0r20b/lib/lib/std/barkeep.c *** ds2.0r18/lib/lib/std/barkeep.c Thu Feb 23 15:40:40 2006 --- ds2.0r20b/lib/lib/std/barkeep.c Thu Apr 6 22:53:36 2006 *************** *** 34,40 **** if( f < 0.1 ) { f = 1.0; } ! return query_value(MenuItems[item]->GetBaseCost(),query_base_currency(),this_object()->GetLocalCurrency()); } string GetLocalCurrency() { --- 34,40 ---- if( f < 0.1 ) { f = 1.0; } ! return query_value(load_object(MenuItems[item])->GetBaseCost(),query_base_currency(),this_object()->GetLocalCurrency()); } string GetLocalCurrency() { diff -c -r --new-file ds2.0r18/lib/lib/std/item.c ds2.0r20b/lib/lib/std/item.c *** ds2.0r18/lib/lib/std/item.c Wed Feb 22 15:32:57 2006 --- ds2.0r20b/lib/lib/std/item.c Wed Apr 5 19:33:18 2006 *************** *** 99,104 **** --- 99,106 ---- } static mixed array AddSave(mixed array vars) { + if(!vars) vars = ({}); + vars += ({ "Properties" }); return persist::AddSave(vars); } diff -c -r --new-file ds2.0r18/lib/lib/std/worn_storage.c ds2.0r20b/lib/lib/std/worn_storage.c *** ds2.0r18/lib/lib/std/worn_storage.c Sun Jan 29 23:47:21 2006 --- ds2.0r20b/lib/lib/std/worn_storage.c Wed Apr 5 19:33:18 2006 *************** *** 182,187 **** --- 182,189 ---- } static mixed array AddSave(mixed array vars) { + if(!vars) vars = ({}); + vars += ({ "Properties" }); return persist::AddSave(vars); } diff -c -r --new-file ds2.0r18/lib/lib/talk.c ds2.0r20b/lib/lib/talk.c *** ds2.0r18/lib/lib/talk.c Mon Jan 16 23:03:16 2006 --- ds2.0r20b/lib/lib/talk.c Wed Apr 5 19:33:18 2006 *************** *** 63,69 **** case TALK_SEMI_PRIVATE: if( target != this_object() ) return 0; tmp = "%^BOLD%^CYAN%^" + (string)who->GetName() + " whispers in " + ! lang + " to you,%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); break; --- 63,69 ---- case TALK_SEMI_PRIVATE: if( target != this_object() ) return 0; tmp = "%^BOLD%^CYAN%^" + (string)who->GetName() + " whispers in " + ! capitalize(lang) + " to you,%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); break; *************** *** 72,83 **** if( target != this_object() ) { if( msg[<1] == '?' ) tmp = (string)target->GetName(); else tmp = "to " + (string)target->GetName(); ! if( lang ) tmp += " in " + lang; } else { if( msg[<1] == '?' ) tmp = "you"; else tmp = "to you"; ! if( lang ) tmp += " in " + lang; } tmp = (string)who->GetName() + " " + pluralize(verb) + " " + tmp + ", \""; --- 72,83 ---- if( target != this_object() ) { if( msg[<1] == '?' ) tmp = (string)target->GetName(); else tmp = "to " + (string)target->GetName(); ! if( lang ) tmp += " in " + capitalize(lang); } else { if( msg[<1] == '?' ) tmp = "you"; else tmp = "to you"; ! if( lang ) tmp += " in " + capitalize(lang); } tmp = (string)who->GetName() + " " + pluralize(verb) + " " + tmp + ", \""; *************** *** 86,97 **** } else if( verb == "yell" ) { tmp = "%^BOLD%^GREEN%^You hear a " + (string)who->GetGender() ! + " " + (string)who->GetRace() + " yell in " + lang + " from a distance,%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); } else { ! if( lang ) tmp = pluralize(verb) + " in " + lang; else tmp = pluralize(verb); tmp = (string)who->GetName() + " " + tmp + ", \""; tmp = tmp + "%^BOLD%^CYAN%^" + msg + "%^RESET%^\""; --- 86,97 ---- } else if( verb == "yell" ) { tmp = "%^BOLD%^GREEN%^You hear a " + (string)who->GetGender() ! + " " + (string)who->GetRace() + " yell in " + capitalize(lang) + " from a distance,%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); } else { ! if( lang ) tmp = pluralize(verb) + " in " + capitalize(lang); else tmp = pluralize(verb); tmp = (string)who->GetName() + " " + tmp + ", \""; tmp = tmp + "%^BOLD%^CYAN%^" + msg + "%^RESET%^\""; *************** *** 101,113 **** case TALK_AREA: tmp = "%^BOLD%^GREEN%^" + (string)who->GetName() + " yells in " + ! lang + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); break; case TALK_WORLD: tmp = "%^BOLD%^BLUE%^" + (string)who->GetName() + " shouts in " + ! lang + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); break; --- 101,113 ---- case TALK_AREA: tmp = "%^BOLD%^GREEN%^" + (string)who->GetName() + " yells in " + ! capitalize(lang) + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); break; case TALK_WORLD: tmp = "%^BOLD%^BLUE%^" + (string)who->GetName() + " shouts in " + ! capitalize(lang) + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); break; *************** *** 131,136 **** --- 131,140 ---- lang = GetLanguageName(lang); } cols = GetScreen()[0]; + //debug("target",target); + //debug("cls",cls); + //debug("msg",msg); + //debug("lang",lang); if( msg[<1] != '?' && msg[<1] != '!' && msg[<1] != '.' ) msg = capitalize(msg) + "."; else msg = capitalize(msg); *************** *** 143,151 **** return 1; case TALK_SEMI_PRIVATE: ! if( !target ) tmp = "%^BOLD%^CYAN%^You whisper in " + lang + ",%^RESET%^ \"" + msg + "%^RESET%^\""; ! else tmp = "%^BOLD%^CYAN%^You whisper in " + lang + " to " + (string)target->GetName() + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); environment()->eventHearTalk(this_object(), target, cls, "whisper", --- 147,155 ---- return 1; case TALK_SEMI_PRIVATE: ! if( !target ) tmp = "%^BOLD%^CYAN%^You whisper in " + capitalize(lang) + ",%^RESET%^ \"" + msg + "%^RESET%^\""; ! else tmp = "%^BOLD%^CYAN%^You whisper in " + capitalize(lang) + " to " + (string)target->GetName() + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); environment()->eventHearTalk(this_object(), target, cls, "whisper", *************** *** 162,176 **** } if( target && msg[<1] == '?' ) { tmp = "You " + verb + " " + (string)target->GetName(); ! if( lang ) tmp = tmp + " in " + lang; } else if( target ) { tmp = "You " + verb + " to " + (string)target->GetName(); ! if( lang ) tmp = tmp + " in " + lang; } else { tmp = "You " + verb; ! if( lang ) tmp = tmp + " in " + lang; } tmp = tmp + ", \"%^BOLD%^CYAN%^" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); --- 166,180 ---- } if( target && msg[<1] == '?' ) { tmp = "You " + verb + " " + (string)target->GetName(); ! if( lang ) tmp = tmp + " in " + capitalize(lang); } else if( target ) { tmp = "You " + verb + " to " + (string)target->GetName(); ! if( lang ) tmp = tmp + " in " + capitalize(lang); } else { tmp = "You " + verb; ! if( lang ) tmp = tmp + " in " + capitalize(lang); } tmp = tmp + ", \"%^BOLD%^CYAN%^" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); *************** *** 179,185 **** return 1; case TALK_AREA: ! tmp = "%^BOLD%^GREEN%^You yell in " + lang + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); environment()->eventHearTalk(this_object(), target, cls, "yell", msg, --- 183,189 ---- return 1; case TALK_AREA: ! tmp = "%^BOLD%^GREEN%^You yell in " + capitalize(lang) + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); environment()->eventHearTalk(this_object(), target, cls, "yell", msg, *************** *** 187,193 **** break; case TALK_WORLD: ! tmp = "%^BOLD%^BLUE%^You shout in " + lang + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); (users() - ({ this_object() }))->eventHearTalk(this_object(), target, --- 191,197 ---- break; case TALK_WORLD: ! tmp = "%^BOLD%^BLUE%^You shout in " + capitalize(lang) + ",%^RESET%^ \"" + msg + "%^RESET%^\""; eventPrint(tmp, MSG_CONV); (users() - ({ this_object() }))->eventHearTalk(this_object(), target, diff -c -r --new-file ds2.0r18/lib/lib/teacher.c ds2.0r20b/lib/lib/teacher.c *** ds2.0r18/lib/lib/teacher.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/lib/teacher.c Wed Apr 5 19:44:08 2006 *************** *** 0 **** --- 1,176 ---- + /* /lib/teacher.c + * from the Dead Souls Library + * created 960320 by Blitz@Dead Souls + * Version: @(#) teacher.c 1.3@(#) + * Last modified: 96/10/28 + */ + + #include + #include + #include "include/teacher.h" + + inherit LIB_SENTIENT; + + private string array TeachingLanguages; + private mapping Students; + + + int eventDude(){ + return 1; + } + + /**** driver applies ****/ + + static void create() { + sentient::create(); + TeachingLanguages = ({}); + Students = ([]); + SetNoClean(1); + SetCommandResponses( ([ + "teach" : (: eventTeach :), + "teach" : (: eventTeach :), + "default" : (: eventHelp :), + "dude" : (: eventDude :), + ]) ); + } + + static void init() { + string str; + sentient::init(); + if( !living(this_player()) ) return; + str = (string)this_player()->GetKeyName(); + if( Students[str] ) { + eventForce("speak You will have to start your " + "studies anew, "+(string)this_player()->GetName()); + map_delete(Students, str); + } + } + + /**** data manipulation ****/ + + mixed AddTeachingLanguages(string *args){ + string *tmp_array = ({}); + if( !args ) + error("Bad argument 1 to AddTeachingLanguages."); + foreach(string lang in args){ + tmp_array += ({ capitalize(lower_case(lang)) }); + } + return (TeachingLanguages = distinct_array(TeachingLanguages + tmp_array)); + } + + mixed RemoveTeachingLanguages(string *args...) { + if( !args || !arrayp(args) ) + error("Bad argument 1 to RemoveTeachingLanguages."); + TeachingLanguages -= args; + return TeachingLanguages; + } + + string array GetTeachingLanguages() { return copy(TeachingLanguages); } + + string Expertise(){ + string tmp, expertises; + if(!sizeof(GetTeachingLanguages())) return "none"; + else if(sizeof(GetTeachingLanguages()) == 1) { + return GetTeachingLanguages()[0]; + } + expertises = implode(GetTeachingLanguages(), ", "); + if(sizeof(GetTeachingLanguages()) == 2){ + expertises = replace_string(expertises,", "," and "); + } + else if(sizeof(GetTeachingLanguages()) > 2){ + tmp = last_string_element(expertises,","); + expertises = replace_string(expertises, tmp, " and"+tmp); + } + return expertises; + } + + mapping GetStudents() { return copy(Students); } + + /**** high-level events ****/ + + int eventHelp(object who, string unused) { + eventForce("speak I am not sure of what you are " + "asking, " + (string)who->GetName() + "."); + if(sizeof( GetTeachingLanguages() )){ + eventForce("speak My area of expertise covers " + + Expertise() + "."); + eventForce("speak You can \"ask "+GetKeyName()+" to teach " + "\" if you have training points."); + } + return 1; + } + + int eventTeach(object who, string verb, string language) { + if( !who || environment(who) != environment() ) { + return 0; + } + if( !sizeof(language) || !sizeof(verb) ) return eventHelp(who, 0); + if( verb == "teach" ) { + + language = capitalize(language); + + if( Students[ (string)who->GetKeyName() ] ) { + eventForce("speak I am already teaching you!"); + return 0; + } + if( member_array(language, this_object()->GetTeachingLanguages()) == -1 ) { + eventForce("speak I know nothing about the " +capitalize(language)+" language."); + return 0; + } + if( (int)this_player()->GetTrainingPoints() < 1 ) { + eventForce("speak You need more training points."); + return 0; + } + Students[ (string)who->GetKeyName() ] = language; + eventStart(who, language); + call_out((: ContinueTeaching, who, language, 0 :), TEACHING_WAIT); + return 1; + } + return 1; + } + + static int ContinueTeaching(object who, string language, int x) { + language = capitalize(language); + if( !present(who, environment()) ) return 0; + if( !Students[(string)who->GetKeyName()] ) return 0; + if( x > 4 ) { + map_delete(Students, (string)who->GetKeyName()); + eventComplete(who, language); + who->AddLanguagePoints(language,(this_player()->GetLevel()*5)); + who->AddTrainingPoints(-1); + return 1; + } else { + eventContinue(who, language, ++x); + call_out((: ContinueTeaching, who, language, x :), TEACHING_WAIT); + return 1; + } + } + + /**** message handling events ****/ + + /* The three following events are purely *aesthetic*, + * Hopefully prolific coders will override them for + * more interesting teaching techniques. :) + */ + + int eventStart(object who, string language) { + who->eventPrint(GetName() + " begins teaching you " + "about the " + language + " language."); + environment()->eventPrint(GetName() + " begins teaching " + + (string)who->GetName() + "...", who); + return 1; + } + + int eventContinue(object who, string language, int x) { + who->eventPrint("You listen intently as " + GetName() + + " continues " + possessive(this_object()) + + " dissertation on " + language + "."); + return 1; + } + + int eventComplete(object who, string language) { + who->eventPrint("You feel somewhat more competent in " + language + "."); + eventForce("speak I can teach you no more for now, " + + (string)who->GetName() + "."); + return 1; + } diff -c -r --new-file ds2.0r18/lib/lib/user/autosave.c ds2.0r20b/lib/lib/user/autosave.c *** ds2.0r18/lib/lib/user/autosave.c Mon Jan 16 23:03:16 2006 --- ds2.0r20b/lib/lib/user/autosave.c Wed Apr 5 19:33:18 2006 *************** *** 84,90 **** } LastSave = x; save_player(GetKeyName()); ! if( !creatorp(this_object()) ) { eventPrint("Autosaving...", MSG_SYSTEM); } } --- 84,90 ---- } LastSave = x; save_player(GetKeyName()); ! if( !creatorp(this_object()) && !present("visitor pass",this_object()) ) { eventPrint("Autosaving...", MSG_SYSTEM); } } diff -c -r --new-file ds2.0r18/lib/log/chan/ds ds2.0r20b/lib/log/chan/ds *** ds2.0r18/lib/log/chan/ds Sat Mar 11 21:02:45 2006 --- ds2.0r20b/lib/log/chan/ds Wed Dec 31 19:00:00 1969 *************** *** 1,2208 **** - [23Feb2006-17:07:01] Cratylus Dead Souls 2.0r14 is now available. There is also a patch for convenient upgrading. http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls - [27Feb2006-10:45:16] Niang@Kol hello? - [27Feb2006-10:45:22] Cratylus@Frontiers hi - [27Feb2006-10:45:31] Yen@Nightfall Hi :) - [27Feb2006-10:45:43] Niang@Kol how are you all today - [27Feb2006-10:46:13] Cratylus@Frontiers swell - [27Feb2006-10:47:15] Niang@Kol i've managed to endup with 4 unique monsters again, i think i must be doing something wrong with the set_unique flag :( - [27Feb2006-10:47:43] Cratylus@Frontiers hmm - [27Feb2006-10:48:11] Niang@Kol it dose wander, would that make a difference - [27Feb2006-10:48:48] Cratylus@Frontiers hmmm - [27Feb2006-10:49:28] Cratylus@Frontiers i thought i fixed that. i'll look at it a little later today - [27Feb2006-10:50:56] Niang@Kol i remeber the update... i think - [27Feb2006-10:52:39] Niang@Kol did you get the emails i sent, or are you hiding from your email inbox again? - [27Feb2006-10:53:11] Cratylus@Frontiers hmm - [27Feb2006-10:53:25] Cratylus@Frontiers not recently - [27Feb2006-10:53:37] Cratylus@Frontiers maybe they got tagged as junk. when did you send them? - [27Feb2006-10:54:53] Niang@Kol first was beginging of feb, about prblems of advancement - [27Feb2006-10:55:28] Niang@Kol second 16th about joining guilds - [27Feb2006-10:56:12] Niang@Kol third was a quick message to see if you were still alive as i hadn't heard from you for a while - [27Feb2006-10:56:30] Cratylus@Frontiers ok the first one you mean, it looks like i responded on jan 28 - [27Feb2006-10:57:22] Niang@Kol odd i got it down as the second - [27Feb2006-10:57:26] Cratylus@Frontiers after that, i have nothing from you in my inbox - [27Feb2006-10:57:28] Niang@Kol of feb - [27Feb2006-10:58:04] Niang@Kol there was document attached to show the probelm - [27Feb2006-10:58:36] Cratylus@Frontiers ok so on the 2nd you sent something with an attachment? - [27Feb2006-10:59:03] Niang@Kol not got anything on this computer earlyer that cos my old computer blew up and i had to get a new one - [27Feb2006-10:59:29] Niang@Kol twice ( i forgot the atttachment the first time) - [27Feb2006-10:59:53] Cratylus@Frontiers the last email i have from you is jan26 - [27Feb2006-10:59:59] Cratylus@Frontiers nothing from you in my junk folder or trash - [27Feb2006-11:00:21] Niang@Kol hmmm odd - [27Feb2006-11:01:23] Niang@Kol how many email addresses do you have? - [27Feb2006-12:56:47] Cratylus@Frontiers i still want to see yer guildmaster code. send it to me when your email thing is fixed - [27Feb2006-22:07:57] Cratylus you can use this line to ask questions like that, kristus - [27Feb2006-22:08:11] Kristus@Dead_Souls_kristus ahh - [27Feb2006-22:08:13] Cratylus it's a line that dead souls muds listen in on - [27Feb2006-22:08:24] Kristus@Dead_Souls_kristus thanks - [27Feb2006-22:08:28] Cratylus no prob - [28Feb2006-12:33:57] Cratylus hiya admin - [28Feb2006-12:34:11] Cratylus you can use this channel to ask questions, if you run into problems - [28Feb2006-12:34:25] Cratylus it's a channel dead souls muds listen to - [28Feb2006-15:27:11] Cratylus heya odin - [28Feb2006-15:27:27] Cratylus use this line for questions if you run into trouble - [28Feb2006-15:42:15] Arren@OuterSpace Crat: You're a lawyer? - [28Feb2006-15:42:33] Cratylus am i that much of a jerk? - [28Feb2006-15:42:51] Arren@OuterSpace What use are you when I get into trouble then. - [28Feb2006-15:43:13] Arren@OuterSpace I saw the best notice the other day. It said "No solicitors." - [28Feb2006-15:43:19] Arren@OuterSpace yesterday - [28Feb2006-15:43:52] Cratylus good thing it didnt say no solicitation - [28Feb2006-15:43:58] Cratylus or is that the trouble? - [28Feb2006-15:44:10] Arren@OuterSpace well, in England, a solicitor is like a lawyer. - [28Feb2006-15:44:14] Arren@OuterSpace soliciting is something else - [28Feb2006-15:44:18] Cratylus :) - [28Feb2006-15:46:14] Arren@OuterSpace goes back to A2. - [28Feb2006-15:46:58] Cratylus sorry i couldnt be of help - [28Feb2006-15:47:04] Arren@OuterSpace heh - [28Feb2006-15:47:09] Arren@OuterSpace we don't get this channel on A2. - [28Feb2006-15:47:13] Cratylus still, i'd be happy to hear all about your legal trouble - [28Feb2006-15:47:27] Cratylus liven things up around here - [28Feb2006-15:47:31] Arren@OuterSpace Well, when we got to talking, the policeman was very nice. - [28Feb2006-15:47:37] Arren@OuterSpace and we went back to his place - [28Feb2006-15:48:45] Arren@OuterSpace it gets boring after that - [28Feb2006-15:49:03] Cratylus better luck next time - [28Feb2006-15:49:33] Arren@OuterSpace snuggles with Cratylus. - [28Feb2006-15:49:45] Cratylus w00t - [28Feb2006-15:51:20] Plugh@Frontiers get a room - [28Feb2006-15:52:30] Arren@OuterSpace you're boring - [28Feb2006-15:52:54] Cratylus well yer always so mean to me - [28Feb2006-15:53:04] Cratylus i'm just waiting for the other shoe to drop - [28Feb2006-23:01:03] Cratylus hiya kirian - [28Feb2006-23:01:15] Cratylus use this intermud line for questions and stuff - [28Feb2006-23:01:21] Kirian@13 Kingdoms thanks :-) - [28Feb2006-23:01:53] Kirian@13 Kingdoms just figuring out the mudlib to decide on if we are going with it or not :) probably be asking questions tommorow when i've had chance to play around a bit :) - [28Feb2006-23:02:07] Cratylus nods. - [01Mar2006-14:35:26] Cratylus hi shemp - [01Mar2006-14:35:34] Cratylus if you have questions about dead souls, use this line - [01Mar2006-15:46:43] Cratylus ah abby. long time no see - [01Mar2006-18:40:09] Abby@Fading Summer Hey hey. - [01Mar2006-18:56:16] A shadow :) - [01Mar2006-19:13:26] Abby@Fading Summer Hmm, invis over the ds comm.... - [01Mar2006-19:13:30] Abby@Fading Summer Tsk tsk. ;) - [01Mar2006-19:39:23] Cratylus yeh - [01Mar2006-19:39:26] Cratylus accident - [01Mar2006-19:39:38] Cratylus was in the middle of trying not to get hassled by orcs - [01Mar2006-20:10:15] Cratylus :) - [01Mar2006-21:39:40] Cratylus howdy arnold - [01Mar2006-21:39:50] Cratylus use this line for questions n stuff - [02Mar2006-19:05:10] Kristus@Dead_Souls_kristus where would I edit to change how long someone can be idle before they get disconnected? - [02Mar2006-19:07:23] Cratylus /lib/secure/include/config.h - [02Mar2006-19:07:35] Cratylus LOGON_TIMEOUT - [02Mar2006-19:07:53] Cratylus oh wait thats not what you asked - [02Mar2006-19:07:59] Kristus@Dead_Souls_kristus thanks! - [02Mar2006-19:08:13] Kristus@Dead_Souls_kristus ah - [02Mar2006-19:09:07] Cratylus /lib/player.c line 47 - [02Mar2006-19:09:19] Kristus@Dead_Souls_kristus thanks - [02Mar2006-19:09:35] Cratylus though that really should be in config.h. I'll put it there in a later release - [02Mar2006-19:10:16] Cratylus you know you can change your mud name in admintool, right? - [02Mar2006-19:11:48] Kristus@Dead_Souls_kristus ahh, didnt notice that before. If I shutdown the mud will it boot back up? Or do I have to do that through my shell account? - [02Mar2006-19:12:06] Cratylus@Frontiers you're on linux? - [02Mar2006-19:12:50] Kristus@Dead_Souls_kristus Not right now, but the mud is, and I have a shell account I can log into from here. - [02Mar2006-19:13:07] Cratylus if you're on unix and you used the bin/startmud script then the mud should bounce back up. - [02Mar2006-19:13:17] Cratylus otherwise you'll need to restart it manually - [02Mar2006-19:13:35] Kristus@Dead_Souls_kristus ah, I did ./driver ./mudos.cfg - [02Mar2006-19:13:47] Cratylus then you'll need to do it again after shutting down - [02Mar2006-19:13:55] Kristus@Dead_Souls_kristus k - [02Mar2006-19:14:29] Kristus@Dead_Souls_kristus so if I do ./startmud ./mudos.cfg it will auto boot upon shutdown? - [02Mar2006-19:14:39] Cratylus no - [02Mar2006-19:15:03] Cratylus edit startmud so that export MUDHOME="" has your mud dir in it - [02Mar2006-19:15:23] Cratylus for example: export MUDHOME="/home/kristus/ds" - [02Mar2006-19:15:37] Cratylus then just type: ./startmud - [02Mar2006-19:18:40] Kristus@The Hollow there we go - [02Mar2006-22:19:15] Skout@Bragi's Song Greets all - [02Mar2006-22:19:21] Cratylus howdy! - [02Mar2006-22:20:13] Skout@Bragi's Song congratz on a nice mudlib, I am just finished with the install which was by far the easiest mudos based install I have done. - [02Mar2006-22:20:39] Cratylus thanks :) - [02Mar2006-22:30:04] Merlin@Pirates' Mud Hello - [02Mar2006-22:30:18] Merlin@Pirates' Mud yeah this mudlib rocks - [02Mar2006-22:30:32] Merlin@Pirates' Mud QCS is pretty nifty - [02Mar2006-22:31:25] Cratylus glad it's useful - [02Mar2006-22:31:33] Cratylus please let me know if you run into bugs - [02Mar2006-23:43:28] Merlin@Pirates' Mud definitely - [02Mar2006-23:44:07] Merlin@Pirates' Mud actually using v22.2b14 right now there is a b15 now right? - [03Mar2006-05:56:38] Cratylus b14 is the last supported mudos i'm aware of - [03Mar2006-12:04:52] Cratylus hi kurgan - [03Mar2006-12:05:04] Cratylus this line is for asking dead souls questions n stuff - [03Mar2006-15:00:01] Kristus@The Hollow you there, cratylus? - [03Mar2006-15:00:13] A shadow yep - [03Mar2006-15:00:21] Cratylus whats up? - [03Mar2006-15:01:07] Kristus@The Hollow I got a fatal error (illegal size read from swap file). How can I prevent this? - [03Mar2006-15:01:29] Cratylus this error is happening when you start the mud? - [03Mar2006-15:02:56] Cratylus ... - [03Mar2006-15:07:35] Cratylus ok - [03Mar2006-15:07:45] Cratylus ok - [03Mar2006-17:47:52] Cratylus we're back - [04Mar2006-05:20:32] Noose@Dead_Souls_noose tissi - [04Mar2006-05:20:42] Noose@Dead_Souls_noose pitää vittu saaha nää värit helevettiin - [04Mar2006-05:20:48] Noose@Dead_Souls_noose boottais tän - [04Mar2006-06:00:22] Noose@Dead_Souls_noose tidididi - [04Mar2006-06:00:28] Noose@Dead_Souls_noose iha paskat värit - [04Mar2006-07:32:01] Cratylus finnish is a frustrating language to me - [04Mar2006-07:32:13] Cratylus i just cannot make heads or tails of it - [04Mar2006-07:32:29] Noose@Utajaervi MUD x) - [04Mar2006-07:33:48] Cratylus i know a bunch of european languages, so i can usually decipher the general idea of a european language, even if i dont know it. but if there are white people talking and i cannot understand one single word they say, it's either finnish or hungarian - [04Mar2006-07:35:04] Cratylus only finnish i know is "haista vittu" - [04Mar2006-07:35:18] Noose@Utajaervi MUD that's a good start - [04Mar2006-07:35:38] Cratylus i thought you might appreciate it - [04Mar2006-07:35:44] Noose@Utajaervi MUD hahahah - [04Mar2006-07:44:03] Tijntje@OuterSpace Finnish and hungarian are related, IIRC. - [04Mar2006-07:45:29] Cratylus yep - [04Mar2006-07:45:59] Cratylus estonian is supposed to be similar - [04Mar2006-07:48:04] Cratylus oh i also cant decipher any basque - [05Mar2006-18:15:17] Deminix@Dead_Souls_jerin huh? - [05Mar2006-18:15:21] Cratylus :) - [05Mar2006-18:15:40] Cratylus this line is for questions n stuff, if you run into trouble with the dead souls lib - [05Mar2006-18:16:04] Deminix@Dead_Souls_jerin My appologies. Thanks! - [05Mar2006-18:16:10] Cratylus no prob - [05Mar2006-18:17:38] Jerin@Dead_Souls_jerin Ah, nifty - [05Mar2006-18:20:39] Jerin@Dead_Souls_jerin Sorry, we're both kinda tards on this - [05Mar2006-18:21:47] Cratylus well, everyones a newbie sometime - [05Mar2006-18:22:07] Cratylus dead souls is designed to be good for advanced admins, but friendly to newbies too - [05Mar2006-18:22:26] Jerin@Dead_Souls_jerin Definately been easier then some of the others - [05Mar2006-18:22:26] Cratylus if you run into bugs and stuff, please let me know - [05Mar2006-18:23:32] Jerin@Dead_Souls_jerin heh, thanks - [05Mar2006-18:24:30] Jerin@Dead_Souls_jerin What channels are available - [05Mar2006-18:25:00] Jerin@Dead_Souls_jerin Sorry, I'm a bit of a putz - [05Mar2006-18:25:02] Cratylus well as a noob, this is the only channel you should use for a while. but there is also intergossip and intercre - [05Mar2006-18:25:16] Jerin@Dead_Souls_jerin Well, within the mud I mean, sorry - [05Mar2006-18:25:24] Cratylus i discourage people from using intergossip, because it is extremely hostile to newcomers - [05Mar2006-18:25:33] Cratylus oh. type: lines - [05Mar2006-18:25:37] Jerin@Dead_Souls_jerin lines - [05Mar2006-18:25:41] Jerin@Dead_Souls_jerin whoops - [05Mar2006-18:25:43] Cratylus heh - [05Mar2006-18:25:51] Deminix@Dead_Souls_jerin Thanks Cratylus - [05Mar2006-18:25:55] Cratylus no prob - [05Mar2006-18:25:57] Jerin@Dead_Souls_jerin Sorry, Man, I'm showin my newbiness - [05Mar2006-18:26:07] Cratylus better here than intergossip i assure you - [05Mar2006-18:26:13] Jerin@Dead_Souls_jerin lol - [05Mar2006-18:26:45] Kristus@The Hollow hey cratylus...I want to add a setting in the player file that determines which plane of existence someone is on. Each plane will have altered commands and descriptions for objects and rooms. Each object file will have the data for each plane of existence contained in one file, and the SetLong, SetShort, etc will point to a function that determines which state they are in and changes its value accordingly. What do you think would be the best method of doing this? - [05Mar2006-18:27:21] Cratylus well the Right Way involves adding SetPlane() and GetPlane() methods to the player object - [05Mar2006-18:27:47] Kristus@The Hollow /lib/player.c? - [05Mar2006-18:27:47] Cratylus see SetRace() for how this works - [05Mar2006-18:27:49] Cratylus ya - [05Mar2006-18:28:31] Cratylus the lazy way is to SetProperty("plane","blah") but that should be used only temporarily, if at all - [05Mar2006-18:28:42] Kristus@The Hollow yeah - [05Mar2006-18:29:06] Kristus@The Hollow when you say to see SetRace()...where am I looking for this reference at? - [05Mar2006-18:29:14] Kristus@The Hollow in player.c? - [05Mar2006-18:29:22] Cratylus heh yeah that's not actually in player.c is it - [05Mar2006-18:29:32] Kristus@The Hollow dont think so - [05Mar2006-18:29:48] Cratylus i think SetRace() is in /lib/race.c - [05Mar2006-18:30:04] Cratylus anyway, dont forget what i'm abotu to tell you: - [05Mar2006-18:30:32] Cratylus to make your PlayerPlane variable save in each players playerfile, you must add it to the AddSave line in player.c - [05Mar2006-18:31:02] Cratylus what you're doing is adding a variable to the player object, but if it isn't an AddSave, it won't persist across logons - [05Mar2006-18:31:59] Kristus@The Hollow ahhh, thanks - [05Mar2006-18:34:21] Cratylus i suggest you start with just one plane aside from the normal default plane, so you can get an idea of the complexity involved - [05Mar2006-18:58:57] Kristus@The Hollow is there a reason why apostrophes were stripped in communication? - [05Mar2006-19:00:57] Cratylus heh - [05Mar2006-19:01:03] Cratylus that's a bug - [05Mar2006-19:01:14] Cratylus i'll fix it for the next release - [05Mar2006-19:01:28] Kristus@The Hollow I already fixed it on mine :p - [05Mar2006-19:01:36] Cratylus right on - [05Mar2006-19:02:16] Kristus@The Hollow there was a replace_string() function. How is that a bug? Seems like thats the way it was meant to be. - [05Mar2006-19:02:30] Cratylus it's a bug that it happens on comms - [05Mar2006-19:02:42] Kristus@The Hollow ahh - [05Mar2006-19:02:50] Cratylus basically stripping apostrophes is a workaround to a parsing problem - [05Mar2006-19:03:18] Cratylus if you have an item like "khadgar's pipe of insight", the parser has trouble dealing with the apostrophe - [05Mar2006-19:03:42] Cratylus until i fix that parser bug, stripping apostrophes is a quick workaround - [05Mar2006-19:03:48] Cratylus i'm just the one guy, see - [05Mar2006-19:03:50] Kristus@The Hollow ahh - [05Mar2006-19:06:07] Kristus@The Hollow parser problem on driver side? - [05Mar2006-19:06:21] Kristus@The Hollow or mudlib? - [05Mar2006-19:06:27] Cratylus dunno yet. still on the todo list to examine - [05Mar2006-19:21:22] Arnolde@Xanth Mud Sorry for the newbie question, but in long lines of description, why break it up into shorter lines with "+ ? - [05Mar2006-19:22:36] Cratylus tradition - [05Mar2006-19:23:00] Cratylus it's not needed, and in some exotic situations, even screws things up - [05Mar2006-19:23:26] Cratylus now, i'm talking about the +, not about breaking lines into shorter lines - [05Mar2006-19:23:54] Cratylus shorter lines are good for reasons of readability and to make sure there are no buffer problems with lines beeing too long - [05Mar2006-19:25:03] Arnolde@Xanth Mud Got it, thanks - [05Mar2006-19:33:31] Jerin@Jerins Folly Should the shutdown command crash when you first set it up? - [05Mar2006-19:33:55] Cratylus hmmm well no "crashing" isn't intended behavior - [05Mar2006-19:34:03] Kristus@The Hollow haha - [05Mar2006-19:34:05] Cratylus can you describe in more detail what happened? - [05Mar2006-19:34:05] Jerin@Jerins Folly Ya, I kinda thought so - [05Mar2006-19:34:42] Jerin@Jerins Folly Sure, I changed the name of the game via admintool, and tried to reboot the mud via the tool, and it errored out halfway thru - [05Mar2006-19:34:58] Cratylus can you email me the error and crash messages? - [05Mar2006-19:35:08] Cratylus cratylus@comcast.net - [05Mar2006-19:36:20] Jerin@Jerins Folly Sure, lemme see if it still does it - [05Mar2006-19:38:15] Jerin@Jerins Folly Apparently it works now - [05Mar2006-19:38:29] Cratylus if you can email me the original messages that would be great - [05Mar2006-19:39:33] Jerin@Jerins Folly I think I lost them in my back buffer, sorry - [05Mar2006-19:39:37] Cratylus k - [05Mar2006-19:40:25] Jerin@Jerins Folly My bad, I'm lying - [05Mar2006-19:40:35] Cratylus how so? - [05Mar2006-19:40:43] Jerin@Jerins Folly I didn't lose it - [05Mar2006-19:41:02] Cratylus good - [05Mar2006-19:41:02] Jerin@Jerins Folly Thought I had tried in telnet and lost it but I was wrong - [05Mar2006-19:41:36] Jerin@Jerins Folly There ya go - [05Mar2006-19:43:30] Cratylus ok, thx. that isn't really a crash - [05Mar2006-19:44:11] Cratylus what you're looking at is a successful shutdown where the system tries to forcibly log off everyone but errors on one or more - [05Mar2006-19:44:17] Jerin@Jerins Folly Sorry, didn't know the correct term - [05Mar2006-19:44:19] Cratylus i'll look into why - [05Mar2006-19:44:33] Cratylus thanks for the error report - [05Mar2006-19:45:05] Jerin@Jerins Folly Sorry, I'm a putz today - [05Mar2006-19:45:53] Cratylus yknow, i think that's enough "i suck" for today - [05Mar2006-19:46:11] Cratylus i appreciate the error report, and it really is ok to be a noob for a while - [05Mar2006-21:33:52] Cratylus hiya brodbane - [05Mar2006-21:34:02] Cratylus use this channel for questions n stuff - [05Mar2006-21:34:12] Brodbane@Dead_Souls_brodbane heya - [05Mar2006-21:34:22] Brodbane@Dead_Souls_brodbane Sorry, reorienting myself with the lib - [05Mar2006-21:35:19] Cratylus nods. - [05Mar2006-21:35:49] Brodbane@Dead_Souls_brodbane Whats the tell syntax? - [05Mar2006-21:35:55] Brodbane@Dead_Souls_brodbane tell msg? - [05Mar2006-21:36:19] Brodbane@Dead_Souls_brodbane ah yes, domain helps - [05Mar2006-21:36:35] Brodbane@Dead_Souls_brodbane Brodbane = Ken Thompson. Thanks for the emailo - [05Mar2006-21:36:39] Cratylus no prob - [05Mar2006-21:36:51] Brodbane@Dead_Souls_brodbane I'm not the founder of C++ though, thats a different Ken Thompson - [05Mar2006-21:36:53] Cratylus hope ds suits you - [05Mar2006-21:36:55] Cratylus heh - [05Mar2006-21:36:57] Brodbane@Dead_Souls_brodbane Although, I know him - [05Mar2006-21:37:22] Brodbane@Dead_Souls_brodbane The last mud I developed on was a nightmare release. I stopped in 2002 - [05Mar2006-21:37:52] Cratylus i've been trying to get descartes to donate the nightmare code to me - [05Mar2006-21:38:18] Brodbane@Dead_Souls_brodbane What is your history in all of this? - [05Mar2006-21:38:46] Brodbane@Dead_Souls_brodbane I read the faq! - [05Mar2006-21:39:00] Cratylus nothing spectacular. just a dude who wanted to revive the code - [05Mar2006-21:39:16] Brodbane@Dead_Souls_brodbane I'm happy to see it operational again - [05Mar2006-21:39:36] Cratylus it was rather trickier and more time consuming than i'd anticipated - [05Mar2006-21:39:42] Cratylus but fun to do - [05Mar2006-21:40:04] Brodbane@Dead_Souls_brodbane What was impressive was the single batch file to launch - [05Mar2006-21:40:12] Brodbane@Dead_Souls_brodbane Win32 was never a "smooth" ride - [05Mar2006-21:40:39] Cratylus getting it to work on windows was....less than easy - [05Mar2006-21:41:09] Brodbane@Dead_Souls_brodbane I plan on using Win32, because of my utter lack of linux knowledge - [05Mar2006-21:42:03] Cratylus yeah, i figured that was a big obstacle to a lot of people - [05Mar2006-21:42:23] Cratylus and these days, win32 boxes are decent servers - [05Mar2006-21:42:25] Brodbane@Dead_Souls_brodbane I've had mandrake/fedora up and running, but its difficult for me to troubleshoot - [05Mar2006-21:42:53] Brodbane@Dead_Souls_brodbane I plan on launching a dedicated server tomorrow. Our original mud was called "Eve" and it may be revived - [05Mar2006-21:43:03] Cratylus nods. - [05Mar2006-21:44:00] Brodbane@Dead_Souls_brodbane You noted a lack of database support - [05Mar2006-21:44:04] Cratylus yep - [05Mar2006-21:44:12] Cratylus i just dunno nothin about em - [05Mar2006-21:44:22] Brodbane@Dead_Souls_brodbane There will be some development done on a mysql backend. All of that work will be public domain - [05Mar2006-21:44:38] Cratylus sweet - [05Mar2006-21:45:12] Brodbane@Dead_Souls_brodbane It will be interesting coding in structured C - [05Mar2006-21:45:16] Brodbane@Dead_Souls_brodbane It has its benefits though - [05Mar2006-21:47:08] Jerin@Jerins Folly I actually run a diku mud and added database support to that - [05Mar2006-21:48:13] Brodbane@Dead_Souls_brodbane mysql/postgres? - [05Mar2006-21:48:25] Jerin@Jerins Folly MySQL - [05Mar2006-21:49:27] Brodbane@Dead_Souls_brodbane I dont know enough about Diku to understand if its mutually beneficial - [05Mar2006-21:49:55] Jerin@Jerins Folly there are a few parts that it's useful for - [05Mar2006-22:34:59] Brodbane@Eve Much better - [06Mar2006-09:33:34] Tannis@Crimson Blood po zi - [06Mar2006-09:34:08] Cratylus hello - [06Mar2006-09:34:28] Tannis@Crimson Blood greetings, I was testing channel :) - [06Mar2006-09:34:56] Cratylus nods. - [06Mar2006-11:34:16] Brodbane@Eve Good morning - [06Mar2006-11:35:40] Avatar@OuterSpace Hi Brodbane. - [06Mar2006-16:04:05] Brodbane@Eve Man i love this lib! - [06Mar2006-21:18:49] Cratylus :) glad ya like it - [06Mar2006-21:19:19] Kristus@The Hollow he said that a looong time ago :p - [06Mar2006-21:29:20] Cratylus i catch up as i can - [06Mar2006-22:44:27] Brodbane@Eve This lib has made my month - [06Mar2006-22:44:51] Jota@Eve Test - [06Mar2006-22:44:51] Cratylus cool - [06Mar2006-22:45:21] Brodbane@Eve Cratylus, I did notice some issues though. Minor - [06Mar2006-22:45:31] Cratylus go on - [06Mar2006-22:45:35] Brodbane@Eve If you die by flee/tick bite, the pronouns are off - [06Mar2006-22:45:51] Cratylus agh yes, fixing the felas and lice are on the todo list - [06Mar2006-22:45:58] Cratylus fleas - [06Mar2006-22:46:06] Brodbane@Eve And the fleas are not curable - [06Mar2006-22:46:24] Cratylus that's more of a screwup in coding an exaple than in the germ system - [06Mar2006-22:46:32] Cratylus but you're right, it needs fixing - [06Mar2006-22:46:32] Brodbane@Eve The box of tricks in each wizards room was a nice touch. It entertained me for about an hour - [06Mar2006-22:47:16] Cratylus what do you think of the manual and handbook? - [06Mar2006-22:47:52] Brodbane@Eve I haven't read the players manual. I did read the wizard manual and did find a lot of useful things there - [06Mar2006-22:47:58] Cratylus k - [06Mar2006-22:48:20] Brodbane@Eve Did the use of "my" come standard with this lib? - [06Mar2006-22:48:46] Cratylus if you mean using it to specify objects to the parser, it's a mudos thing, not a lib thing - [06Mar2006-22:49:10] Brodbane@Eve My old mud must of been an older mudos, because I was unable to use it previously - [06Mar2006-22:49:33] Cratylus yeah, mudos really did fix a lot of stuff since the old days - [06Mar2006-22:49:41] Brodbane@Eve Oh, I did find another bug. It has to do with containers - [06Mar2006-22:49:43] Cratylus too bad it's no longer being maintained - [06Mar2006-22:50:01] Cratylus container recursiveness is fuxt, if that's what you mean - [06Mar2006-22:50:15] Brodbane@Eve something else - [06Mar2006-22:50:29] Brodbane@Eve if you put your staff in your robe, then relog, you will be holding a new staff - [06Mar2006-22:50:39] Cratylus heh - [06Mar2006-22:50:43] Cratylus weird - [06Mar2006-22:50:47] Brodbane@Eve query_auto_load() a little funny - [06Mar2006-22:50:53] Cratylus i'll look into that. thank you - [06Mar2006-22:51:05] Brodbane@Eve I'll do some formal bug reports, i've been mostly playing - [06Mar2006-22:51:25] Cratylus eh, formalize it if you like, but i do ok with informal messages too - [06Mar2006-22:51:55] Brodbane@Eve Jota was in a lecture when I removed his right hand. I believe he may of drawn some attention to himself - [06Mar2006-22:53:02] Cratylus the heal comand automatically fixes both health points and amputated limbs - [06Mar2006-22:53:18] Brodbane@Eve Yeah, I repaired him with the tricorder - [06Mar2006-22:55:20] Cratylus i'm rather drunk, so please excuse me if i'm missing something obvious, but i'm not spotting query_auto_load() as a sefun or efun - [06Mar2006-23:14:58] Brodbane@Eve Whoa, that was an outage - [06Mar2006-23:15:08] Cratylus ? - [06Mar2006-23:15:14] Brodbane@Eve Lost connection for a while - [07Mar2006-10:28:11] Daelas@Moraelinost hello? - [07Mar2006-10:30:24] Daelas@Moraelinost is anyone there that can help me with a coding question? - [07Mar2006-10:31:08] Brodbane@Eve sure - [07Mar2006-10:31:28] Daelas@Moraelinost Thanks Brodbane - [07Mar2006-10:31:42] Brodbane@Eve No problem, hopefully I can help - [07Mar2006-10:31:46] Daelas@Moraelinost I'm trying to create a working stargate and have not coded much before. - [07Mar2006-10:31:58] Brodbane@Eve Just to portal you to another place in the mud? - [07Mar2006-10:32:14] Daelas@Moraelinost correct. only in my own mud, just different domain. - [07Mar2006-10:32:26] Daelas@Moraelinost like another world in my mud - [07Mar2006-10:32:36] Brodbane@Eve Ok, thats just basically an exit - [07Mar2006-10:32:52] Brodbane@Eve If you want it to be an item, like a couch that magically does that, it would be a function of the object - [07Mar2006-10:33:41] Daelas@Moraelinost Can it be something that I set? I want to 'dial earth' for instance, then set the exit to a certain location. - [07Mar2006-10:33:59] Daelas@Moraelinost after going through, I want to deactivate the item until it is dialed again. - [07Mar2006-10:34:09] Brodbane@Eve yes, thats easy enough. Let me code an example for you - [07Mar2006-10:34:19] Daelas@Moraelinost that would be cool. - [07Mar2006-10:34:29] Daelas@Moraelinost I can show you what I have so far if you want? - [07Mar2006-10:35:09] Brodbane@Eve sure, would you like me to pop over? - [07Mar2006-10:35:25] Daelas@Moraelinost you can do that? - [07Mar2006-10:35:44] Daelas@Moraelinost yes if you can - [07Mar2006-10:35:52] Brodbane@Eve IP address/port? - [07Mar2006-10:36:24] Daelas@Moraelinost on a localhost ip 127.0.0.1 port 6666 - [07Mar2006-10:36:26] Daelas@Moraelinost does that help? - [07Mar2006-10:36:38] Brodbane@Eve ah, that wont allow me to enter your mud - [07Mar2006-10:36:46] Daelas@Moraelinost how do I find my ip? - [07Mar2006-10:36:46] Brodbane@Eve it would have to be a public IP. We can work around that though - [07Mar2006-10:37:02] Brodbane@Eve email kenthompson1@gmail.com your snippet - [07Mar2006-10:37:12] Daelas@Moraelinost okay. - [07Mar2006-10:37:50] Brodbane@Eve I'm going to set up a website with examples that will compile with the dead souls lib at some point in the futuer - [07Mar2006-10:37:52] Brodbane@Eve future - [07Mar2006-10:38:55] Daelas@Moraelinost emailed. that would be cool. I also want to learn to compile my own mud, but I keep getting errors. - [07Mar2006-10:39:21] Brodbane@Eve yeah, thats not very easy - [07Mar2006-10:40:09] Brodbane@Eve Your snippet is pretty complete - [07Mar2006-10:40:45] Daelas@Moraelinost I got the second half from Cratylus and want to adjust it to allow to "dial to " a word. - [07Mar2006-10:40:57] Daelas@Moraelinost like earth, or Chulak, etc... - [07Mar2006-10:41:05] Daelas@Moraelinost but only certain places. - [07Mar2006-10:41:09] Brodbane@Eve ok, so it would dial a word, then the word would line up with a place - [07Mar2006-10:41:25] Daelas@Moraelinost correct. - [07Mar2006-10:41:39] Daelas@Moraelinost like that now, except looks for an integer. - [07Mar2006-10:42:11] Daelas@Moraelinost I also only want the gate 'open' for a certain amount of time and then deactivate. - [07Mar2006-10:42:34] Brodbane@Eve ok, you have the framework to do it fairly easily - [07Mar2006-10:42:50] Daelas@Moraelinost I know there is a way to do a preExit query, can I do a postExit? - [07Mar2006-10:43:12] Daelas@Moraelinost I can't take all the credit. Cratylus helped a lot with it. - [07Mar2006-10:43:50] Daelas@Moraelinost what I sent over to you is actually a room code. I want to actually turn it in to an object that I can drop anywhere in my mud. - [07Mar2006-10:44:14] Brodbane@Eve ahh, thats not an issue. You just cant use "exits/enters" - [07Mar2006-10:44:28] Brodbane@Eve You have to define a verb for entering the portal - [07Mar2006-10:44:52] Brodbane@Eve Let me whip up a basic portal that would do what you expect - [07Mar2006-10:45:02] Brodbane@Eve it will be a couple, few work issues here need addressing - [07Mar2006-10:45:16] Daelas@Moraelinost thought so. So I define a verb for each 'address'... - [07Mar2006-10:45:22] Daelas@Moraelinost that's okay. I appreciate the help. - [07Mar2006-10:45:47] Brodbane@Eve You really only need "dial" and "enter" - [07Mar2006-10:45:59] Brodbane@Eve and some pretty descriptions of what the portal is doing - [07Mar2006-10:46:39] Daelas@Moraelinost Ah... I've already set an enter if the gate is inactive so when someone enters the gate, it says they need to dial an address first. - [07Mar2006-10:46:51] Brodbane@Eve "You place your hand on the portals dial and slowly navigate to what appears to be an 'A'' - [07Mar2006-10:47:37] Daelas@Moraelinost that could work!! - [07Mar2006-10:47:49] Brodbane@Eve i'll make it an object you drop - [07Mar2006-10:48:03] Daelas@Moraelinost You would be a life-saver!!! - [07Mar2006-10:48:05] Kriton@Emerald MUD lurves writing portal code... gateways, pocket dimension spells, etc. - [07Mar2006-10:48:54] Daelas@Moraelinost cool. Spells are great, they just won't work with my technological world. - [07Mar2006-10:49:04] Kriton@Emerald MUD heh true - [07Mar2006-10:49:18] Daelas@Moraelinost I should email this to you when we get done. - [07Mar2006-10:50:08] Brodbane@Eve I really enjoy this community that Cratylus setup - [07Mar2006-10:50:34] Daelas@Moraelinost I do to. - [07Mar2006-10:50:58] Daelas@Moraelinost The quick creation system is awesome and easy to do for basic rooms, etc... - [07Mar2006-10:51:38] Brodbane@Eve Its breathed new life into a very neglected system - [07Mar2006-10:51:52] Daelas@Moraelinost who knows what the portal does in the Arch room? It keeps taking me to the wiz room. - [07Mar2006-10:52:06] Brodbane@Eve go to the arch room and do a 'cat here' - [07Mar2006-10:52:15] Daelas@Moraelinost I've seen some code for another mud and it is definately not as simple as this mud. - [07Mar2006-10:54:03] Daelas@Moraelinost it just says the muds online and stuff. - [07Mar2006-10:54:13] Brodbane@Eve its a long file, do a "tail here" - [07Mar2006-10:55:46] Daelas@Moraelinost it's set to go to the wix_hall. I thought, based on the screen, that it would allow travel to the muds on the screen. - [07Mar2006-10:56:02] Brodbane@Eve nah, its just a way of seeing who uses this lib - [07Mar2006-10:56:26] Daelas@Moraelinost ahh. It is cool though. There are a lot of muds. - [07Mar2006-10:56:34] Kriton@Emerald MUD what object does that? - [07Mar2006-10:56:40] Brodbane@Eve 'arch' - [07Mar2006-10:56:42] Kriton@Emerald MUD lets you know who uses the lib? - [07Mar2006-10:56:44] Brodbane@Eve read screen - [07Mar2006-10:57:02] Daelas@Moraelinost It's cool. In the Arch Room. - [07Mar2006-10:57:26] Kriton@Emerald MUD what's the filename of the arch itself? - [07Mar2006-10:57:34] Daelas@Moraelinost I wish the client room allowed other muds to be connected to. - [07Mar2006-10:57:42] Daelas@Moraelinost arch.c - [07Mar2006-10:57:50] Daelas@Moraelinost /secure/room/arch.c - [07Mar2006-10:58:18] Kriton@Emerald MUD ahh - [07Mar2006-10:58:22] Brodbane@Eve /secure/room/arch.c - [07Mar2006-10:58:46] Kriton@Emerald MUD was just curious to see if it used a custom connection or just intermud. - [07Mar2006-10:59:05] Brodbane@Eve These channels are Cratylus's own design - [07Mar2006-10:59:39] Daelas@Moraelinost Speaking of channels, I saw a list of channels that can be added to the mud. Does anyone know what the value part means? - [07Mar2006-10:59:53] Daelas@Moraelinost Cratylus is a GOD! - [07Mar2006-11:00:07] Brodbane@Eve He is one of a kind - [07Mar2006-11:00:17] Daelas@Moraelinost or how to add them? - [07Mar2006-11:00:45] Kriton@Emerald MUD wonders if he'll receive such high praise when he releases his lib... you sure you're not him in disguise and just advertising? ;-) - [07Mar2006-11:00:53] Brodbane@Eve Intermud, or more of DS channels? - [07Mar2006-11:01:31] Brodbane@Eve I'm not him. I'm just a guy who shares his passion - [07Mar2006-11:01:33] Daelas@Moraelinost not him. He's idle I think. I was under the impression that it was Intermud. - [07Mar2006-11:01:46] Brodbane@Eve This is not intermud - [07Mar2006-11:01:52] Daelas@Moraelinost oh. - [07Mar2006-11:02:00] Brodbane@Eve I could be wrong - [07Mar2006-11:02:10] Daelas@Moraelinost sorry.. I'm a newbie. - [07Mar2006-11:02:26] Brodbane@Eve Netstat is reporting198.144.203.194:9000 - [07Mar2006-11:02:38] Brodbane@Eve we can ask him - [07Mar2006-11:02:44] Daelas@Moraelinost what is Netstat? - [07Mar2006-11:02:46] Kriton@Emerald MUD its intermud - [07Mar2006-11:03:00] Brodbane@Eve netstat is your way of seeing what is open socket wise - [07Mar2006-11:03:08] Kriton@Emerald MUD Intermud3 to be exact - [07Mar2006-11:03:14] Brodbane@Eve thanks Kriton - [07Mar2006-11:03:26] Daelas@Moraelinost yeah. thanks. - [07Mar2006-11:03:46] Kriton@Emerald MUD although it could be that this channel is being routed by some gateway - [07Mar2006-11:03:58] Kriton@Emerald MUD it appears as I3 to me anyway ;-) - [07Mar2006-11:04:16] Daelas@Moraelinost :) - [07Mar2006-11:04:20] Kriton@Emerald MUD I'm not on a DS mudlib - [07Mar2006-11:04:28] Kriton@Emerald MUD just subscribes to the channel. - [07Mar2006-11:04:38] Daelas@Moraelinost How do you subscribe? - [07Mar2006-11:04:38] Kriton@Emerald MUD although I do have a copy of the lib itself. - [07Mar2006-11:05:11] Kriton@Emerald MUD well, it depends on the lib... let me look at the ds lib and see if I can figure it out. - [07Mar2006-11:05:35] Brodbane@Eve I'm pretty sure in the FAQ it says he is using the intermud repeater - [07Mar2006-11:05:39] Kriton@Emerald MUD I have a channel that tells me what channels I'm not subscribed to... then i add mappings in my intermud daemon. - [07Mar2006-11:06:25] Daelas@Moraelinost cool. - [07Mar2006-11:06:27] Daelas@Moraelinost How many people do you guys have on your muds? - [07Mar2006-11:08:16] Brodbane@Eve Our current creator number is 4, two being the lib guys - [07Mar2006-11:08:28] Daelas@Moraelinost ah. - [07Mar2006-11:08:38] Daelas@Moraelinost Just me here and my test character :( - [07Mar2006-11:10:22] Daelas@Moraelinost hist - [07Mar2006-11:10:26] Daelas@Moraelinost sorry. - [07Mar2006-11:10:38] Daelas@Moraelinost a little backwords. - [07Mar2006-11:11:23] Kriton@Emerald MUD my mud peaked back in the mid 90's with 40-60 players online - [07Mar2006-11:11:41] Daelas@Moraelinost WOW. What kind of theme do you have? - [07Mar2006-11:11:47] Kriton@Emerald MUD I shut it down with the intent of re-opening but I've been stuck in redesign mode ever since. - [07Mar2006-11:12:09] Kriton@Emerald MUD Its based entirely on the Wheel of Time by Robert Jordan. - [07Mar2006-11:12:19] Daelas@Moraelinost Good series. - [07Mar2006-11:12:21] Kriton@Emerald MUD (along with a bazillion other muds) - [07Mar2006-11:12:23] Kriton@Emerald MUD heh - [07Mar2006-11:12:53] Daelas@Moraelinost Two Towers mud is a good Lord of the Rings mud, from what my girlfriend says. - [07Mar2006-11:13:05] Kriton@Emerald MUD I tried to come up with some unique features tho. professions and player government (players build cities on a virtual landscape, form kingdoms, go to war with NPC armies, etc) - [07Mar2006-11:13:21] Daelas@Moraelinost that would be cool. - [07Mar2006-11:14:05] Kriton@Emerald MUD yeah, its fun ... I just need to finish the current version and stop tweaking with it. - [07Mar2006-11:14:32] Daelas@Moraelinost :) - [07Mar2006-11:14:38] Kriton@Emerald MUD hehe - [07Mar2006-11:15:00] Kriton@Emerald MUD lpc is such a fun medium to work with, too. - [07Mar2006-11:15:26] Kriton@Emerald MUD thats why I favor it so much over C/Diku... you can create far more complex code in less time (imo) - [07Mar2006-11:15:42] Daelas@Moraelinost yes it is. The only problem I face when trying to learn to code with this lib is when there is an error, it doesn't explain what the error is. - [07Mar2006-11:16:22] Daelas@Moraelinost as a newbie, I get errors a lot :) - [07Mar2006-11:16:27] Kriton@Emerald MUD well, takes a little time to interpret... but usually - [07Mar2006-11:16:39] Kriton@Emerald MUD you'll be able to discern something from it. - [07Mar2006-11:16:49] Kriton@Emerald MUD are these runtime errors or compile errors? - [07Mar2006-11:17:41] Kriton@Emerald MUD should write a fuzzy logic lpc error interpreter. - [07Mar2006-11:17:51] Daelas@Moraelinost compile i think. - [07Mar2006-11:18:51] Kriton@Emerald MUD syntax errors and whatnot. - [07Mar2006-11:18:55] Daelas@Moraelinost It references lines that are higher than the line of code that I am working on. - [07Mar2006-11:19:17] Kriton@Emerald MUD thats usually from a runaway " or something - [07Mar2006-11:19:29] Kriton@Emerald MUD i.e. you didn't close a string out - [07Mar2006-11:19:40] Daelas@Moraelinost Error in loading object '/domains/town/room/town_stargate' - [07Mar2006-11:19:40] Daelas@Moraelinost Object: /secure/cmds/creators/update at line 148 - [07Mar2006-11:19:40] Daelas@Moraelinost '' at /secure/save/creators/d/daelas () at /:0 - [07Mar2006-11:19:40] Daelas@Moraelinost 'cmdAll' at /secure/save/creators/d/daelas (/lib/command.c) at line 76 - [07Mar2006-11:19:40] Daelas@Moraelinost 'do_reload_word' at /verbs/creators/reload at line 55 - [07Mar2006-11:19:40] Daelas@Moraelinost 'do_reload_obj' at /verbs/creators/reload at line 45 - [07Mar2006-11:19:42] Daelas@Moraelinost 'reload' at /secure/sefun/sefun at /secure/sefun/reload.c:54 - [07Mar2006-11:19:42] Daelas@Moraelinost 'unguarded' at /secure/sefun/sefun at /secure/sefun/security.c:72 - [07Mar2006-11:19:42] Daelas@Moraelinost 'apply_unguarded' at /secure/daemon/master at line 407 - [07Mar2006-11:19:42] Daelas@Moraelinost 'CATCH' at /secure/daemon/master at line 407 - [07Mar2006-11:19:58] Daelas@Moraelinost oh. okay. - [07Mar2006-11:20:20] Kriton@Emerald MUD does ds have a command to go through the stack frame by frame? - [07Mar2006-11:20:36] Daelas@Moraelinost not sure. - [07Mar2006-11:21:02] Kriton@Emerald MUD so you might have been working on town_stargate.c on line 12 and had "marry had a little lamb - [07Mar2006-11:21:22] Daelas@Moraelinost :) - [07Mar2006-11:21:26] Kriton@Emerald MUD and then line 148 has something like SetLong("bob was here") - [07Mar2006-11:22:28] Kriton@Emerald MUD mudos would see there was no closing " on line 12 and skip all the way down to 148 (treating lines 12-148 as one big string) before it got confused. - [07Mar2006-11:22:42] Kriton@Emerald MUD just an example tho - [07Mar2006-11:22:57] Daelas@Moraelinost makes sense, I think. - [07Mar2006-11:22:59] Kriton@Emerald MUD of why the line numbers may seem odd - [07Mar2006-11:23:33] Daelas@Moraelinost Just threw me for a loop when I only have 97 lines in my code. - [07Mar2006-11:23:57] Kriton@Emerald MUD grins - [07Mar2006-11:24:05] Kriton@Emerald MUD now *that* is odd - [07Mar2006-11:24:39] Daelas@Moraelinost I think it is because it is calling other files when it runs, that it conflicts with the lib code. - [07Mar2006-11:24:41] Kriton@Emerald MUD you're using some sort of wizard tho/creator assistant? - [07Mar2006-11:25:15] Daelas@Moraelinost Just using Ultra Edit Studio to code a room, then try and update or reload the file in the mud. - [07Mar2006-11:25:43] Kriton@Emerald MUD oh... after looking at the error dump it looks like it might be referring to the update command itself - [07Mar2006-11:25:57] Kriton@Emerald MUD hard to read the stack trace over the channel - [07Mar2006-11:26:08] Daelas@Moraelinost ah.. That is true. - [07Mar2006-11:27:06] Daelas@Moraelinost I like the wizard creator objects in this lib. Like the room maker. It is menu driven and makes things much easier. - [07Mar2006-11:28:04] Kriton@Emerald MUD has written many, many type systems hehe - [07Mar2006-11:28:16] Kriton@Emerald MUD such things rather - [07Mar2006-11:28:38] Kriton@Emerald MUD has even found his maker systems on other muds :p - [07Mar2006-11:29:10] Daelas@Moraelinost :) If it works and you don't get a profit, I don't see the problem. - [07Mar2006-11:29:31] Daelas@Moraelinost I wish more muds were compatible code-wise. - [07Mar2006-11:29:39] Kriton@Emerald MUD heh - [07Mar2006-11:29:53] Kriton@Emerald MUD no problem, I just like to know when people take the code ;-) - [07Mar2006-11:30:07] Daelas@Moraelinost I'm sure they could be modified for my mud, I just don't know how. - [07Mar2006-11:30:15] Kriton@Emerald MUD nods - [07Mar2006-11:30:27] Daelas@Moraelinost yeah. code is code, eventually they would figure it out on their own. - [07Mar2006-11:30:37] Daelas@Moraelinost it's just polite though. - [07Mar2006-11:30:45] Kriton@Emerald MUD yeah, I wrote one for windows using MFC. it had a 'definitions' file to create custom output for any mudlib. - [07Mar2006-11:30:59] Daelas@Moraelinost really? - [07Mar2006-11:31:05] Kriton@Emerald MUD nods - [07Mar2006-11:31:31] Daelas@Moraelinost nod - [07Mar2006-11:31:41] Kriton@Emerald MUD I don't know if it would still run very well... I might have to re-create it / bring it up to the .net era - [07Mar2006-11:32:02] Kriton@Emerald MUD it was my first real win32 app - [07Mar2006-11:32:08] Daelas@Moraelinost for the mud being so old, it still is fun. - [07Mar2006-11:32:16] Kriton@Emerald MUD nods - [07Mar2006-11:32:22] Daelas@Moraelinost I don't know how to program outside of the mud. - [07Mar2006-11:32:32] Daelas@Moraelinost can't even compile. - [07Mar2006-11:32:36] Kriton@Emerald MUD yeah, I play world of warcraft, but MMORPGs still don't have the depth you can get on a mud. - [07Mar2006-11:33:18] Daelas@Moraelinost heard world of warcraft was a fun game. A co-worker plays it and raves about it. - [07Mar2006-11:34:14] Kriton@Emerald MUD yeah the thing that annoys me about it is that those game worlds are pretty static. - [07Mar2006-11:34:32] Kriton@Emerald MUD i.e. no matter how powerful you get, you cannot really change the world - [07Mar2006-11:34:44] Kriton@Emerald MUD which is where my player government system comes in - [07Mar2006-11:35:08] Kriton@Emerald MUD when a player lays the foundation for a city hall, he/she changes the landscape. - [07Mar2006-11:35:12] Daelas@Moraelinost True. How do you set up a government, or guild. I noticed a file that is called guild in this lib, just not sure how to use it. - [07Mar2006-11:35:43] Daelas@Moraelinost they can do that without causing errors? Or do you have a creation system? - [07Mar2006-11:35:47] Kriton@Emerald MUD guilds on most libs are an object loaded onto the player - [07Mar2006-11:36:09] Kriton@Emerald MUD yeah its whats called a virtual system - [07Mar2006-11:36:29] Kriton@Emerald MUD i write a framework of objects like buildings, npc servants, etc - [07Mar2006-11:36:59] Kriton@Emerald MUD the player says 'i want to build a house'. it clones the house and takes the descriptions from the player and stores them in a mysql database. - [07Mar2006-11:37:11] Daelas@Moraelinost that's cool - [07Mar2006-11:37:27] Kriton@Emerald MUD the location and descriptions are stored in the database and when the mud reboots and that location is reloaded, the house appears again in the room. - [07Mar2006-11:37:49] Kriton@Emerald MUD so the player doesn't really code anything per se - [07Mar2006-11:37:49] Daelas@Moraelinost what lib do you use? - [07Mar2006-11:37:55] Kriton@Emerald MUD they just modify a template. - [07Mar2006-11:38:09] Daelas@Moraelinost brodbane are you still here? - [07Mar2006-11:38:09] Kriton@Emerald MUD its my own lib... way back in '93 it was Nightmare 3.2 - [07Mar2006-11:38:21] Daelas@Moraelinost Ah. Isn't Dead Souls based on that? - [07Mar2006-11:38:26] Brodbane@Eve sorry, i'm here - [07Mar2006-11:38:40] Kriton@Emerald MUD well, Nightmare 3.2 led to Nightmare IV which led to Dead Souls. - [07Mar2006-11:38:44] Daelas@Moraelinost Know you're working. Just missed you. - [07Mar2006-11:38:54] Daelas@Moraelinost thought you left. - [07Mar2006-11:38:56] Brodbane@Eve :) Darn work! So ditracting - [07Mar2006-11:39:04] Daelas@Moraelinost :( - [07Mar2006-11:39:06] Brodbane@Eve distracting - [07Mar2006-11:39:16] Brodbane@Eve finger brodbane@eve - [07Mar2006-11:39:32] Kriton@Emerald MUD or maybe Nightmare IV->Foundation->Dead Souls - [07Mar2006-11:39:32] Daelas@Moraelinost okay. - [07Mar2006-11:40:38] Kriton@Emerald MUD LP Mud->TMI->TMI II->Nightmare 2/3->Nightmare IV->Foundation I/II->Dead Souls? - [07Mar2006-11:40:40] Brodbane@Eve My old mud was foundation II - [07Mar2006-11:41:20] Daelas@Moraelinost this is my first mud. - [07Mar2006-11:41:49] Kriton@Emerald MUD does my finger daemon work btw? :p - [07Mar2006-11:42:03] Daelas@Moraelinost sorry. yes it did. - [07Mar2006-11:42:05] Kriton@Emerald MUD doesn't know how well his mud works. - [07Mar2006-11:42:13] Kriton@Emerald MUD snickers - [07Mar2006-11:42:33] Daelas@Moraelinost no plan? - [07Mar2006-11:42:55] Kriton@Emerald MUD its not included in the intermud finger return... I could modify it pretty quick to include it - [07Mar2006-11:43:37] Daelas@Moraelinost oh. it said 'this is an empty plan file' - [07Mar2006-11:44:45] Kriton@Emerald MUD maybe I'm missing something from the I3 spec - [07Mar2006-11:46:24] Kriton@Emerald MUD did it show you my lack of spouse, best kill, etc? - [07Mar2006-11:47:04] Daelas@Moraelinost sing,e best kill, arch foe. - [07Mar2006-11:50:55] Daelas@Moraelinost sorry, I was looking at brodbane when I saw the empty plan. - [07Mar2006-11:50:55] Daelas@Moraelinost my mistake. - [07Mar2006-11:50:55] Daelas@Moraelinost your's doesn't have one. - [07Mar2006-11:50:55] Kriton@Emerald MUD ? - [07Mar2006-11:50:55] Kriton@Emerald MUD ahh - [07Mar2006-11:50:55] Kriton@Emerald MUD I modified my daemon to return my .project and .plan - [07Mar2006-11:50:57] Daelas@Moraelinost Cool plan. - [07Mar2006-11:50:57] Kriton@Emerald MUD hehehe - [07Mar2006-11:56:57] Brodbane@Eve How long before your baby is born? - [07Mar2006-11:57:05] Brodbane@Eve We just had ours - [07Mar2006-12:01:30] Kriton@Emerald MUD congratulations ;-) - [07Mar2006-12:01:39] Kriton@Emerald MUD ours is due in late june - [07Mar2006-12:01:45] Kriton@Emerald MUD ~25th - [07Mar2006-12:03:19] Brodbane@Eve first one? - [07Mar2006-12:04:11] Kriton@Emerald MUD yeah :) - [07Mar2006-12:04:24] Kriton@Emerald MUD it took a while but yeah - [07Mar2006-12:04:30] Kriton@Emerald MUD good timing though - [07Mar2006-12:04:50] Kriton@Emerald MUD we just bought our first house and a week later we found out we were pregnant - [07Mar2006-12:05:12] Brodbane@Eve hhahahha, thats exactly what happened to us - [07Mar2006-12:05:16] Brodbane@Eve exactly. I kid you not - [07Mar2006-12:05:26] Kriton@Emerald MUD hehe cool ;-) - [07Mar2006-12:25:50] Brodbane@Eve went ld - [07Mar2006-12:29:49] Daelas@Moraelinost sorry guys. Need to go to work. I'll have to talk to you later. Any help you can give my on the Stargate Brodbane would be appreciated. If you want to email me some suggestions or tips, just reply to the email. - [07Mar2006-12:30:01] Brodbane@Eve i'll do that - [07Mar2006-12:30:05] Brodbane@Eve see you later:) - [07Mar2006-14:43:37] Brodbane@Eve Anyone alive? Testing.. - [07Mar2006-14:43:52] Kriton@Emerald MUD we're all still here... you didn't kill us. - [07Mar2006-14:44:06] Ptah@Eve last - [07Mar2006-14:44:10] Ptah@Eve who - [07Mar2006-14:44:10] Brodbane@Eve Just showing Ptah, Eve's most recent addition the DS channel - [07Mar2006-14:44:26] Brodbane@Eve Ptah is a dev from my old mud - [07Mar2006-15:40:37] Oriam@Age of Darkness anyone out there? - [07Mar2006-15:40:45] Brodbane@Eve yes - [07Mar2006-15:40:49] Oriam@Age of Darkness finally - [07Mar2006-15:40:59] Oriam@Age of Darkness thought i would never find someone - [07Mar2006-15:41:03] Brodbane@Eve hehe - [07Mar2006-15:41:29] Ptah@Eve you didnt find anyone, we dont exist - [07Mar2006-15:41:41] Oriam@Age of Darkness oh darn, more automated servers? - [07Mar2006-15:41:49] Brodbane@Eve Cratylus made us. Welcome Oriam $N - [07Mar2006-15:42:07] Oriam@Age of Darkness wow, you ALMOST sound like humans :) - [07Mar2006-15:42:11] Ptah@Eve ahaha - [07Mar2006-15:42:39] Oriam@Age of Darkness so, are you all very familiar with this codebase? - [07Mar2006-15:42:59] Brodbane@Eve Ptah and I are LPC people - [07Mar2006-15:43:30] Oriam@Age of Darkness i know lpc pretty well. could yall tell me how to add/remove emotes? - [07Mar2006-15:43:58] Brodbane@Eve just delete them from the verb directory - [07Mar2006-15:44:20] Ptah@Eve well, you could override the command in the player object to do nothing, remove the emote.c file... - [07Mar2006-15:45:44] Oriam@Age of Darkness wheres the emote.c file located? - [07Mar2006-15:46:12] Ptah@Eve try /cmds/players/emote.c - [07Mar2006-15:46:41] Oriam@Age of Darkness ahh okay, i was trying to find it in verbs - [07Mar2006-15:46:51] Ptah@Eve which emote - [07Mar2006-15:46:57] Ptah@Eve useful command - [07Mar2006-15:46:59] Oriam@Age of Darkness in general - [07Mar2006-15:47:11] Ptah@Eve no, the command, type which emote - [07Mar2006-15:47:19] Oriam@Age of Darkness ah okay - [07Mar2006-15:48:29] Oriam@Age of Darkness so, how do i add emotes here - [07Mar2006-15:49:11] Ptah@Eve They dont currently work? - [07Mar2006-15:49:29] Oriam@Age of Darkness i want to change the nod emote, but im not quite sure how - [07Mar2006-15:49:38] Brodbane@Eve do a which nod - [07Mar2006-15:49:48] Ptah@Eve not a .c command - [07Mar2006-15:49:52] Ptah@Eve just a sec - [07Mar2006-15:49:52] Brodbane@Eve darn - [07Mar2006-15:49:54] Oriam@Age of Darkness says nod: not found - [07Mar2006-15:50:56] Avatar@OuterSpace (bad humour warning) "Nod found"? - [07Mar2006-15:51:04] Oriam@Age of Darkness .... - [07Mar2006-15:51:12] Ptah@Eve I am thinking it's part of the living object, checking - [07Mar2006-15:51:32] Oriam@Age of Darkness Thats kind of funny - [07Mar2006-15:51:42] Ptah@Eve no it's nod - [07Mar2006-15:51:54] Oriam@Age of Darkness so i type 'which nod' - [07Mar2006-15:53:15] Brodbane@Eve no, its not a standard verb - [07Mar2006-15:53:37] Oriam@Age of Darkness That means? - [07Mar2006-15:53:45] Brodbane@Eve verb = action - [07Mar2006-15:53:53] Oriam@Age of Darkness so, how do i change it? - [07Mar2006-15:53:55] Brodbane@Eve standard verb = who, look - [07Mar2006-15:54:05] Oriam@Age of Darkness ahh okay - [07Mar2006-15:55:42] Oriam@Age of Darkness where would i find the file to edit nod - [07Mar2006-15:56:14] Ptah@Eve it's part of one of the objects that made your character - [07Mar2006-15:56:18] Ptah@Eve but not living.c - [07Mar2006-15:56:32] Oriam@Age of Darkness sorry, im a little confused here - [07Mar2006-15:56:46] Oriam@Age of Darkness which object are we talking about? - [07Mar2006-15:58:24] Brodbane@Eve not sure, haven't found where nod is being called - [07Mar2006-15:58:36] Oriam@Age of Darkness oh okay, i thought you meant you had found it - [07Mar2006-16:01:07] Jerin@Jerins Folly There's a reference in lib/save/soul.o - [07Mar2006-16:01:17] Oriam@Age of Darkness ill check it out - [07Mar2006-16:01:29] Jerin@Jerins Folly You can't edit, or shouldn't be able to edit .o files - [07Mar2006-16:03:00] Oriam@Age of Darkness hrmm, indeed there is - [07Mar2006-16:03:54] Jerin@Jerins Folly But, that's a point of reference for going backwards - [07Mar2006-16:05:39] Oriam@Age of Darkness egh nvm - [07Mar2006-16:05:51] Oriam@Age of Darkness how would i add a completely new emote? - [07Mar2006-16:06:13] Jerin@Jerins Folly That's kinda the whole thing there. If we knew one, we'd know the other - [07Mar2006-16:06:29] Oriam@Age of Darkness sorry got lost there - [07Mar2006-16:11:28] Oriam@Age of Darkness blargh - [07Mar2006-16:11:52] Jerin@Jerins Folly From all I can tell, it's only getting pushed into soul.o - [07Mar2006-16:12:09] Jerin@Jerins Folly Mind you LP muds aren't my specialty so - [07Mar2006-16:12:19] Oriam@Age of Darkness ill ask an admin on my normal mud - [07Mar2006-16:12:29] Jerin@Jerins Folly As an example, if you look at help feelings - [07Mar2006-16:12:53] Jerin@Jerins Folly look for the most obscure one you can find, such as shellshock, when you do a search through the lib, it only appears in soul.o - [07Mar2006-16:14:19] Jerin@Jerins Folly Well, my guess now is that soul.o isn't an object file, so looks like you'll need to edit it from there - [07Mar2006-16:14:57] Jerin@Jerins Folly Lemme try something real quick and I'll let you know - [07Mar2006-16:15:09] Oriam@Age of Darkness i got a high wiz from my normal mud lookin into it - [07Mar2006-16:20:37] Oriam@Age of Darkness kay, hes on right now - [07Mar2006-16:20:55] Jerin@Jerins Folly Alright - [07Mar2006-16:25:23] Oriam@Age of Darkness hrmm, he says its something about feelings - [07Mar2006-16:46:13] Oriam@Age of Darkness okay, the command is addemote but it gives me an error - [07Mar2006-16:46:53] Ave@Age of Darkness looks like you've got a good problem to start off your career with - [07Mar2006-16:47:03] Ptah@Eve you have to be of a certain level to use this command - [07Mar2006-16:47:13] Oriam@Age of Darkness im arch - [07Mar2006-16:47:15] Ave@Age of Darkness it's an admin command - [07Mar2006-16:47:57] Oriam@Age of Darkness i get everything entered right, but it gives me an error - [07Mar2006-16:48:09] Oriam@Age of Darkness has something to do with the parser - [07Mar2006-17:56:38] Ashon@Stargate Atlantis: Evolution I just dl'd DS, waddya you guys think of it for development purposes? - [07Mar2006-17:58:18] Jerin@Jerins Folly Seems pretty decent to me, although I'm more of a Diku person tryin to get away from that - [07Mar2006-17:58:51] Brodbane@Eve you guys reading this? I broke somethin - [07Mar2006-17:59:05] Jerin@Jerins Folly Yup - [07Mar2006-18:00:33] Brodbane@Eve thanks - [07Mar2006-18:00:43] Jerin@Jerins Folly Yup - [07Mar2006-18:01:49] Ashon@Stargate Atlantis: Evolution well I like LP's since you can do so much more with them, is the maillist pretty active? - [07Mar2006-18:02:12] Brodbane@Eve Taking off for a while. Catch you all later - [07Mar2006-18:02:22] Jerin@Jerins Folly later Brodbane - [07Mar2006-20:40:51] Cratylus looks like i missed a chat party - [08Mar2006-07:31:45] Cratylus test - [08Mar2006-10:43:49] Cratylus w00t - [08Mar2006-10:46:31] Daelas@Moraelinost Hello Cratylus - [08Mar2006-10:47:58] Cratylus hiya - [08Mar2006-10:50:29] Cratylus looks like intermud is back up - [08Mar2006-10:50:43] Daelas@Moraelinost why did it go down? - [08Mar2006-10:50:53] Cratylus beats me. i don't run the router - [08Mar2006-10:50:53] Ptah@Eve budget cuts - [08Mar2006-10:51:01] Daelas@Moraelinost ah. - [08Mar2006-10:52:03] Ptah@Eve Intermud was considered an entiltement program by the Bush administration and was cut - [08Mar2006-10:52:33] Brodbane@Eve I thought intermud was owned by the dubei company - [08Mar2006-10:52:39] Cratylus well, technically, they just didn't approve the funding increase for fiscal year 2006 - [08Mar2006-10:53:36] Ptah@Eve Ahhh, good humor, I love ot - [08Mar2006-10:53:38] Ptah@Eve it - [08Mar2006-10:55:30] Cratylus i'm the good humor man - [08Mar2006-10:58:25] Ashon@Stargate Atlantis can I get an Ice Cream Sandwich then? - [08Mar2006-10:58:39] Brodbane@Eve clone icecream.c - [08Mar2006-10:59:21] Brodbane@Eve Explain, you are using words that I dont use in proper context when i try and use them - [08Mar2006-10:59:51] Cratylus eval return present("ice cream",this_player())->SetType("sandwich") - [08Mar2006-11:00:28] Brodbane@Eve I think you just set that payer to type 'sandwich' - [08Mar2006-11:00:34] Brodbane@Eve player* - [08Mar2006-11:00:46] Cratylus my bad - [08Mar2006-11:00:50] Brodbane@Eve nm, formatting is all off here, stupid windows telnet - [08Mar2006-11:01:04] Brodbane@Eve daelas No problem, i had fun with it - [08Mar2006-11:01:12] Brodbane@Eve woops, mistell - [08Mar2006-11:39:42] Ashon@Stargate Atlantis are the classes all virtual? I can't seem to find any .c file for the class other then the class daemon, - [08Mar2006-11:40:00] Cratylus /secure/cfg/classes - [08Mar2006-11:40:28] Daelas@Moraelinost Ashon, are you actually in a Stargate mud? - [08Mar2006-11:40:36] Ashon@Stargate Atlantis right, those seem to just be the class definitions - [08Mar2006-11:41:18] Cratylus yes. if you want to create a new class, make a new file in that dir following the same format, then use admintool to add the class to the class daemon - [08Mar2006-11:41:34] Ashon@Stargate Atlantis Daelas- I'm trying to create one, I'm on day two of learning DS - [08Mar2006-11:41:56] Cratylus ashon, any problems with the documentation? - [08Mar2006-11:42:17] Brodbane@Eve I have a problem with the docs. They are iin english - [08Mar2006-11:42:33] Ptah@Eve Freaking Southerners - [08Mar2006-11:42:35] Ashon@Stargate Atlantis Cratylus, other then not having the documentation that I'm looking for, yes. - [08Mar2006-11:42:43] Cratylus actually they're in rigellian. by an astonishing coincidence, our two languages are exactly the same - [08Mar2006-11:42:59] Cratylus you mean the class thing? yeah, i'll add that to the faq - [08Mar2006-11:42:59] Ptah@Eve so long, thanks for the fish - [08Mar2006-11:43:03] Brodbane@Eve I speak Rigellian? - [08Mar2006-11:43:11] Daelas@Moraelinost how do you learn the languages available? - [08Mar2006-11:43:31] Brodbane@Eve I told my wife i was cultured. - [08Mar2006-11:43:39] Cratylus well, learning is done with trainers, but a creator can just add the language to himself - [08Mar2006-11:43:59] Ashon@Stargate Atlantis okay, so the classes are virtual, then I guess my question becomes, where is the code for skills? - [08Mar2006-11:44:29] Cratylus can you explain a little more what you're looking for? - [08Mar2006-11:46:06] Ashon@Stargate Atlantis well, I want to create new skills for the classes, but I can't find where the skills are defined. - [08Mar2006-11:46:38] Cratylus hmmm - [08Mar2006-11:47:18] Cratylus ya i need to explain a bit more clearly the skills system in the faq - [08Mar2006-11:47:56] Cratylus the deal is that a skill is useful only in the context of doing something the lib understands - [08Mar2006-11:48:26] Cratylus for example, the reason "blade attack" is useful is that /lib/combat.c (among others) uses it as a modifier - [08Mar2006-11:49:11] Cratylus what this means is that all the skills the lib understand are those currently listed in the files /secure/cfg/classes - [08Mar2006-11:49:51] Cratylus so that generally, if it isn't there, it isn't a skill the lib knows about - [08Mar2006-11:50:07] Cratylus however, putting one in there doesnt mean the lib can do anything with it, either - [08Mar2006-11:50:37] Cratylus for example, suppose you want to add a basketweaver class, and one of the skills is, well, weaving - [08Mar2006-11:51:27] Cratylus just because weaving is one of the skills in /secure/cfg/basketweaver doesnt mean it's in any way helpful to the player, if weaving isnt something that has a verb and lib objects that handle it - [08Mar2006-11:51:47] Brodbane@Eve Am i logging ds by default? This is some good stuff - [08Mar2006-11:51:54] Cratylus heh - [08Mar2006-11:52:02] Cratylus i think so. check /log/cha - [08Mar2006-11:52:04] Cratylus i think so. check /log/chan - [08Mar2006-11:52:18] Brodbane@Eve thanks, its there - [08Mar2006-11:52:26] Ptah@Eve sweet - [08Mar2006-11:52:42] Cratylus does that answer the question, ashon? - [08Mar2006-11:53:10] Ashon@Stargate Atlantis okay got it. so weave.c will go in the verb folder, and then make a reference to it in the class cfg files. - [08Mar2006-11:53:18] Cratylus right on - [08Mar2006-11:53:46] Cratylus though usually what'll happen is the verb acts on an object that inherits, let's sat, /lib/basjet.c - [08Mar2006-11:54:06] Cratylus or /lib/loom.c, and that object is what determines the usefulness of the skill - [08Mar2006-11:54:24] Ashon@Stargate Atlantis so if I wanted to make unique racial abilities aka vampires that suck blood, they would need a verb and then a call from the race cfg file - [08Mar2006-11:54:36] Ashon@Stargate Atlantis right understand that part of it. - [08Mar2006-11:54:44] Cratylus i wouldn't use the word "call" that way, but it sounds like you've got the idea - [08Mar2006-11:55:17] Cratylus a good example of bloodsucking would be the steal verb - [08Mar2006-11:55:21] Ashon@Stargate Atlantis a reference if you will then. The body object would 'call' the functionality. - [08Mar2006-11:55:45] Cratylus thieves have a skill for this, and their success is determined by their skill as measured by various /lib objects - [08Mar2006-11:56:49] Ashon@Stargate Atlantis right. - [08Mar2006-11:57:23] Ashon@Stargate Atlantis thanks Cratylus. - [08Mar2006-11:57:33] Cratylus no prob. thanks for pointing out the documentation gap - [08Mar2006-11:57:53] Ashon@Stargate Atlantis meh, no problem. - [08Mar2006-12:08:57] A shadow@Carnivore hang on i just noticed you said /secure/cfg/races - [08Mar2006-12:09:41] Cratylus i didnt notice that - [08Mar2006-12:10:05] Cratylus the skills thing isnt something you should try to do in a race file - [08Mar2006-12:10:51] Cratylus this raises an interesting issue - [08Mar2006-12:12:12] Cratylus you just pointed out a feature gap - [08Mar2006-12:14:00] Ashon@Stargate Atlantis so, you can't have special racial verbs? - [08Mar2006-12:14:14] Ptah@Eve I have special racial verbs but they are impolite - [08Mar2006-12:14:18] Brodbane@Eve My dwarven sexiness was inherent... - [08Mar2006-12:14:55] Cratylus dang. this is what happens when you only code lib stuff. you forget obvious shit like that - [08Mar2006-12:15:15] Ptah@Eve Craytlus, who died and cursed you with the maintenance? - [08Mar2006-12:15:19] Ashon@Stargate Atlantis I'm a trouble maker what can I say? - [08Mar2006-12:15:23] Cratylus as of now there is no good racial skill system. however this issue's pretty much rocketed to number one on my todo list - [08Mar2006-12:15:39] Ashon@Stargate Atlantis w00t! - [08Mar2006-12:16:13] Ptah@Eve so question, would a dark elf be better at dancing and a surface elf be better at math skills? - [08Mar2006-12:16:23] Ashon@Stargate Atlantis Ptah- didn't you read any of the documentation/history of DS? Cratylus CHOSE to do it! - [08Mar2006-12:17:26] Ptah@Eve then that man needs a beer - [08Mar2006-12:18:22] Brodbane@Eve Ptah, ED/BR has made us synical - [08Mar2006-12:18:48] Ptah@Eve nod, I am now an agnostic cynic - [08Mar2006-12:18:52] Brodbane@Eve Cratylus is that gem we never ran into - [08Mar2006-12:19:14] Brodbane@Eve We got Nameless, Caliel and a few others to ruin our perception of lib developers - [08Mar2006-12:19:53] Ptah@Eve Heh, ok, long story short, we had a couple of talented guys who were very arbitrary in their enhancements - [08Mar2006-12:25:28] Ashon@Stargate Atlantis lib dev is a bitch, and you've gotta really love the intense code hacking to do it. these are people who go one to program things like *nix daemons. - [08Mar2006-12:26:33] Ptah@Eve nog, and have a total disregard for formatting code - [08Mar2006-12:31:38] Ptah@Eve Heh, sorry, one of my pet peeves, I get down on my jr. programmers for formatting so bad - [08Mar2006-12:32:54] Ashon@Stargate Atlantis I've noticed the formatting is horrible. but I'm not complaining yet, I've got other work to do. - [08Mar2006-12:33:41] Cratylus for real? you guys dont like the ds formatting? - [08Mar2006-12:33:53] Cratylus are the lines too long? - [08Mar2006-12:34:41] Ptah@Eve Well, I've been looking at some of the descartes code, and man, indentation, using function declarations inside of calls, call me a purist, but it's difficult to read at times - [08Mar2006-12:35:33] Ptah@Eve I understand when LPC first came out it was partially a space issue with files, but I believe we are past that constraint nowdays - [08Mar2006-12:35:39] Cratylus interesting. if yuo don't mind, i'd love an example of what you mean. do you have a specific filename that illustrates this? - [08Mar2006-12:35:46] Ashon@Stargate Atlantis oh code formatting? I've got some serious wrapping issues on my client then - [08Mar2006-12:35:52] Ptah@Eve interactive.c - [08Mar2006-12:37:38] Ptah@Eve omg, I just realized I've been on lpc since 1992 - [08Mar2006-12:38:18] Brodbane@Eve 1992? That was the 6th grade for me, congrats - [08Mar2006-12:38:20] Cratylus yeah that is kinda ugly - [08Mar2006-12:38:30] Cratylus i guess i've just gotten used to that - [08Mar2006-12:38:53] Ptah@Eve wow... I was already a few years out of the army in 92 - [08Mar2006-12:39:01] Ptah@Eve thanks for making me feel old - [08Mar2006-12:39:21] Cratylus by the way, even if a file has descartes name on top, it's probably been modified by me in one way or another. i'm just too lazy to bother with headers - [08Mar2006-12:39:43] Brodbane@Eve I just assume you wrote everything. Easier to pass blame that way - [08Mar2006-12:39:49] Cratylus :) - [08Mar2006-12:40:05] Ptah@Eve Heh - [08Mar2006-12:40:31] Ptah@Eve Forcing me to write a code formatter utility, I suppose that could be a nice mental exercise though - [08Mar2006-12:42:24] Cratylus the way i do the formatting is this: i write my sloppy ass code any which way i feel like, then right before a code release, i use a source script and lsed to auto-indent everything - [08Mar2006-12:42:26] Ashon@Stargate Atlantis gah that's the kind of crap they make you write in c 101 type classes. - [08Mar2006-12:42:50] Cratylus which is why i was a little surprised. i figured that the default formatting spat out by ed would look pretty normal - [08Mar2006-12:43:02] Ptah@Eve fear... ed - [08Mar2006-12:43:18] Ptah@Eve You're not still on a tty term are you Cratylus? - [08Mar2006-12:43:32] Ashon@Stargate Atlantis ed is your friend. love it, want it, caress it. - [08Mar2006-12:43:44] Cratylus for coding i use vim or gvim as the mood strikes me - [08Mar2006-12:44:08] Ptah@Eve Ok, here's fear for you, I first started on a 110 baud tty term that used paper, no screen - [08Mar2006-12:45:06] Cratylus that's before my time. when i started coding i was on the actual DEC vt100 terminals hooked up by serial to the campus vax - [08Mar2006-12:45:31] Cratylus maxed out at 9600bps - [08Mar2006-12:45:45] Ptah@Eve I remember when 9600 came out I was like "OMG this is fast!!!" - [08Mar2006-12:46:25] Ptah@Eve poor apple //e, 4800 was too fast for the processor to get the info in before it lost characters - [08Mar2006-12:47:11] Cratylus though one time over xmas break i was reduced to using a c64 on a 300bps modem dialed into the campus server - [08Mar2006-12:47:21] Cratylus that was rough stuff - [08Mar2006-12:47:23] Ptah@Eve ahahah, a commode! - [08Mar2006-12:48:07] Ashon@Stargate Atlantis whoa! Watch it. c64 pm 4800 to compuserve! ahhh the days! - [08Mar2006-12:48:29] Ashon@Stargate Atlantis *pm = on a - [08Mar2006-12:48:34] Ptah@Eve Apple guy here, still am, got a nice dual G5 now, oh and some pos 3gb wintel box - [08Mar2006-12:49:04] Cratylus i use a sun ultrasparc box - [08Mar2006-12:49:32] Ptah@Eve Those are pretty sexy - [08Mar2006-12:49:52] Ptah@Eve I almost bought a sparc/10 a long while back - [08Mar2006-12:50:02] Cratylus heh - [08Mar2006-12:50:08] Ptah@Eve now I just want a cray ymp for nostalgia - [08Mar2006-12:51:27] Cratylus i saw a sun enterprise 10000 on ebay for a little over $10k, 20 procs, loads of ram. they use the cray crossbar - [08Mar2006-12:51:37] Cratylus dunno about the electricity bill tho - [08Mar2006-12:52:09] Ptah@Eve heh, ymp is not as powerful as a laptop anymore and uses huge energy - [08Mar2006-12:52:19] Cratylus my little 4-wat/6gig ram box sucks up plenty enough juice - [08Mar2006-12:52:25] Cratylus 4-way - [08Mar2006-12:52:49] Ptah@Eve yeah, my dual g5 sucks the juice so bad I crisped a processor on a brownout - [08Mar2006-12:52:57] Ptah@Eve yay yay applecare - [08Mar2006-12:53:19] Ptah@Eve and of course a line conditioner - [08Mar2006-12:55:00] Ptah@Eve I am from the land of Cray, I got to play with those bad boys in highschool and anything that compiled a program in .007843 seconds was the computer for me. - [08Mar2006-12:55:14] Kriton@Emerald MUD heh - [08Mar2006-12:55:26] Kriton@Emerald MUD had a Vax II! :P - [08Mar2006-12:55:38] Cratylus i never could stand vms - [08Mar2006-12:55:42] Kriton@Emerald MUD it couldn't do anything in .007843 seconds - [08Mar2006-12:56:00] Kriton@Emerald MUD I couldn't either, actually - [08Mar2006-12:56:10] Ptah@Eve heh, they were sexy machines for the day, now just an expensive alternative to a beowulf cluster - [08Mar2006-12:56:20] Ptah@Eve crays that is - [08Mar2006-12:56:34] Kriton@Emerald MUD the vax had a "unix board" - [08Mar2006-12:56:53] Ptah@Eve like the mac 6100 dual had a "intel board" - [08Mar2006-12:56:57] Cratylus yeah, but i didnt much like ultrix either - [08Mar2006-12:57:23] Cratylus got the job done, i guess - [08Mar2006-12:57:45] Ptah@Eve I like BSD and Linux, Linux is probably the best thing to ever happen to the net - [08Mar2006-12:57:49] Kriton@Emerald MUD didn't mind ultix so much. liked sunos more, but never managed to score any hardware. - [08Mar2006-12:58:35] Kriton@Emerald MUD runs all linux now... I have a copy of solaris for x86 but haven't used it for anything. - [08Mar2006-12:59:01] Ptah@Eve but then again, I was impressed with Minix. - [08Mar2006-13:03:49] Cratylus dont bother with solaris x86 unless you have a specific reason to use it - [08Mar2006-13:03:59] Cratylus but solaris for sparc is Teh Shit - [08Mar2006-13:20:44] Brodbane@Eve Did you guys notice a mud named 'Jedi Nights'? - [08Mar2006-13:20:54] Brodbane@Eve thds Wonder if they meant 'Knights' - [08Mar2006-13:21:02] Ptah@Eve I think Darth mud hunted it down and killed the last of it - [08Mar2006-13:22:59] Kriton@Emerald MUD maybe its where Jedi's go to part - [08Mar2006-13:23:01] Kriton@Emerald MUD part->party - [08Mar2006-13:23:11] Kriton@Emerald MUD kind of like Boogie Nights, but with Jedi - [08Mar2006-13:23:25] Ptah@Eve reserves all his lightsaber comments now in respect to that - [08Mar2006-13:24:11] Kriton@Emerald MUD heh - [08Mar2006-13:37:33] Ptah@Eve finger ptah - [08Mar2006-13:37:37] Ptah@Eve hrm - [08Mar2006-13:37:39] Cratylus no thx - [08Mar2006-13:38:01] Ptah@Eve Brokeback Mux - [08Mar2006-13:38:40] Brodbane@Eve What a great mud idea. Brokeback - [08Mar2006-13:39:06] Ptah@Eve Yeah it would be the SHIT!, er um... - [08Mar2006-13:39:44] Brodbane@Eve We would so win an oscar - [08Mar2006-13:40:12] Ptah@Eve I dont believe I could relate well enough to the subject matter to make it work - [08Mar2006-13:44:27] Kriton@Emerald MUD heh - [08Mar2006-13:45:28] Kriton@Emerald MUD $N wears his +5 buttless chaps. (eww) - [08Mar2006-13:45:50] Ptah@Eve $N lets this thing take ahold of him - [08Mar2006-13:46:28] Cratylus wtf - [08Mar2006-13:46:38] Cratylus are chan emotes fuxt? - [08Mar2006-13:46:46] Kriton@Emerald MUD no - [08Mar2006-13:47:02] Ptah@Eve ahahah, no no no no - [08Mar2006-13:47:02] Kriton@Emerald MUD didn't want to actually put HIS name in that example - [08Mar2006-13:47:06] Cratylus tests something. - [08Mar2006-13:47:26] Cratylus whew ok - [08Mar2006-13:47:50] Ptah@Eve $N wonders wtf Cratylus is talking about - [08Mar2006-13:48:00] Kriton@Emerald MUD you could hardcode the gender tho... that would make it easy... would you like to be [M]ale or m[A]le - [08Mar2006-13:48:29] Ptah@Eve Oh my - [08Mar2006-13:48:39] Kriton@Emerald MUD yeah probably better to stop now - [08Mar2006-13:49:05] Ptah@Eve Hey, I am as homo erotic as the next guy, but still - [08Mar2006-13:49:53] Kriton@Emerald MUD ? - [08Mar2006-13:53:08] Ptah@Eve that's called humor - [08Mar2006-14:11:42] Brodbane@Eve Maybe I dont want to be logging DS... - [08Mar2006-14:53:59] Cratylus hi alswyn. use this channel for questions n stuff - [08Mar2006-14:56:41] Aldwyn@Celtic Dreams alright thanks!:) - [08Mar2006-14:57:28] Brodbane@Eve welcome - [08Mar2006-15:00:16] Brodbane@Eve System A runtime error occurred to Phil - [08Mar2006-15:00:21] Brodbane@Eve strange one - [08Mar2006-15:00:51] Cratylus tail /log/player_errors - [08Mar2006-15:02:07] Brodbane@Eve Woop there it is, a bug - [08Mar2006-15:02:23] Brodbane@Eve /domains/town/room/training - [08Mar2006-15:02:27] Brodbane@Eve try and go west - [08Mar2006-15:03:05] Cratylus heh - [08Mar2006-15:03:26] Cratylus delete exit west - [08Mar2006-15:04:06] Cratylus i dont even remember what i'd been testing with that - [08Mar2006-15:07:43] Brodbane@Eve just an FYI. We are only using the town as a reference - [08Mar2006-15:08:03] Cratylus yeh. thanks - [08Mar2006-15:30:26] Brodbane@Eve testing - [08Mar2006-15:32:40] Cratylus passed - [08Mar2006-15:33:27] Brodbane@Eve whats the darn channel emote command - [08Mar2006-15:33:41] Cratylus dsemote tests something. - [08Mar2006-15:34:09] Brodbane@Eve awesome. Never would of found it - [08Mar2006-15:34:15] Cratylus :foos. - [08Mar2006-15:34:25] Cratylus never mind that last thing - [08Mar2006-15:34:29] Cratylus it's dsemote - [08Mar2006-15:34:31] Brodbane@Eve i tried that - [08Mar2006-15:34:45] Brodbane@Eve old mud was ds: tests something. - [08Mar2006-15:34:59] Cratylus yeah...i dont remember when or why that changed - [08Mar2006-15:35:29] Brodbane@Eve I was playing around with chat.c so it would be [ds] Cratylus@Dead Souls: - [08Mar2006-15:35:39] Cratylus ohhhh i rememebr actually. i let someone fix the chat daemon once - [08Mar2006-15:36:20] Cratylus yeah, they fixed a buncha stuff but woulnd up disabling the : - [08Mar2006-15:36:30] Brodbane@Eve yeah, thats ok - [08Mar2006-15:36:50] Brodbane@Eve I like the hist and list commands - [08Mar2006-15:36:58] Cratylus that's what they added :) - [08Mar2006-15:37:06] Cratylus all in all a good trade - [08Mar2006-15:58:44] Ptah@Eve is there a root command that shows you the object hierarchy of something? - [08Mar2006-15:58:50] Brodbane@Eve showtree - [08Mar2006-16:16:20] Ptah@Eve whats the largest signed integer value one can use in LPC? - [08Mar2006-16:16:44] Kriton@Emerald MUD 2^32-1? - [08Mar2006-16:17:02] Kriton@Emerald MUD donno - [08Mar2006-16:17:10] Cratylus i dunno either - [08Mar2006-16:17:20] Ptah@Eve long it? - [08Mar2006-16:17:24] Ptah@Eve er longint - [08Mar2006-16:17:52] Cratylus shrugs and looks around. - [08Mar2006-16:18:22] Kriton@Emerald MUD 2147483646 - [08Mar2006-16:18:34] Kriton@Emerald MUD err - [08Mar2006-16:18:38] Kriton@Emerald MUD 2147483647 - [08Mar2006-16:18:44] Ptah@Eve what is the identifier for that - [08Mar2006-16:18:50] Ptah@Eve int, longint, etc? - [08Mar2006-16:18:52] Kriton@Emerald MUD (1 << 31) - 1 - [08Mar2006-16:19:04] Cratylus within LPC, it's just int - [08Mar2006-16:19:20] Ptah@Eve excellent, thanks - [08Mar2006-17:03:56] Kriton@Emerald MUD wonders if the sizeof int changes with the platform - [08Mar2006-17:04:42] Kriton@Emerald MUD if i go with a 64-bit machine will I get bigger ints from mudos? - [08Mar2006-17:16:28] Cratylus how do i check int size? - [08Mar2006-17:16:40] Cratylus size limit anyway - [08Mar2006-17:17:06] Cratylus nevemind got it - [08Mar2006-17:17:48] Cratylus well i'm on a 64 bit machine and i got 2147483647, but i dont remember trying to enable compilation of a 64 bit binary - [08Mar2006-20:37:51] Ashon@Stargate Atlantis okay, on Verbs, is there some documentation on what SetRules() is for? - [08Mar2006-20:39:11] Cratylus setting rules? - [08Mar2006-20:39:21] Cratylus hang on a sec - [08Mar2006-20:41:58] Cratylus until i finish verb docs, this is a good orientation: http://www.dnd.utwente.nl/~krimud/Docs/NMAdmin/Parser/ - [08Mar2006-20:46:14] Ashon@Stargate Atlantis okay so the SetRule() in DS is equivalent to the parse_add_rule() function from MudOS? - [08Mar2006-20:49:49] Cratylus yip - [08Mar2006-20:50:07] Cratylus i think parse_add_rule() is lima syntax - [08Mar2006-20:50:37] Ashon@Stargate Atlantis okay - [08Mar2006-21:54:49] Ashon@Stargate Atlantis so when loading a verb into the system is there a special way to do it other then update .c? - [08Mar2006-21:55:01] Cratylus no - [08Mar2006-21:55:03] Cratylus why? - [08Mar2006-21:55:13] Cratylus well, you need to update the verbs daemon too - [08Mar2006-21:55:23] Cratylus /daemon/verbs.c - [08Mar2006-21:55:49] Cratylus but that's if it's a new verb - [08Mar2006-21:58:10] Ashon@Stargate Atlantis I'm an idiot, it would be nice if I remember proper syntax for c - [08Mar2006-21:59:20] Cratylus creating new verbs is pretty advanced stuff for day 2 of lpc learning - [08Mar2006-21:59:55] Cratylus you some kinda genius? - [08Mar2006-22:00:09] Ashon@Stargate Atlantis I've worked on various LPC's before, I'm not new to coding, I'm just trying to do some proof of concept stuff. - [08Mar2006-22:00:13] Cratylus k - [08Mar2006-22:00:27] Ashon@Stargate Atlantis re: Ashon from WheelMud project/Mudconnector/et all - [08Mar2006-22:00:35] Cratylus nods. - [08Mar2006-22:01:01] Ashon@Stargate Atlantis besides where's the fun in actually building? BLAH! - [08Mar2006-22:01:05] Cratylus heh - [08Mar2006-22:01:13] Cratylus i never thought i'd feel that way - [08Mar2006-22:01:23] Cratylus but its getting harder to enjoy it lately, yeah - [08Mar2006-22:15:21] Ashon@Stargate Atlantis okay so where would I find a function listing for function calls on objects/souls/? IE: CanManipulate(obj)...? - [08Mar2006-22:16:17] Cratylus help will do it, generally - [08Mar2006-22:16:29] Cratylus though theres an efun just for that. hang on - [08Mar2006-22:17:17] Cratylus eval return functions(load_object("/lib/player"),1) - [08Mar2006-22:17:57] Cratylus obviously that's more data than yer buffer will handle, but that's what you'd use in a function - [08Mar2006-22:19:56] Cratylus did i understand your question correctly? - [08Mar2006-22:20:08] Cratylus spending more, collecting less - [08Mar2006-22:20:10] Cratylus mischan - [08Mar2006-22:21:02] Ashon@Stargate Atlantis kinda - [08Mar2006-22:32:36] Ashon@Stargate Atlantis the NM documentation called them, "applies", I guess those are what I'm looking for. I saw some in /doc/applies/ but those seem more driver type - [08Mar2006-22:33:02] Cratylus hmm - [08Mar2006-22:33:36] Ashon@Stargate Atlantis does that make more sense? - [08Mar2006-22:34:04] Brodbane@Eve If it makes sense, it has no business being in a mud - [08Mar2006-22:34:20] Ashon@Stargate Atlantis bah, smurf village makes plenty of sense! - [08Mar2006-22:34:44] Cratylus it sounds like it makes sense, but i dont quite understand, because to me, applies are driver only - [08Mar2006-22:34:55] Brodbane@Eve Ashon, do you guys have a working star gate? - [08Mar2006-22:35:23] Cratylus can you point me to the sepcific docs you mean? - [08Mar2006-22:36:17] Ashon@Stargate Atlantis okay, take for example the verb: pick.c it's has function calls such as CanManipulate(), GetParalyized(), etc. - [08Mar2006-22:36:27] Cratylus right - [08Mar2006-22:36:59] Ashon@Stargate Atlantis I was wondering where I'd find a listing for those types of functions - [08Mar2006-22:37:37] Brodbane@Eve Thats all Nightmare/Dead Souls esque - [08Mar2006-22:37:41] Ashon@Stargate Atlantis Brodbane, I gotta get all my skills/classes/races/quest system done before I even think about doing any kind of building. - [08Mar2006-22:38:00] Brodbane@Eve Would you like my stargate? - [08Mar2006-22:38:28] Ashon@Stargate Atlantis wouldn't hurt to take a look at it. - [08Mar2006-22:38:38] Brodbane@Eve I did it as an example for another mud - [08Mar2006-22:39:08] Brodbane@Eve You "dial earth", or "dial e", "dial a".. etc. Opens the portal briefly, then closes it - [08Mar2006-22:39:18] Ashon@Stargate Atlantis mine however has to be much more trhen just a portal. - [08Mar2006-22:40:14] Brodbane@Eve have a preferred email? - [08Mar2006-22:43:19] Brodbane@Eve Cratylus, did you ever read the LPC manual that says "Dont use colors!!!!"? - [08Mar2006-22:43:41] Cratylus :) - [08Mar2006-22:43:47] Cratylus suck it up - [08Mar2006-22:44:03] Brodbane@Eve http://www.lysator.liu.se/mud/profword.html - [08Mar2006-22:44:23] Brodbane@Eve hehe. I've been slowly removing the calls. I like it some places thuogh - [08Mar2006-22:44:42] Cratylus lysator's been out of date for 12 years - [08Mar2006-22:44:58] Brodbane@Eve Yeah, you got me there - [08Mar2006-22:45:56] Cratylus well i dont mean to be insulting about it, but all the clients i use handle color ok, and part of my focus has been to make things easy to use from *inside* the mud - [08Mar2006-22:46:08] Cratylus this is a real problem for complex docs - [08Mar2006-22:46:28] Cratylus because all-white all-text makes peoples' eyes slide off documentation - [08Mar2006-22:46:34] Brodbane@Eve I was just curious. I dont look a gift horse in the mouth! - [08Mar2006-22:46:46] Cratylus well i feel a bit guilty about it, see - [08Mar2006-22:46:56] Cratylus because it offends my aesthetic sensibilities too - [08Mar2006-22:47:24] Cratylus it's one of those things where i think more people benefit from it than suffer - [08Mar2006-22:47:51] Brodbane@Eve when you get right down to it, i can just make it however i like - [08Mar2006-22:48:53] Ashon@Stargate Atlantis NO! Why would I want to help other people? ;) - [08Mar2006-22:49:15] Cratylus ashon, stuff like GetParalyzed are functions almost always defined in lib objects or daemon objects - [08Mar2006-22:49:55] Ashon@Stargate Atlantis nods - [08Mar2006-22:49:59] Brodbane@Eve defined as in commented? - [08Mar2006-22:50:05] Brodbane@Eve or just fleshed out - [08Mar2006-22:50:11] Cratylus the help system will usually give you a list of function in an object, including inherited functions, if it doesnt have a help func - [08Mar2006-22:50:37] Brodbane@Eve Good call, case in point: help time - [08Mar2006-22:50:39] Cratylus but it's kindof a halfassed and only sometimes works - [08Mar2006-22:51:30] Brodbane@Eve I keep all of the source on disk so i can search it when i find unknown functions - [08Mar2006-22:51:38] Cratylus it seems to me that what youre looking for is something like a getfunctions command that will report available functions in an objec tin human readable format - [08Mar2006-22:51:54] Cratylus and i think thats a hella good idea, and it's going high on the todo list - [08Mar2006-22:51:58] Ashon@Stargate Atlantis right but a help player or help this_player or a help ob doesn't find the functions most likely to be used in a verb - [08Mar2006-22:52:32] Brodbane@Eve The LPC manuals cover lots of that - [08Mar2006-22:52:46] Ashon@Stargate Atlantis or I should say used in most of the verbs available with the distro - [08Mar2006-22:52:48] Cratylus but right now, there isnt something as convenient as that available for me to point you to. the best i can do for right this minute is suggest that you can cobble up something dirty with functions() while i work on a more reliable command - [08Mar2006-22:54:41] Ashon@Stargate Atlantis in one day I've added two projects high up in your todo list, gosh I feel special. - [08Mar2006-22:54:47] Ashon@Stargate Atlantis smirks - [08Mar2006-22:54:51] Cratylus yeah wtf - [08Mar2006-22:54:59] Cratylus you dont need to be this precocious - [08Mar2006-22:55:09] Brodbane@Eve Yeah, i've got like 10 in the "do next year" stack - [08Mar2006-22:56:01] Ashon@Stargate Atlantis someones gotta help drive development, right? - [08Mar2006-22:56:29] Cratylus :) that's why i want people to use the lib. i cant find all this shit on my own - [08Mar2006-22:56:45] Cratylus dont let my grumbling fool you. i very much appreciate the comments - [08Mar2006-22:57:03] Brodbane@Eve He wouldn't hang out in this channel unless he liked the abuse - [08Mar2006-22:57:11] Cratylus :) - [08Mar2006-22:57:46] Brodbane@Eve If i can swing it, we should have a few more seasoned lpc guys here. None of my guys mind answering questions/helping - [08Mar2006-22:58:04] Ashon@Stargate Atlantis well, calling me precocious I take as a compliment. ;) - [08Mar2006-22:58:42] Brodbane@Eve Expealidocious? - [08Mar2006-22:59:36] Ashon@Stargate Atlantis I was doing work on TMI-2/Lima/Heaven 7 something like 10 years ago, and then shifted into writing my own. But b/c of certain problems that come with .NET 2.0 dev has stopped, and I've got some concept proofs to work out. - [08Mar2006-22:59:58] Ashon@Stargate Atlantis I just can't remember enough of LPC to get me where I should be. - [08Mar2006-23:00:34] Brodbane@Eve I may alias all the common reference functions. Ie this_player->() = TP() - [08Mar2006-23:00:40] Ashon@Stargate Atlantis and everything USED to be in a STD folder not broken up in a logical (to someone, I assume) file structure - [08Mar2006-23:00:49] Cratylus yknow i've been wondering if i should put that in the lib - [08Mar2006-23:01:15] Brodbane@Eve EN = environment - [08Mar2006-23:01:37] Brodbane@Eve i could get the defs file i made a while back, if it would be useful - [08Mar2006-23:01:45] Cratylus back when i was a padewan, i was on a mud where instead of this_player()->GetName() you'd do stuff like TP->GCN - [08Mar2006-23:02:01] Cratylus very convenient, but i wonder if it doesnt make lpc harder to learn - [08Mar2006-23:02:33] Brodbane@Eve yes and no, once you figure it out - its just easier - [08Mar2006-23:04:44] Cratylus hiya pulsar. you can use this channel for questions and stuff - [08Mar2006-23:05:02] Brodbane@Eve Cratylus, i'm going to email you my defs.h - [08Mar2006-23:05:14] Pulsar@Solinar ? - [08Mar2006-23:05:28] Cratylus this is an intermud channel between dead souls muds - [08Mar2006-23:05:44] Cratylus you'll hear lots of stuff that isnt directed at you specifically - [08Mar2006-23:05:54] Pulsar@Solinar right, i figured as much - how do i turn it off? - [08Mar2006-23:06:08] Brodbane@Eve ds - [08Mar2006-23:06:08] Cratylus type: ds - [08Mar2006-23:06:24] Brodbane@Eve there is a "hey nice to meet you" first question:) - [08Mar2006-23:06:32] Cratylus heh cant blame him - [08Mar2006-23:06:48] Dhavid@Chalice there's partial documentation for an 'addlimb' and 'removelimb' commandset... do those work? removed? ?? - [08Mar2006-23:06:50] Cratylus some people need total silence to develp stuff - [08Mar2006-23:06:52] Ashon@Stargate Atlantis yah some people are using it as a gossip channel! - [08Mar2006-23:07:19] Cratylus dhavid, AddLimb and RemoveLimb do indeed work - [08Mar2006-23:07:27] Pulsar@Solinar thanks, i haven't done ANYTHING in the mudding world in a loooong time, stumbled across this on Wikipedia and thought i'd check it out, but - lol - all the chatter makes it hard to read the docs... - [08Mar2006-23:07:29] Cratylus but they arent really command-based - [08Mar2006-23:08:01] Cratylus pulsar, your mud automatically logs ds channls, so you can just read what you missed in /log/chan/ds - [08Mar2006-23:08:55] Cratylus dhavid, to add limbs and remove them from a specific crature, you would use the AddLimb() and RemoveLimb() functions that exist in that creature's body - [08Mar2006-23:09:11] Cratylus but if what youre trying to do is amke humans have tails, that's something else - [08Mar2006-23:09:31] Cratylus for something like that you need to edit the race file in /secure/cfg/races - [08Mar2006-23:10:01] Cratylus then use admintool to remove humans as a race, and then add them back in - [08Mar2006-23:10:26] Cratylus does that answer your question? - [08Mar2006-23:10:28] Dhavid@Chalice well not really have tails... more along the lines of makings humans and/or all races have about 4-5 more limbs each... - [08Mar2006-23:10:36] Dhavid@Chalice yes it does... ima do that... thx - [08Mar2006-23:10:50] Cratylus ohh yes, this is the thing where you want wrists and ankles and such - [08Mar2006-23:11:00] Dhavid@Chalice heh, uh huh - [08Mar2006-23:11:22] Cratylus listen, i think that's cool and everything, but it really is a bigger project than it sounds - [08Mar2006-23:11:40] Dhavid@Chalice yeah i know... i'm just havin fun playin around... ima see what happens - [08Mar2006-23:12:38] Cratylus if you want to make it so people can wear anklets and stuff, you'll need to do modifications to /lib/body.c, /lib/std/armor.c and /include/armor_types.h - [08Mar2006-23:13:22] Ashon@Stargate Atlantis not quite as easy as adding wear location flags like in ROM. - [08Mar2006-23:13:26] Ashon@Stargate Atlantis chortles. - [08Mar2006-23:13:47] Cratylus the big problem with this is that if you hose up the body.c object, for example, if you log out, you may not be able to log back in - [08Mar2006-23:13:57] Cratylus so make sure you make lots of backups - [08Mar2006-23:14:15] Dhavid@Chalice i have a directory of about 70 backups so far...heh - [08Mar2006-23:14:21] Cratylus nods. - [08Mar2006-23:14:23] Brodbane@Eve bk command is nice - [08Mar2006-23:14:47] Cratylus it needs some finessing, but yeah, it does the job pretty well - [08Mar2006-23:15:07] Brodbane@Eve i like it because i'm lazy - [08Mar2006-23:15:15] Cratylus i made it because i'm lazy - [08Mar2006-23:18:42] Ashon@Stargate Atlantis welp, I'm going afk for a couple of hours. - [08Mar2006-23:19:33] Cratylus@Frontiers waves. - [08Mar2006-23:31:20] Brodbane@Eve I've been trying to use the ftp directory. But files suddenly become 'read only' and screw up the ftp client - [08Mar2006-23:33:21] Cratylus weird - [08Mar2006-23:33:29] Cratylus what OS? - [08Mar2006-23:33:39] Brodbane@Eve win32 - [08Mar2006-23:33:41] Brodbane@Eve xp - [08Mar2006-23:33:47] Cratylus ntfs? - [08Mar2006-23:33:49] Brodbane@Eve yes - [08Mar2006-23:34:09] Cratylus my guess is the problem might be there - [08Mar2006-23:35:56] Brodbane@Eve The mud seems to make all files read only, including directories - [08Mar2006-23:36:10] Cratylus thats a new one on me - [08Mar2006-23:36:24] Brodbane@Eve hmm - [08Mar2006-23:36:36] Cratylus but you can edit and save stuff, right? you mean the ftp client does this - [08Mar2006-23:36:50] Cratylus s/client/server - [08Mar2006-23:37:24] Brodbane@Eve i can edit stuff, yes - [08Mar2006-23:37:28] Cratylus whew ok - [08Mar2006-23:37:36] Brodbane@Eve the issues is ftp - [08Mar2006-23:37:58] Brodbane@Eve issues = issue - [08Mar2006-23:38:08] Brodbane@Eve not the internal one, a third party - [08Mar2006-23:38:20] Cratylus oh - [08Mar2006-23:38:48] Cratylus !(my code) == !(my problem) - [08Mar2006-23:40:57] Brodbane@Eve i've confirmed it on two machines. All files within c:\ds are read-only - [08Mar2006-23:41:03] Brodbane@Eve and are constantly reattribed - [08Mar2006-23:41:13] Cratylus that's interesting - [08Mar2006-23:41:31] Cratylus that tends to creep into (my problem) territory - [08Mar2006-23:41:37] Cratylus almost - [08Mar2006-23:41:47] Brodbane@Eve yes, its almost bordering on a lib issue - [08Mar2006-23:42:05] Cratylus for one thing it sounds like this is probably a source of cpu/iowait overhead - [08Mar2006-23:42:26] Brodbane@Eve i'm sure its taxing - [08Mar2006-23:42:28] Cratylus what's the cpu use on the driver process? - [08Mar2006-23:42:36] Brodbane@Eve one sec - [08Mar2006-23:42:42] Brodbane@Eve i'll get up the perf mon - [08Mar2006-23:44:26] Brodbane@Eve idle mud (no connections) is running at less then a percent - [08Mar2006-23:44:40] Cratylus mmkay - [08Mar2006-23:45:02] Cratylus well i have bad news - [08Mar2006-23:45:22] Cratylus i have nfc at all why you're making read only files - [08Mar2006-23:45:53] Cratylus hmm - [08Mar2006-23:45:55] Brodbane@Eve very strange indeed. My home computer was just reinstalled - [08Mar2006-23:45:59] Cratylus hang on - [08Mar2006-23:46:41] Cratylus well your files must be read-write for the file owner - [08Mar2006-23:47:07] Cratylus and if theyre not, ther emust be some sort of win32 feature that forces read write for owners - [08Mar2006-23:47:17] Cratylus otherwise you couldnt run at all - [08Mar2006-23:47:41] Brodbane@Eve ok, i can understand that much - [08Mar2006-23:47:53] Cratylus the proble you're describing just might also exist on the unix version - [08Mar2006-23:48:31] Cratylus this third party app, is it running under the same user as your mud process? - [08Mar2006-23:48:54] Brodbane@Eve the server is filezilla, its running as a service under local system - [08Mar2006-23:49:10] Brodbane@Eve i checked my file permissions. Owner/Creator has no rights checked - [08Mar2006-23:49:24] Cratylus i dont know that terminology, but it sounds like theres a user id conflict - [08Mar2006-23:49:46] Brodbane@Eve true, very true - [08Mar2006-23:49:50] Brodbane@Eve i can change its user - [08Mar2006-23:49:56] Cratylus basically, my gues is that if your ftp server ran as administrator or as the mud file owner, you'd have no prob - [08Mar2006-23:50:36] Cratylus from looking at the unix version of dead souls, the same problem would probably occur there if an unprivileged user tried to wrote to the ds directory - [08Mar2006-23:50:56] Cratylus thing is, i'm not sure that's a "problem" so much as intended behavior - [08Mar2006-23:51:40] Brodbane@Eve yeah yeah, its a feature - [08Mar2006-23:51:44] Brodbane@Eve security feature - [08Mar2006-23:52:00] Cratylus i dont think it's OS specific or DS specific - [08Mar2006-23:52:17] Brodbane@Eve You would think "local system" trumps users - [08Mar2006-23:52:33] Cratylus ahh now we're into the metaphysics of windows - [08Mar2006-23:52:47] Cratylus thats well beyond my capacity to understand - [08Mar2006-23:52:47] Brodbane@Eve well that worked - [08Mar2006-23:53:01] Cratylus groovy - [08Mar2006-23:53:17] Brodbane@Eve ok, new faq section. Third party ftp support - [08Mar2006-23:53:31] Brodbane@Eve Filezilla: Run it as the same user you launch the mud from - [08Mar2006-23:53:31] Cratylus heh. i dont even support the built in ftp server - [08Mar2006-23:53:45] Brodbane@Eve i know, but its vital and a half - [08Mar2006-23:53:45] Cratylus but yeah, i'll throw it into the faq - [08Mar2006-23:53:59] Brodbane@Eve Filezilla = free, on source forge as well - [08Mar2006-23:54:15] Cratylus nods. - [09Mar2006-01:24:13] Brodbane@Eve Anyone notice how cryptic the error messages are? My old mudos mud had actual line references.. - [09Mar2006-02:00:01] Ashon@Stargate Atlantis yah. - [09Mar2006-07:55:25] Cratylus do you mean you're used to more output that what's described here? http://dead-souls.sourceforge.net/debugging.html - [09Mar2006-11:46:36] Ashon@Stargate Atlantis *yawn* morning. - [09Mar2006-14:12:39] Ashon@Stargate Atlantis quiet day today? - [09Mar2006-14:38:39] Ashon@Stargate Atlantis is there a reason that there isn't a base obj.h that all the other objects inherit? - [09Mar2006-15:37:09] Cratylus most tangible objects inherit /lib/std/item.c - [09Mar2006-15:46:26] Ashon@Stargate Atlantis nods. - [09Mar2006-15:46:52] Ashon@Stargate Atlantis found it by following the inheritance scheme. - [09Mar2006-15:57:07] Ashon@Stargate Atlantis that's where 95% of the lfuns that are relevant to verbs are anyhow. - [09Mar2006-15:57:15] Ashon@Stargate Atlantis that's two problems down for me. - [09Mar2006-19:01:22] Ashon@Stargate Atlantis the error logs need a timestamp! - [09Mar2006-19:07:32] Cratylus heh - [09Mar2006-19:07:40] Cratylus i just coded that 30 minutes ago - [09Mar2006-19:07:48] Cratylus it'll be in the next release - [09Mar2006-19:08:22] Ashon@Stargate Atlantis sweet. - [09Mar2006-19:08:32] Kristus@The Hollow what did you code? - [09Mar2006-19:08:42] Ashon@Stargate Atlantis Cratylus(tm) now the with Precognition abilities. - [09Mar2006-19:09:15] Cratylus http://dead-souls.net/master.c - [09Mar2006-19:09:35] Cratylus you can pop that over your current master.c and your error logs will have timestamps - [09Mar2006-19:09:49] Cratylus but you should bk /secure/daemon/master just in case - [09Mar2006-19:13:36] Cratylus another new feature in that master.c is what brodbane was requesting before: mor explicit error messages on update - [09Mar2006-19:29:57] Ashon@Stargate Atlantis okay, quick I hope question. I got my verb finally compiling. But it keeps spitting out results from an copy of the verb - [09Mar2006-19:30:27] Ashon@Stargate Atlantis and I can't figure out how to get the phantasmal result from haunting me. - [09Mar2006-19:31:04] Ashon@Stargate Atlantis do I have unload/dest the verb daemon or something? - [09Mar2006-19:34:23] Kristus@The Hollow try rehashing it - [09Mar2006-19:34:35] Kristus@The Hollow the verb dir that is - [09Mar2006-19:34:41] Ashon@Stargate Atlantis nods - [09Mar2006-19:35:55] Ashon@Stargate Atlantis still no - [09Mar2006-19:38:30] Kristus@The Hollow did that work? - [09Mar2006-19:38:38] Ashon@Stargate Atlantis nope. - [09Mar2006-19:38:48] Kristus@The Hollow then reboot :p - [09Mar2006-19:55:01] Cratylus ok i'm back - [09Mar2006-19:55:11] Cratylus can you explain the problem in more detail? - [09Mar2006-19:55:43] Ashon@Stargate Atlantis un segunda - [09Mar2006-19:57:16] Ashon@Stargate Atlantis okay, so I've been trying to get this verb to just put out some test responses. - [09Mar2006-19:57:28] Ashon@Stargate Atlantis which I've gotten to work. - [09Mar2006-19:57:56] Cratylus mkay - [09Mar2006-19:57:56] Ashon@Stargate Atlantis but I'm getting the failure message at the same time, which no longer exists in the current .c file - [09Mar2006-19:58:12] Cratylus what's the name of the verb? - [09Mar2006-19:58:20] Ashon@Stargate Atlantis repair - [09Mar2006-19:58:28] Cratylus hmm - [09Mar2006-19:59:08] Cratylus sometimes, if a verb is updated in one location, then moved to another, then updated again, this can happen - [09Mar2006-19:59:14] Cratylus does that sound plausible in this case? - [09Mar2006-19:59:41] Ashon@Stargate Atlantis yes, for someone reason it appeared in cmd/players - [09Mar2006-19:59:55] Cratylus does that file exist currently? - [09Mar2006-19:59:59] Ashon@Stargate Atlantis no - [09Mar2006-20:00:29] Cratylus try: update /daemon/verbs - [09Mar2006-20:00:55] Ashon@Stargate Atlantis still getting the phantam response. - [09Mar2006-20:01:17] Cratylus give me 5 minutes - [09Mar2006-20:01:53] Ashon@Stargate Atlantis nods - [09Mar2006-20:02:45] Jezu@The Hollow are you behind a firewall, ashon? - [09Mar2006-20:03:24] Ashon@Stargate Atlantis might be - [09Mar2006-20:05:00] Cratylus i'm reproducing the problem. so far so good - [09Mar2006-20:05:58] Cratylus hmmm - [09Mar2006-20:06:19] Cratylus when i create conflicting verbs, the lst one updated appears to take precedence - [09Mar2006-20:06:33] Cratylus do you have shell access to your mud platform? - [09Mar2006-20:07:01] Ashon@Stargate Atlantis just running the windows version @ home for dev - [09Mar2006-20:07:09] Cratylus heh - [09Mar2006-20:07:31] Cratylus would you mind opening an explorer window and searching the ds dir for repair.c? - [09Mar2006-20:07:43] Cratylus i'd like to know how many currently exist - [09Mar2006-20:08:01] Kristus@The Hollow does the windows version actually work well? - [09Mar2006-20:08:05] Cratylus just like unix - [09Mar2006-20:08:15] Ashon@Stargate Atlantis haven't had any problems with it yet. - [09Mar2006-20:08:21] Cratylus a player or creator sees no diffrerence unless they run the version command - [09Mar2006-20:08:33] Kristus@The Hollow nice - [09Mar2006-20:08:47] Kristus@The Hollow so ls and stuff is still there? - [09Mar2006-20:08:55] Cratylus it's the exact same mud - [09Mar2006-20:09:01] Ashon@Stargate Atlantis of course. - [09Mar2006-20:12:04] Cratylus ok, run this: eval return load_object("/daemon/verbs")->GetVerbs()["use"] - [09Mar2006-20:12:10] Cratylus ok, run this: eval return load_object("/daemon/verbs")->GetVerbs()["repair"] - [09Mar2006-20:12:18] Cratylus sorry, "use" was my test verb over here - [09Mar2006-20:12:28] Cratylus ok, run this: eval return load_object("/daemon/verbs")->GetVerbs()["zap"] - [09Mar2006-20:12:37] Cratylus Oh fer FUCK sake - [09Mar2006-20:13:03] Ashon@Stargate Atlantis Result = "/verbs/players/repair.c - [09Mar2006-20:13:37] Cratylus did you do a search for repair.c ? - [09Mar2006-20:14:11] Ashon@Stargate Atlantis yah, it's only in the /verbs/players, except for a .bak made by the bk cmd - [09Mar2006-20:14:27] Cratylus ok, here's what i think should happen - [09Mar2006-20:15:17] Cratylus erm - [09Mar2006-20:15:29] Cratylus mind if i log into yer mud? - [09Mar2006-20:16:04] Ashon@Stargate Atlantis np - [09Mar2006-20:16:54] Cratylus i think jezu is right. i think you're firewalled - [09Mar2006-20:17:20] Cratylus the reason i want to log in is that i'm not able to replicate your exact problem - [09Mar2006-20:17:20] Ashon@Stargate Atlantis 216.254.22.116 - [09Mar2006-20:17:36] Cratylus i can make divergent versions of verbs, but the last one i update is the one that takes precedence - [09Mar2006-20:18:20] Ashon@Stargate Atlantis lemme reconfig my firewall - [09Mar2006-20:20:59] Kristus@The Hollow are you using a router? - [09Mar2006-20:21:55] Ashon@Stargate Atlantis yah, just gotta do some port fowarding - [09Mar2006-20:22:01] Kristus@The Hollow cool - [09Mar2006-20:24:54] Ashon@Stargate Atlantis okay should be fowarded now. - [09Mar2006-20:25:45] Cratylus i'm trying 216.254.22.113 6666 and 216.254.22.116 6666 but no dice - [09Mar2006-20:27:17] Ashon@Stargate Atlantis try again - [09Mar2006-20:27:41] Ashon@Stargate Atlantis on the .113 - [09Mar2006-20:39:25] Ashon@Stargate Atlantis okay, I got bubmped around by all the portable devices in the house, should work now - [09Mar2006-20:59:13] Cratylus for those interested, it's a documentation issue. i will make things clearer in upcoming verb creation docs - [09Mar2006-20:59:29] Ashon@Stargate Atlantis UPCOMING? - [09Mar2006-20:59:35] Cratylus hey im just the one guy - [09Mar2006-21:00:13] Ashon@Stargate Atlantis I'm just disappointed that there really isn't any help on the web about doing lpc verbs. - [09Mar2006-21:00:21] Cratylus you're not the only one - [09Mar2006-21:00:37] Cratylus lack of verb documentation is thing #2 that killed lpc development - [09Mar2006-21:00:45] Cratylus thing #1, imo, is ed - [09Mar2006-21:01:05] Ashon@Stargate Atlantis I think ed is fine, once you learn how to use it. - [09Mar2006-21:01:27] Cratylus thats because your brain has integrated with it - [09Mar2006-21:01:37] Cratylus for new people, it's not so grokkable - [09Mar2006-21:01:41] Ashon@Stargate Atlantis I had to write my first massive game in ed for my comp sci weeder class back in college so I learned how to operate it pretty smoothly. - [09Mar2006-21:01:47] Ashon@Stargate Atlantis true. - [09Mar2006-21:02:28] Ashon@Stargate Atlantis don't go far cratylus, I got some more verb related questions, but I gotta grab a quick smoke. - [09Mar2006-21:02:42] Cratylus k. i'm afk for a few minutes too - [09Mar2006-21:05:26] Jerin@Jerins Folly Meh, I skip ed and use shell, makes life a lot easier when you're used to that in other projects - [09Mar2006-21:05:37] Jerin@Jerins Folly I did all my coding on a diku mud thru shell pretty much - [09Mar2006-21:06:33] Cratylus for standard stuff i use vi, for complex projects i use gvim. ed is a last resort to me - [09Mar2006-21:06:57] Ashon@Stargate Atlantis yah, well I chose a windows based lib so I can just use visual studio and multitask while I'm at it. - [09Mar2006-21:06:57] Cratylus i figure i'm an old fart and *i* feel that way, new people must despise it - [09Mar2006-21:07:01] Cratylus hence, qcs - [09Mar2006-21:07:11] Ashon@Stargate Atlantis mmmm vi - [09Mar2006-21:07:23] Jerin@Jerins Folly man, you guys like hurtin yourself :p - [09Mar2006-21:07:35] Cratylus no i actually really like vi - [09Mar2006-21:07:51] Jerin@Jerins Folly lemme correct myself, I'll use pico for somethin quick, and jedit for somethin large - [09Mar2006-21:07:55] Cratylus once you get a feel for it, it's awesome for code development - [09Mar2006-21:08:03] Jerin@Jerins Folly I see vi like I see ed I think - [09Mar2006-21:08:13] Cratylus well let me make a correction - [09Mar2006-21:08:27] Cratylus "official" vi lacks stuff - [09Mar2006-21:08:31] Cratylus vim r0x - [09Mar2006-21:08:48] Jerin@Jerins Folly lol - [09Mar2006-21:09:28] Cratylus i went from vi to vim and was floored to discover that if you highlight a bracket, then type "%", your cursor jumps to the matching opposite bracket in the code - [09Mar2006-21:09:40] Cratylus i pretty much creamed my pants right there - [09Mar2006-21:09:56] Jerin@Jerins Folly holy crap, ya, that's nice, that's why I like jedit - [09Mar2006-21:19:45] Ashon@Stargate Atlantis okay so I put the repair.c in event, just basically cp'd bury.c from that folder and changed the text from direct_bury_obj_... to direct_repair_obj, rebooted the mud (so I didn't have to reload everything) and am still getting the same error. - [09Mar2006-21:32:59] Cratylus ya - [09Mar2006-21:33:57] Ashon@Stargate Atlantis -_- - [09Mar2006-21:33:59] Cratylus any object that inherits /lib/events/repair needs a recursive update or reload for the new inheritable to take effect - [09Mar2006-21:34:42] Ashon@Stargate Atlantis which is why I did the reboot. - [09Mar2006-21:34:46] Cratylus oh - [09Mar2006-21:34:52] Cratylus hang on - [09Mar2006-21:35:48] Ashon@Stargate Atlantis I gotta add a call from lib.h and LIB_REPAIR to item.c don't I? - [09Mar2006-21:36:26] Cratylus hmmmmmmmm - [09Mar2006-21:53:41] Cratylus woohoo sixteen ds muds online at once. a record. - [09Mar2006-21:53:47] Cratylus mudlist -m dead - [09Mar2006-21:55:26] Jerin@Jerins Folly Nice - [09Mar2006-22:10:20] Ashon@Stargate Atlantis I must say that Cratylus here is one of the best lib dev's I've had the joy of working with. - [09Mar2006-22:11:13] Ashon@Stargate Atlantis he will start hating me soon, if he hasn't already, because I'm trying to get past the learning curve so quickly. - [09Mar2006-22:14:09] Cratylus heh - [09Mar2006-22:14:32] Cratylus well yer way way way way ahead of anything i expected at this point - [09Mar2006-22:14:46] Cratylus good motivator - [09Mar2006-22:15:34] Ashon@Stargate Atlantis I'm just trying to get a prove that with lpc one can create a quest based mud where all of the quest are interesting and dynamically created. - [09Mar2006-22:15:46] Ashon@Stargate Atlantis nothing big. - [09Mar2006-22:15:50] Ashon@Stargate Atlantis sighs. - [09Mar2006-22:16:02] Cratylus i have zero knowledge of rom/circle/diku/smaug/etc - [09Mar2006-22:16:26] Cratylus so i cant say lpc is better - [09Mar2006-22:16:30] Cratylus but i like it - [09Mar2006-22:16:48] Jerin@Jerins Folly Eh, personal preference, it's kinda like which programming language is better or who's hotter - [09Mar2006-22:16:50] Ashon@Stargate Atlantis LPC is better b/c of the interpreted code. - [09Mar2006-22:18:43] Ashon@Stargate Atlantis okay well I'm gonna log, let things stew. But I'm having trouble getting lfuns to work in my verbs. - [09Mar2006-22:18:49] Ashon@Stargate Atlantis waves. - [09Mar2006-22:20:53] Cratylus waves. - [09Mar2006-23:59:09] Cratylus looks like intermud is back up - [10Mar2006-02:51:14] Ashon@Stargate Atlantis does it always go down late at night? - [10Mar2006-05:56:24] Cratylus not normally - [10Mar2006-05:56:54] Cratylus it's been extra flaky the past couple of weeks - [10Mar2006-09:49:32] Brodbane@Eve Good morning guys - [10Mar2006-09:51:22] Cratylus hiya - [10Mar2006-09:52:08] Brodbane@Eve Hey Cratylus, if you make a change to interactive.c, and then do a update -r interactive.c... what would you be missing to get the changes to propogate - [10Mar2006-09:52:27] Cratylus it depends on what you're trying to do - [10Mar2006-09:52:37] Brodbane@Eve eventDescribeEnvironment - [10Mar2006-09:53:01] Cratylus if you want your character to use the new stuff, you need to update -r /lib/creator, then log out and log back in - [10Mar2006-09:54:03] Brodbane@Eve excellent. I knew i missed something - [10Mar2006-09:54:11] Cratylus btw to see what changes have been implemented in the development mud, log into dead-souls.net 6666 and read /doc/RELEASE_NOTES - [10Mar2006-09:55:17] Brodbane@Eve Oh my gosh, your level of throughness threatens me - [10Mar2006-09:55:27] Cratylus heh - [10Mar2006-09:55:46] Ptah@Eve I am threatened by an strong male - [10Mar2006-09:55:56] Cratylus the RELEASE_NOTES on dead-souls.net have stuff not on your mud - [10Mar2006-10:02:46] Ptah@Eve I guess Crats is a similar age to me for that reference - [10Mar2006-10:02:56] Cratylus smirks. - [10Mar2006-10:03:06] Cratylus walk this way... - [10Mar2006-10:03:24] Ptah@Eve ahahah, the more brilliant piece of comic genius ever filmed - [10Mar2006-10:03:26] Brodbane@Eve hmm, i'm going to have to start noting our changes Ptah. Every mudlib upgrade is going to be abear - [10Mar2006-10:03:38] Ptah@Eve lets just not upgrade then - [10Mar2006-10:03:46] Cratylus unfortunately yes, if you make a lot of lib customization - [10Mar2006-10:03:48] Brodbane@Eve But i like whats in his notes - [10Mar2006-10:04:18] Ptah@Eve Damnit, now I have to rent that movie this weekend - [10Mar2006-10:04:36] Brodbane@Eve When we do upgrades i'm not going to jump on them - [10Mar2006-10:04:42] Brodbane@Eve i'm going to setup a mirror server - [10Mar2006-10:04:46] Brodbane@Eve so we can review - [10Mar2006-10:04:52] Cratylus you're not the only one this bothers - [10Mar2006-10:05:04] Cratylus there are a couple of muds still at r8 - [10Mar2006-10:05:41] Cratylus they tend to drop off the mudlist because r8 doesnt have the intermud keepalive - [10Mar2006-10:07:27] Cratylus still, i figure i'd rather be obnoxious for too many fixes and updates than not enough - [10Mar2006-10:08:09] Ptah@Eve We could write something that would re-apply our changes Brod. Kinda an upgrade engine - [10Mar2006-10:08:44] Ptah@Eve do a dif, we segment our code off with specific comments - [10Mar2006-10:12:29] Brodbane@Eve Zmud V7.21 is very nice. If anyone was looking into *buying* it. - [10Mar2006-10:13:31] Cratylus yeh, when i have to use windows, i use an old zmud from pre-nazi days - [10Mar2006-10:13:45] Ptah@Eve Nazi's didnt charge for their services - [10Mar2006-10:13:51] Brodbane@Eve I was using it, but i found it to do a couple of things that really irratated me - [10Mar2006-10:13:55] Cratylus doesnt try to authenticate with Big Money Guy - [10Mar2006-10:14:17] Ptah@Eve Powah to the people! Down with whitey! - [10Mar2006-10:14:36] Cratylus when the revolution comes, zugg will be first up against the wall - [10Mar2006-10:14:50] Brodbane@Eve Mine doesnt communicate with him.. how odd - [10Mar2006-10:15:20] Ptah@Eve Man... the Dennis Milleresque references from the past, I am gonna have to keep on my toes around you - [10Mar2006-10:15:44] Brodbane@Eve i'm a welp, so i'll just overlook your grown up references - [10Mar2006-10:16:10] Ptah@Eve Brodbane is like a doughboy with a Chenault when it comes to our witty repertoire - [10Mar2006-10:16:30] Cratylus i'm not engaging in some kinda cultural reference arms race - [10Mar2006-10:16:56] Brodbane@Eve I have google you know - [10Mar2006-10:17:12] Ptah@Eve and now, google has you - [10Mar2006-10:17:31] Brodbane@Eve http://www.kmtdesigns.com/kenandheidi.jpg - [10Mar2006-10:17:57] Ptah@Eve Sexy! Very hot! And the girls' ok too - [10Mar2006-10:18:09] Brodbane@Eve Yeah, she just had a baby - [10Mar2006-10:18:23] Ptah@Eve you poor poor fool - [10Mar2006-10:18:37] Brodbane@Eve that picture is now 4 years old - [10Mar2006-10:18:41] Brodbane@Eve i was sexier then - [10Mar2006-10:20:27] Ptah@Eve after 3 kids and the loss of 4 years of sleep between those babies... I have nothing but evil delight at the pain new parents go through - [10Mar2006-10:20:27] Brodbane@Eve Pain? My wife does all the work - [10Mar2006-10:20:27] Ptah@Eve That'll change - [10Mar2006-10:20:27] Ptah@Eve or you'll be single, either or, still pain - [10Mar2006-10:22:12] Brodbane@Eve Our baby is easssy-mode. I'm convinced that i'm not her father - [10Mar2006-10:22:32] Ptah@Eve ok, not touching that one - [10Mar2006-10:23:42] Ashon@Stargate Atlantis morning folks. - [10Mar2006-10:24:00] Brodbane@Eve Hello - [10Mar2006-10:24:03] Ptah@Eve Who are you, I do not recognize your IDC - [10Mar2006-10:24:29] Ashon@Stargate Atlantis oh I've been around for quite awhile. - [10Mar2006-10:24:53] Brodbane@Eve Which one is McGuyver on? - [10Mar2006-10:24:57] Ptah@Eve CLOSE THE IRIS! - [10Mar2006-10:25:01] Ptah@Eve yeah - [10Mar2006-10:25:05] Ptah@Eve er, sg1 - [10Mar2006-10:27:00] Ptah@Eve er mistell - [10Mar2006-10:28:24] Cratylus ashon was just workin on yer email - [10Mar2006-10:28:34] Cratylus ill send you what ive done so far - [10Mar2006-10:29:06] Ashon@Stargate Atlantis w00t! - [10Mar2006-10:29:16] Cratylus i think you need to add a check to that line 21 - [10Mar2006-10:29:38] Cratylus something like if(ob && ob->GetDamagePoints()) - [10Mar2006-10:30:59] Ashon@Stargate Atlantis okay but in the can_ I wanna check if the damagepoints() > 0 before they actually do anything to it. - [10Mar2006-10:31:23] Cratylus@Frontiers i think that can_ functions tend to distort the arg type they get...it's not clear to me that it will be a reliable thing to try to do in a can_ - [10Mar2006-10:32:03] Cratylus some checks have to happen in do_ funcs, as counterintuitive as it seems - [10Mar2006-10:32:17] Cratylus read: "stupid as it seems" - [10Mar2006-10:33:40] Ptah@Eve mooch da nooch - [10Mar2006-10:33:44] Ashon@Stargate Atlantis but a quick check in other verbs seems that most of them are doing some to a lot of checks in the can - [10Mar2006-10:33:48] Cratylus yes - [10Mar2006-10:33:52] Cratylus simple checks - [10Mar2006-10:34:06] Cratylus stuff with this_player() and stuff - [10Mar2006-10:34:26] Cratylus not usually with non-string types as arguments - [10Mar2006-10:35:06] Cratylus if you do see that, either it is irrelevant to the logic of the check, or the verb author got lucky and wrote a bug that works - [10Mar2006-10:35:56] Ashon@Stargate Atlantis that doesn't make sense! - [10Mar2006-10:36:04] Ashon@Stargate Atlantis starts sobbing. - [10Mar2006-10:36:04] Cratylus it *almost* does - [10Mar2006-10:36:24] Cratylus i'm not going to defend a parser design that isnt mine, but i think i know what they were getting at - [10Mar2006-10:37:17] Cratylus the can_ funcs are supposed to do basic checks of the type "can the person calling this verb physically access the object being worked on, and/or is there something hosed/wrong about this person that should invalidate the verb" - [10Mar2006-10:37:37] Ashon@Stargate Atlantis the can_ functionality should handle int returns just as easy as string returns - [10Mar2006-10:37:57] Cratylus mmm i'll need more information to understand that - [10Mar2006-10:38:09] Cratylus oh you mean args - [10Mar2006-10:38:15] Cratylus yeah, "should" - [10Mar2006-10:38:55] Cratylus but i dont rely on them to do so. maybe you'll find some feature of them i missed - [10Mar2006-10:39:13] Cratylus but if you dont. just do your complex checks in the do_funcs - [10Mar2006-10:39:31] Ashon@Stargate Atlantis I expect this problem to be fixed in the next release. - [10Mar2006-10:39:35] Cratylus heh - [10Mar2006-10:39:49] Ptah@Eve just change every skill check to rock paper sissors - [10Mar2006-10:39:51] Cratylus parser design is way above my pay grade. it's all i can do to just understand it - [10Mar2006-10:40:18] Cratylus the last parser bug i fixed, i have no idea how i did it - [10Mar2006-10:40:20] Ashon@Stargate Atlantis okay so simple checks to this_player, and nothing else. - [10Mar2006-10:40:34] Cratylus pretty much ya - [10Mar2006-10:42:38] Ashon@Stargate Atlantis Agggh! It worked moving it too the do_ - [10Mar2006-10:43:06] Ashon@Stargate Atlantis Now I must hunt down Descartes and kill him slowly. George Reese, I am coming for you! - [10Mar2006-10:43:36] Cratylus heh he's not smart enough to design the parser either - [10Mar2006-10:43:43] Cratylus its mudos stuff - [10Mar2006-10:46:07] Ashon@Stargate Atlantis so now that I've gotten over the "little" bumps in the road, I should be cranking out verbs like crazy today. Good. - [10Mar2006-10:46:31] Cratylus i'm not scheduled to go anywhere today so i'll prolly be around to help - [10Mar2006-10:46:55] Cratylus i must say that's the fastest verb learning curve climb i've ever seen - [10Mar2006-10:47:18] Cratylus took me months to sweat it out - [10Mar2006-10:48:00] Brodbane@Eve shuuu, wait till you get to adverbs - [10Mar2006-10:48:02] Ashon@Stargate Atlantis Today verbs, tomorrow the Parser! - [10Mar2006-10:48:26] Cratylus damn dud, if you get leet enough to play with the parser i'll friggin pay you a salary - [10Mar2006-10:49:00] Cratylus hope you accept gummy bears and pocket lint and legal tender - [10Mar2006-10:49:16] Cratylus s/and legal/as legal - [10Mar2006-10:49:22] Brodbane@Eve Do what I do, pay your guys with the money tree.. - [10Mar2006-10:49:26] Ashon@Stargate Atlantis I wrote the command parser for my Wheelmud project. - [10Mar2006-10:49:52] Cratylus c++? - [10Mar2006-10:50:00] Ashon@Stargate Atlantis which is not an interpreted code parser. - [10Mar2006-10:50:10] Ashon@Stargate Atlantis yah right. VB - [10Mar2006-10:50:14] Cratylus heh - [10Mar2006-10:50:45] Ptah@Eve Heh, I did the same thing as a Proof of concept for a rules engine - [10Mar2006-10:50:45] Ashon@Stargate Atlantis with .net it's a viable programming language. so let's not go there. - [10Mar2006-10:50:49] Cratylus i'd look into the parser myself for real but it involves knowing what i'm doing with c++ and i only have this one lifetime - [10Mar2006-10:51:11] Brodbane@Eve You're in luck, all I do is C++ - [10Mar2006-10:51:21] Cratylus smiles. - [10Mar2006-10:51:29] Ptah@Eve real men use C and nothing but pointers - [10Mar2006-10:51:31] Cratylus you better hope i forget you said that - [10Mar2006-10:51:57] Brodbane@Eve Is mudos source with the lib? - [10Mar2006-10:52:03] Cratylus yip - [10Mar2006-10:52:13] Brodbane@Eve ohhh, pandora's box is calling me - [10Mar2006-10:52:21] Ptah@Eve I wont mention I do C unix programming then either - [10Mar2006-10:52:23] Cratylus the cygwin-modified source comes with the windows version too - [10Mar2006-10:52:53] Brodbane@Eve its worth checking out - [10Mar2006-10:52:53] Ashon@Stargate Atlantis FEATURE REQUEST: Have the previous days ds channels renamed and backed up for easy reference! - [10Mar2006-10:52:59] Cratylus its practically the same as the unix source, just a few lines changed here and there - [10Mar2006-10:54:40] Brodbane@Eve If i'm going to burn time, i'm going to do a mud socket project - [10Mar2006-10:54:56] Brodbane@Eve and revamp our intermud communication with some peer to peer activity - [10Mar2006-10:55:22] Cratylus that would be worth a dispensation - [10Mar2006-10:55:30] Ptah@Eve does the current mudos use interrupts for connections and incoming data events? - [10Mar2006-10:55:38] Cratylus heh - [10Mar2006-10:55:44] Cratylus let me know when you find out - [10Mar2006-10:56:04] Brodbane@Eve i doubt its asynchronous - [10Mar2006-10:56:18] Ashon@Stargate Atlantis ack, sockets, might as well go through recode the mudos sockets and throw in some apartment threading while your at it. - [10Mar2006-10:56:22] Cratylus if you ask in a non-lazy sounding way, intercre sometimes has people with helpful answers to such qustions - [10Mar2006-10:56:30] Ptah@Eve Well, if you just pound read() it pegs the cpu - [10Mar2006-10:56:46] Cratylus do not mention threading and mudos in the same breath on intercre tho - [10Mar2006-10:56:59] Ptah@Eve FORK() that! - [10Mar2006-10:57:09] Brodbane@Eve FYI, board 'read' is bugged - [10Mar2006-10:57:23] Brodbane@Eve if you just do a 'read' it throws a nice error - [10Mar2006-10:57:23] Cratylus yeh? doesnt surprise me - [10Mar2006-10:57:33] Cratylus i think it still uses an add_action, right? - [10Mar2006-10:57:55] Ptah@Eve Yes - [10Mar2006-10:58:03] Ptah@Eve read and post are add_actions - [10Mar2006-10:58:09] Brodbane@Eve The mud needs a better efun then add_action - [10Mar2006-10:58:17] Brodbane@Eve such as add_checked_action - [10Mar2006-10:58:19] Cratylus i'll verbidy boards. not top priority tho - [10Mar2006-10:58:25] Brodbane@Eve that actually does the idiot proofing in advance - [10Mar2006-10:58:27] Cratylus verbify - [10Mar2006-10:58:37] Ptah@Eve what idiots are wizards that are coding? - [10Mar2006-10:58:45] Ptah@Eve Er um, nvm, too many examples - [10Mar2006-10:59:17] Brodbane@Eve i'm going to write in a new add_action that simply checks to make sure the action is directed at that object/room - [10Mar2006-11:03:46] Cratylus ok, next release now includes a workaround for that board bug - [10Mar2006-12:27:02] Brodbane@Eve When is the next version scheduled for a release? - [10Mar2006-12:27:40] Cratylus heh - [10Mar2006-12:28:10] Cratylus well i dunno i been flirting with the idea of doing it soon - [10Mar2006-12:28:44] Cratylus but i hate to release a bunch of compat busters only to do it again shortly after - [10Mar2006-12:29:02] Brodbane@Eve we haven't even touched compat yet - [10Mar2006-12:36:22] Brodbane@Eve Cratylus, if you were going to improve intermud what feature set would you add in? - [10Mar2006-12:36:57] Cratylus can you give me an example of what you mean? - [10Mar2006-12:37:31] Brodbane@Eve What would you change about intermud to make it more usable. Not talking reliable here - [10Mar2006-12:37:49] Cratylus well - [10Mar2006-12:38:43] Cratylus if you mean the intermud subsystem on a mud, i've been meaning to implement intermud mail - [10Mar2006-12:38:53] Cratylus but it is a lot more complicated than it sounds - [10Mar2006-12:39:09] Brodbane@Eve you might as well rewrite intermud - [10Mar2006-12:39:19] Kriton@Emerald MUD but why? - [10Mar2006-12:39:23] Cratylus nah actually theres intermud support for it, it's just a real pain in the ass - [10Mar2006-12:39:29] Kriton@Emerald MUD whats wrong with it? - [10Mar2006-12:40:07] Kriton@Emerald MUD I2 was flakey as hell (loved being able to do call_other on someone else's mud with a bad I2 implementation) - [10Mar2006-12:40:11] Cratylus dead souls doesnt have any intermud mail support at all, and no oob either, meaning i have to put all that shit together, and it's a lot of work for the payoff - [10Mar2006-12:40:18] Kriton@Emerald MUD but I3 seems alright. - [10Mar2006-12:40:28] Kriton@Emerald MUD nods - [10Mar2006-12:42:08] Cratylus plus, each mud sending/receiving mail has to either be dirently on the internet or have extra firewall ports opened - [10Mar2006-12:42:26] Cratylus so, it's a pain to implement. but it would be nice to have - [10Mar2006-12:42:46] Kriton@Emerald MUD oh mail is oob? i guess that makes sense - [10Mar2006-12:42:52] Cratylus yeah - [10Mar2006-12:43:00] Brodbane@Eve oob exits? - [10Mar2006-12:43:03] Kriton@Emerald MUD hasn't implemented mail yet either ;-) - [10Mar2006-12:43:03] Brodbane@Eve lies - [10Mar2006-12:43:07] Cratylus its a good idea. tells kinda otta be too, if u aask me - [10Mar2006-12:43:35] Brodbane@Eve oob = out of band? - [10Mar2006-12:43:41] Cratylus ya - [10Mar2006-12:43:43] Kriton@Emerald MUD is working on a mud mail with the ability to use normal smtp - [10Mar2006-12:43:55] Brodbane@Eve i've seen muds with it - [10Mar2006-12:44:19] Ptah@Eve I think Everdark does an inbetween translation from the mail files to files the mud can read - [10Mar2006-12:44:21] Kriton@Emerald MUD is using exim+mysql+imap courier - [10Mar2006-12:44:43] Cratylus basically dead souls sends eve an auth request. eve sends back an id token. then dead souls connects directly to eve through the oob port, and sends an oob request. etc and so on, eventually my mail gets to your user via oob - [10Mar2006-12:45:23] Ptah@Eve Crats, that just sounded liked chapter 3 of my Cryptography and security book - [10Mar2006-12:45:51] Cratylus which is inconvenient, but it's reasonable to want to avoid private mail floting about someone elses router - [10Mar2006-12:46:50] Cratylus ds didnt have auth support either until recently. i put it in as part of a keepalive - [10Mar2006-12:46:54] Ptah@Eve so why not just piggy back it on DS chan? - [10Mar2006-12:47:00] Cratylus heh - [10Mar2006-12:47:14] Cratylus i'd rather not *broadcast* private mail - [10Mar2006-12:47:16] Ptah@Eve wasn't joking - [10Mar2006-12:48:06] Ptah@Eve You could tie it in to the @address for the chan, and only that place could read it... hrm, I suppose you could spoof that though - [10Mar2006-12:48:10] Cratylus i guess you could crypt it, but doing so is more complicated and impractical than just getting oob to work - [10Mar2006-12:48:20] Ashon@Stargate Atlantis do we really need intermud mail? - [10Mar2006-12:48:24] Cratylus no - [10Mar2006-12:48:26] Brodbane@Eve nope - [10Mar2006-12:48:32] Avatar@OuterSpace No. - [10Mar2006-12:48:40] Kriton@Emerald MUD it is nice though - [10Mar2006-12:48:46] Cratylus yep - [10Mar2006-12:48:48] Ptah@Eve I love how anything I have a potential solution for becomes "naw, nvm" - [10Mar2006-12:48:50] Kriton@Emerald MUD especially for creators needing help - [10Mar2006-12:48:56] Ptah@Eve feels so useful! - [10Mar2006-12:49:06] Ashon@Stargate Atlantis comforts Ptah. - [10Mar2006-12:49:17] Cratylus ptah i'd gladly welcome your input on this - [10Mar2006-12:49:21] Avatar@OuterSpace Normal mail works fine and if players are asked to submit a working mail addy then I see no reason to have in-mud mail. - [10Mar2006-12:49:27] Brodbane@Eve Oh lord, youve done it now Cratylus - [10Mar2006-12:49:29] Cratylus this particular idea of using a channel just isn't workable - [10Mar2006-12:49:33] Ptah@Eve One of these days, I'll have an idea that will be revolutionary - [10Mar2006-12:49:59] Avatar@OuterSpace In fact, till now I've only seen in-mud mails used for bug reports. And those can be sent to a normal mail box. - [10Mar2006-12:50:05] Ashon@Stargate Atlantis Ptah, it just means that you've got ideas that are great but not applicable. You're like a true *nix hacker. - [10Mar2006-12:50:19] Ptah@Eve well, in theory, everything is like a channel - [10Mar2006-12:50:23] Cratylus check out http://www.intermud.org/i3/specs/ for i3 specifications - [10Mar2006-12:50:27] Ptah@Eve Ahson, heh - [10Mar2006-12:50:55] Ptah@Eve ponders an email only channel - [10Mar2006-12:51:01] Kriton@Emerald MUD we used in-mud mail for tons of stuff besides bugs... we have a seperate system for bugs anyway - [10Mar2006-12:51:31] Ptah@Eve Bah, here I am trying to re-invent the wheel, I am a *nix hacker - [10Mar2006-12:51:43] Cratylus take a look at how channels work. it makes privacy exceedingly difficult - [10Mar2006-12:51:47] Brodbane@Eve Eve has like 6 versions of the 'wheel' - [10Mar2006-12:52:23] Ptah@Eve I'd just inherit the chan, encrypt, and deal with it that way in my high level type of hack attack solution - [10Mar2006-12:52:30] Avatar@OuterSpace is currently on a mud where all wizards receive *all* intermud channels by default. (unless specifically turned off) - [10Mar2006-12:52:36] Brodbane@Eve I love being able to use ' here, but not in regular chat - [10Mar2006-12:53:16] Cratylus you could crypt it but in order for it to be decryptable to the recipient it has to be decryptable to everyone else too, unless you use keys - [10Mar2006-12:53:18] Kriton@Emerald MUD shudders... I think its time to work - [10Mar2006-12:53:24] Cratylus in which case we're talking oob again - [10Mar2006-12:54:02] Kriton@Emerald MUD wouldn't want to bog the driver down the encrypting/decrypting blowfish data or whatever anyway - [10Mar2006-12:54:04] Ptah@Eve heh, I should just run a freaking cron job to transfer regular pine email to a folder and have a mime reader in game then - [10Mar2006-12:54:30] Brodbane@Eve forget reinventing email. Just have pop3/smtp - [10Mar2006-12:54:46] Brodbane@Eve oh wait, lets really do it OOG. Out of game. hmm - [10Mar2006-12:54:48] Cratylus that would be mighty cool - [10Mar2006-12:55:55] Kriton@Emerald MUD exim/mysql/courier ... exim writes out mail messages to individual files which are easy for a mud to read ;-) - [10Mar2006-12:56:07] Brodbane@Eve exim you say? - [10Mar2006-12:56:09] Brodbane@Eve hmm - [10Mar2006-12:56:17] Ptah@Eve Ok, good, someone thinks like I do then, I'm not insane - [10Mar2006-12:56:33] Kriton@Emerald MUD the mail would be totally seperate from the mud tho - [10Mar2006-12:56:37] Brodbane@Eve no comment. - [10Mar2006-12:56:59] Kriton@Emerald MUD maybe that would be a nice addition to I3... a mud address to smtp address resolver - [10Mar2006-12:57:07] Ptah@Eve I think that's the best approach, trying to get pop3 or smtp services INSIDE of the mudos would be a pain in the butt - [10Mar2006-12:57:23] Brodbane@Eve yeah, just have a translated for sure - [10Mar2006-12:57:23] Kriton@Emerald MUD i.e. kriton@emerald.mud resolves to kriton@mud.gameworkshop.com - [10Mar2006-12:57:55] Ptah@Eve well... then we could use a channel for all those aliases to update that new service - [10Mar2006-12:58:01] Ptah@Eve a non vis channel - [10Mar2006-12:58:18] Ptah@Eve much like how dns updates work - [10Mar2006-12:58:24] Kriton@Emerald MUD just add a new service/packet type - [10Mar2006-12:58:40] Brodbane@Eve you wouldn't need to use channels, just a translator daemon - [10Mar2006-12:58:42] Ptah@Eve Let me fantasize about my overly complicated solutions! - [10Mar2006-12:58:48] Kriton@Emerald MUD smtp-resolve-q / smtp-resolve-q or whatever - [10Mar2006-13:01:04] Avatar@OuterSpace Ptah, lets do email over ipv6 in game :) - [10Mar2006-13:01:49] Ptah@Eve Heh, now you are talking my level of crazy complexity! - [10Mar2006-13:02:05] Ptah@Eve ponders a 50k .c email object ingame - [10Mar2006-13:02:29] Brodbane@Eve 50? Thats if I wrote it, you *nix guys will have 6-12 files totaling 1.5MB - [10Mar2006-13:02:35] Kriton@Emerald MUD says '3l1te' and then keels over and dies. - [10Mar2006-13:02:53] Kriton@Emerald MUD emotes too. - [10Mar2006-13:03:25] Kriton@Emerald MUD writes it in 225 bytes of perl. - [10Mar2006-13:19:34] Cratylus remind me where the " ' " problem is happening? - [10Mar2006-13:19:46] Brodbane@Eve standard speech - [10Mar2006-13:20:05] Cratylus heh ok - [10Mar2006-13:20:13] Ptah@Eve yes you lose that when you just use that char for say - [10Mar2006-13:20:17] Ptah@Eve like in dont - [10Mar2006-13:21:27] Brodbane@Eve I dont speak english on Dead Souls, so i cant talk - [10Mar2006-13:21:43] Cratylus heh yeah thats a feature - [10Mar2006-13:22:17] Cratylus call me->SetLanguage("English",100) - [10Mar2006-13:25:10] Ptah@Eve sigh... where is the lpc manual online at? - [10Mar2006-13:32:27] Ashon@Stargate Atlantis which one? - [10Mar2006-13:32:39] Brodbane@Eve Hes all set, i believe - [10Mar2006-13:32:51] Ashon@Stargate Atlantis sweet. - [10Mar2006-13:32:53] Ptah@Eve Neg, I am Ptah, Set is another god - [10Mar2006-13:32:57] Brodbane@Eve Sometimes we are on the same mud, other times he pretends to not know me - [10Mar2006-14:07:52] Ptah@Eve Hrm... sscanf will not properly convert a negative number eh? - [10Mar2006-14:08:14] Cratylus what's the syntax yer using? - [10Mar2006-14:08:26] Ptah@Eve sscanf(str,"%d",aln) - [10Mar2006-14:08:48] Ptah@Eve %-d? - [10Mar2006-14:08:48] Cratylus i presum aln is an int - [10Mar2006-14:09:06] Ptah@Eve It's numeric yeah - [10Mar2006-14:09:14] Ptah@Eve 100 works fine, -100 doesnt - [10Mar2006-14:09:16] Cratylus is it a float or an int? - [10Mar2006-14:09:22] Ptah@Eve float - [10Mar2006-14:09:32] Cratylus see what happens with an int - [10Mar2006-14:09:48] Cratylus i bet it works. with a float you might try a different token, lemme doublecheck - [10Mar2006-14:09:56] Ptah@Eve %f? - [10Mar2006-14:11:07] Ptah@Eve int doesnt work either - [10Mar2006-14:11:29] Ptah@Eve It just doesn't like negs - [10Mar2006-14:11:51] Kriton@Emerald MUD it should - [10Mar2006-14:11:59] Cratylus yeah this doesnt sound right - [10Mar2006-14:12:37] Ptah@Eve nvm, I am a tard - [10Mar2006-14:15:24] Cratylus yeah it's working fine for me - [10Mar2006-14:16:24] Ptah@Eve hrm... does k=0 + -1000 work? - [10Mar2006-14:16:53] Cratylus@Frontiers heh - [10Mar2006-14:17:11] Cratylus@Frontiers are you getting 1 as output? - [10Mar2006-14:17:15] Ptah@Eve yes - [10Mar2006-14:17:27] Cratylus@Frontiers this is because thats effectively a modal - [10Mar2006-14:17:43] Ptah@Eve so that's the problem... - [10Mar2006-14:17:45] Cratylus@Frontiers you need something like k = (0 + -1000) - [10Mar2006-14:18:15] Ptah@Eve force it to resolve before it interprets eh? - [10Mar2006-14:18:35] Cratylus@Frontiers otherwise you're evaluating whether the arithmetic occurred, not the value of the arithmetic - [10Mar2006-14:19:55] Ptah@Eve ok, then what about k=-1000 - 0? - [10Mar2006-14:20:12] Ptah@Eve er I mean k=(-1000 - 0) - [10Mar2006-14:20:22] Cratylus what about it? - [10Mar2006-14:20:30] Ptah@Eve well, it's still giving a 1 - [10Mar2006-14:21:14] Cratylus let me test that - [10Mar2006-14:22:52] Cratylus you're doing something wrong - [10Mar2006-14:22:56] Cratylus i'm not getthing that - [10Mar2006-14:23:20] Cratylus can you show me the line doing this calculation? - [10Mar2006-14:23:27] Ptah@Eve well, it's in reality k=(p - j) where p=-1000 and j=0 - [10Mar2006-14:24:59] Ptah@Eve Hrm... bugger - [10Mar2006-14:25:33] Cratylus nope. - [10Mar2006-14:25:41] Cratylus i'm not replicating your result - [10Mar2006-14:25:53] Ptah@Eve Ok, this conditional is being odd with those values if(j > p && p < 0 && j = 0) - [10Mar2006-14:26:11] Ptah@Eve and I just noticed its = not == - [10Mar2006-14:26:11] Cratylus well there ya go - [10Mar2006-14:27:36] Cratylus in my tests so far, btw, k=-1000 - 0 is the same as k = (-1000 - 0) - [10Mar2006-14:27:54] Cratylus so it isnt actually modal as i'd first thought - [10Mar2006-14:28:40] Cratylus though my variables are so cryptic and easy to confuse as the ones yer using - [10Mar2006-16:51:57] Ashon@Stargate Atlantis debugger question, I've got some code that is not kicking up any kind of useful debug info. no logs, and dbxwhere/frame just tell me that it's crashing during the update.c call - [10Mar2006-16:52:27] Cratylus filename? - [10Mar2006-16:52:33] Ashon@Stargate Atlantis I am not quite sure how to track down the error from there. - [10Mar2006-16:52:59] Ashon@Stargate Atlantis itembackground.c in /props - [10Mar2006-16:53:07] Ashon@Stargate Atlantis ;) - [10Mar2006-16:53:14] Cratylus elog lib doesnt help? - [10Mar2006-16:53:19] Ashon@Stargate Atlantis elog lib - [10Mar2006-16:54:08] Ashon@Stargate Atlantis huh, thought that I'd already checked the lib log. - [10Mar2006-19:50:16] Cratylus hi tao. you can use this line for questions n stuff - [10Mar2006-19:50:32] Cratylus it's shared between dead souls muds - [10Mar2006-19:50:32] Tao@Dead_Souls_tao thanks - [10Mar2006-19:50:40] Oriam@Age of Darkness Woohoo new admin - [10Mar2006-19:50:54] Oriam@Age of Darkness great, now i have someone to help me :) - [10Mar2006-19:51:02] Tao@Dead_Souls_tao i have never tried anything like this before..and am just finding my feet - [10Mar2006-19:51:12] Oriam@Age of Darkness Your amoung friends tao - [10Mar2006-19:51:20] Oriam@Age of Darkness im only 2 days old :) - [10Mar2006-19:51:52] Brodbane@Eve hehe, i've got 200 days of logged mud time - [10Mar2006-19:51:57] Brodbane@Eve i have no life - [10Mar2006-19:52:11] Tao@Dead_Souls_tao is there anything i should know..like if my mistakes can affect anyone else's machine etc? - [10Mar2006-19:52:25] Tao@Dead_Souls_tao i am a complete newbie at this :D - [10Mar2006-19:52:25] Cratylus nothing you do will affect us unless you start spamming this line - [10Mar2006-19:52:59] Oriam@Age of Darkness Hey cratylus, i can modify the mudlib right? - [10Mar2006-19:53:07] Cratylus it's yours to do what you want with - [10Mar2006-19:53:17] Oriam@Age of Darkness Yay - [10Mar2006-19:53:21] Tao@Dead_Souls_tao cool, :D - [10Mar2006-19:53:29] Oriam@Age of Darkness to bad i have no clue where to start :( - [10Mar2006-19:53:33] Jerin@Jerins Folly lol, ya got the source bud, do whatever you want :p - [10Mar2006-19:53:45] Cratylus start by reading the players handbook - [10Mar2006-19:53:49] Jerin@Jerins Folly My suggestion would be to read a lot of the stuff that he's put together - [10Mar2006-19:53:55] Oriam@Age of Darkness I never got past chapter 3 in C++, For Dummies - [10Mar2006-19:54:07] Cratylus also read all the faqs on the mud homepage - [10Mar2006-19:54:19] Oriam@Age of Darkness oh no, i know lpc and such up the wazoo - [10Mar2006-19:54:37] Oriam@Age of Darkness its stuff like changing the command 'score' that i want to do, but have no clue - [10Mar2006-19:55:01] Cratylus practice and experience. but you know that, i'm sure - [10Mar2006-19:55:16] Jerin@Jerins Folly which is a wonderful command that I learned about on here the other day :p - [10Mar2006-19:55:22] Oriam@Age of Darkness i also want to make quests completely optional as well, not required to level up - [10Mar2006-19:55:34] Oriam@Age of Darkness although i could just change dirk to get rid of the qp requirement - [10Mar2006-19:56:14] Oriam@Age of Darkness wink wink - [10Mar2006-19:56:14] Cratylus i added the quest requirement cuz i figured it was easier to remove than to implement from scratch for new people - [10Mar2006-19:56:34] Oriam@Age of Darkness Sorry, im a bit of a newb, as well as a n00b, at this stuff - [10Mar2006-19:56:56] Cratylus however, you could just not use dirk and use some other method of advancement - [10Mar2006-19:57:16] Jerin@Jerins Folly Eh, here's another thing to try, look at the other items and such to get an idea how to do things - [10Mar2006-19:57:28] Oriam@Age of Darkness true, i like dirk, and its easy to modify to allow no qp for level - [10Mar2006-19:57:42] Jerin@Jerins Folly Crat, you were talkin about vim, what was the thing you were sayin about it and going to the end brace or whatnot? - [10Mar2006-19:57:58] Cratylus highlight a brace, pracket or parenthesis - [10Mar2006-19:58:02] Cratylus then type: % - [10Mar2006-19:58:12] Cratylus you jump to that thing's partner - [10Mar2006-19:58:36] Oriam@Age of Darkness brb guys - [10Mar2006-19:58:45] Cratylus k - [10Mar2006-19:58:49] Jerin@Jerins Folly Interesting, I think I'll have to print out a cheatsheet then try it again - [10Mar2006-20:00:31] Cratylus $ puts you at the end of a line. ^ puts you at the start. ctrl-g tells you where you are - [10Mar2006-20:01:07] Cratylus dd deletes a line. yyp copies the line above. o adds a line below. O adds a line above - [10Mar2006-20:01:27] Cratylus those are the ones i use most, aside from the obvious a i x - [10Mar2006-20:01:45] Jerin@Jerins Folly Ya - [10Mar2006-20:02:07] Oriam@Age of Darkness okay, could someone help me understand the score.c file? - [10Mar2006-20:02:18] Cratylus what do you need to know? - [10Mar2006-20:02:38] Oriam@Age of Darkness umm, lots of this stuff - [10Mar2006-20:02:46] Cratylus that's a little vague - [10Mar2006-20:02:58] Jerin@Jerins Folly what do you want to do first of all - [10Mar2006-20:02:58] Brodbane@Eve Give him a line number - [10Mar2006-20:03:02] Brodbane@Eve like 1-ALL OF THEM - [10Mar2006-20:03:04] Oriam@Age of Darkness like i said, i never did get into c++ much, so alot of this is unfamiliar to me - [10Mar2006-20:03:14] Oriam@Age of Darkness yeah, what brodbane said - [10Mar2006-20:03:28] Cratylus you should probably read the creators manual - [10Mar2006-20:03:34] Jerin@Jerins Folly no, Oriam, I think that was to you. - [10Mar2006-20:03:40] Oriam@Age of Darkness first of all, like this - [10Mar2006-20:03:42] Oriam@Age of Darkness (string)this_player()->GetReligion() - [10Mar2006-20:03:46] Cratylus even though you may know a lot of it, a reviw will help - [10Mar2006-20:03:50] Oriam@Age of Darkness where can i find a list of these commands - [10Mar2006-20:04:00] Brodbane@Eve I can explain some Oriam - [10Mar2006-20:04:02] Oriam@Age of Darkness functions rather, you know what i mean - [10Mar2006-20:04:18] Brodbane@Eve You are a player, and an object - [10Mar2006-20:04:26] Cratylus there are too many to list. those are functions, and the way to understand them is to know what types of functions look like what and what they do - [10Mar2006-20:04:30] Oriam@Age of Darkness i know - [10Mar2006-20:04:44] Cratylus take a look at /doc/efun - [10Mar2006-20:04:46] Oriam@Age of Darkness i mean, is there a list i can find in the mudlib? - [10Mar2006-20:05:02] Cratylus there are too many functions to list the way you mean - [10Mar2006-20:05:17] Oriam@Age of Darkness how about some of the common ones - [10Mar2006-20:05:23] Cratylus the most important ones ar emostly documented in /doc/sefun and /doc/efun - [10Mar2006-20:05:33] Cratylus you can look there - [10Mar2006-20:05:35] Oriam@Age of Darkness kay, ill look through em - [10Mar2006-20:06:03] Oriam@Age of Darkness i dont suppose that there are more files available for example on the web are there? - [10Mar2006-20:06:15] Cratylus what you see is what you get - [10Mar2006-20:06:23] Brodbane@Eve Cratylus stuck a gold mine in here - [10Mar2006-20:06:27] Jerin@Jerins Folly There are a few, but they're mostly for other libs - [10Mar2006-20:06:27] Oriam@Age of Darkness yeah - [10Mar2006-20:06:37] Oriam@Age of Darkness i just like to see lots of examples - [10Mar2006-20:06:43] Cratylus /domains/town - [10Mar2006-20:06:47] Oriam@Age of Darkness i do have to say by far this is my favorit mudlib - [10Mar2006-20:06:53] Brodbane@Eve Instead of trying to understand components of the lib, try actually making a few rooms/npcs/objects - [10Mar2006-20:07:01] Brodbane@Eve that do things, like move, create other objects - [10Mar2006-20:07:07] Oriam@Age of Darkness ive done that, ive made an entire wiz palace - [10Mar2006-20:07:19] Jerin@Jerins Folly Cratylus, how far off is this from NM 3? - [10Mar2006-20:07:23] Oriam@Age of Darkness hrmm, create other objects, intresting - [10Mar2006-20:07:33] Jerin@Jerins Folly Oriam, can you interact with your npc's and objects? - [10Mar2006-20:07:43] Cratylus i would especially recommend reading http://dead-souls.net/example.html - [10Mar2006-20:07:47] Brodbane@Eve Try making a 'remote' without looking at Crat's remote code - [10Mar2006-20:08:05] Oriam@Age of Darkness not really, but based on my interpretation of dirk, i can make it respnd to simple things. - [10Mar2006-20:08:19] Cratylus jerin, this is to nm3 like german is to english - [10Mar2006-20:08:32] Jerin@Jerins Folly lol, k - [10Mar2006-20:08:36] Cratylus not exaclty mutually intelligible, but very very similar - [10Mar2006-20:08:58] Jerin@Jerins Folly Ya, I thought I read somewhere that they were close or some hoopla like that - [10Mar2006-20:09:28] Cratylus dead souls 1 is basically the last iteration of nightmare IV, which was a leap forward from nm3 - [10Mar2006-20:09:48] Cratylus http://dead-souls.net/ds-faq.html - [10Mar2006-20:10:38] Jerin@Jerins Folly Ahh, ya, sorry, musta been half asleep when I read that the first time - [10Mar2006-20:12:39] Oriam@Age of Darkness i took a brief look at crats remote contol and that thing is way to complicated - [10Mar2006-20:13:07] Jerin@Jerins Folly Then keep on workin on an area til it isn't complicated :p - [10Mar2006-20:13:19] Oriam@Age of Darkness lol - [10Mar2006-20:13:35] Brodbane@Eve The remote can be used to make pets, players LOVE pets - [10Mar2006-20:13:45] Brodbane@Eve well, its the basis for pet code - [10Mar2006-20:13:45] Oriam@Age of Darkness okay, before i do that, i need to know something - [10Mar2006-20:14:29] Cratylus the secret to the remote control isnt the device itself, it's the drone shadow that it creates - [10Mar2006-20:14:45] Oriam@Age of Darkness how do i make quests. im a bit confused on that - [10Mar2006-20:14:53] Cratylus that's in the advanced lpc text descartes never got around to writing - [10Mar2006-20:15:01] Cratylus ah quests - [10Mar2006-20:15:11] Cratylus anything can be a quest - [10Mar2006-20:15:34] Cratylus if you code an object to do so, just picking it up can give you quest points and a quest title - [10Mar2006-20:15:36] Oriam@Age of Darkness so, basically i make an npc - [10Mar2006-20:15:46] Oriam@Age of Darkness and its like hey, go get - [10Mar2006-20:15:48] Cratylus take a look at /domains/town/npc/leo for guidance - [10Mar2006-20:15:56] Oriam@Age of Darkness then you get and and come back, and it gives you qp? - [10Mar2006-20:16:14] Cratylus quest it whatever you make it. it can be as boring as what you just said - [10Mar2006-20:16:24] Cratylus or it can be deeply complex and metaphysical - [10Mar2006-20:16:26] Oriam@Age of Darkness lol - [10Mar2006-20:16:42] Cratylus in the end what matters is you coding a mechanism for an object giving a player quest points and a quest title - [10Mar2006-20:16:46] Brodbane@Eve You know, my first pet commander object thing didnt use shadows - [10Mar2006-20:17:34] Cratylus mine didnt either. the first generation of the control did this ghastly thing where the original npc was destroyed and a subservient duplicate put in its place - [10Mar2006-20:17:48] Cratylus it worked, but it was inelegant - [10Mar2006-20:18:29] Brodbane@Eve ah, i had mine spawn a 'familiar' if the player rubbed an idol shaped like the animal - [10Mar2006-20:18:39] Brodbane@Eve so i didn't have to commandeer the npc - [10Mar2006-20:19:37] Oriam@Age of Darkness is there a command i can use to show me where an npc exists? - [10Mar2006-20:19:57] Cratylus the question makes assumptions that are not valid - [10Mar2006-20:20:13] Cratylus but, generally speaking, try findobj dirk - [10Mar2006-20:20:19] Oriam@Age of Darkness kay - [10Mar2006-20:21:15] Oriam@Age of Darkness hrmm, it seems leo is nonexistant - [10Mar2006-20:21:23] Cratylus that's the part with invalid assumptions - [10Mar2006-20:21:42] Cratylus no objects are "existing" until they are loaded onto memory - [10Mar2006-20:22:06] Cratylus so until someone walks into leo's room and thereby loads his file, there is no leo on the mud - [10Mar2006-20:22:06] Oriam@Age of Darkness i mean i need to the room in which a npc exists - [10Mar2006-20:22:24] Oriam@Age of Darkness hrmm, then why does it show leo and i havent visited him yet? - [10Mar2006-20:22:34] Oriam@Age of Darkness ahh nvm - [10Mar2006-20:22:42] Cratylus is there a number after leo's filename? - [10Mar2006-20:22:44] Oriam@Age of Darkness one of the guys on my mud ran through his room - [10Mar2006-20:22:52] Oriam@Age of Darkness nope - [10Mar2006-20:23:18] Cratylus that's the master copy of leo. it doesnt actually exist anywhere - [10Mar2006-20:23:32] Oriam@Age of Darkness i see - [10Mar2006-20:24:31] Oriam@Age of Darkness so could i clone leo anywhere and he work properly? - [10Mar2006-20:24:51] Cratylus not quite - [10Mar2006-20:25:15] Oriam@Age of Darkness where is leo located? - [10Mar2006-20:25:17] Cratylus well, ok the short answer is yes, with a complicated exception - [10Mar2006-20:25:33] Cratylus /domains/town/npc/leo.c - [10Mar2006-20:25:41] Oriam@Age of Darkness i mean roomwise - [10Mar2006-20:25:41] Cratylus /domains/town/room/basement.c - [10Mar2006-20:26:03] Oriam@Age of Darkness howd you find that? memory? - [10Mar2006-20:26:13] Cratylus heh no, i coded him. i know where he lives - [10Mar2006-20:26:29] Oriam@Age of Darkness thats what i mean - [10Mar2006-20:27:40] Oriam@Age of Darkness how do i ask leo bout quests - [10Mar2006-20:27:56] Oriam@Age of Darkness i dont see anything in the code that would seem to allow him to interact with me - [10Mar2006-20:28:14] Cratylus hmmm - [10Mar2006-20:28:26] Cratylus can you tell me what you exected to see? - [10Mar2006-20:28:38] Oriam@Age of Darkness hes muttering about the orcslayer - [10Mar2006-20:29:10] Oriam@Age of Darkness in the code, it says if you have completed the orcslayer quest, then it will tell you. how do i get it to display that message - [10Mar2006-20:29:46] Cratylus you're confusing me. isn't the messagein the code you're reading? - [10Mar2006-20:30:00] Brodbane@Eve this_player()->eventPrint("blah") - [10Mar2006-20:30:12] Oriam@Age of Darkness blargh - [10Mar2006-20:30:31] Brodbane@Eve or write() - [10Mar2006-20:30:41] Cratylus i dont think that's what he's asking - [10Mar2006-20:30:57] Oriam@Age of Darkness okay, hes muttering about the orcslayer. is there anyway to get him to say more about it, or do i have to solve the rest on my own? - [10Mar2006-20:31:13] Cratylus what you see is what you get - [10Mar2006-20:31:15] Brodbane@Eve oh hes your npc Crat, yeah,hmm - [10Mar2006-20:31:23] Cratylus i strongly urge you to read the players handbook - [10Mar2006-20:31:25] Oriam@Age of Darkness well aint that a barrel of fun - [10Mar2006-20:31:27] Oriam@Age of Darkness i ahve - [10Mar2006-20:31:37] Oriam@Age of Darkness have* - [10Mar2006-20:31:45] Cratylus i want to help you, but i cant just make you understand code over a channel - [10Mar2006-20:32:03] Brodbane@Eve Crat, if you have two muds on intermud with the same name, who wins? - [10Mar2006-20:32:07] Cratylus the orcslayer quest is explained in detail in the handbook - [10Mar2006-20:32:13] Cratylus the first one to boot - [10Mar2006-20:42:08] Brodbane@Eve testing - [10Mar2006-20:42:12] Cratylus passed - [10Mar2006-20:42:18] Oriam@Age of Darkness loud and clear - [10Mar2006-20:42:36] Brodbane@Eve ok - [10Mar2006-20:42:52] Brodbane@Eve afk, must perform fatherly obligations - [10Mar2006-20:57:01] Oriam@Age of Darkness aight, im off to work on my server comp - [10Mar2006-20:57:04] Oriam@Age of Darkness later guys - [10Mar2006-20:57:09] Oriam@Age of Darkness and thanks for the help - [10Mar2006-21:02:52] Brodbane@Eve Man, i wish i developed on a nightmare mud previous, everything is not where i'm expecting it - [10Mar2006-21:03:00] Cratylus by oriam - [10Mar2006-21:03:23] Cratylus brodbane, yeah there were lots of changes between nm3 and nm IV - [10Mar2006-21:09:16] Brodbane@Eve /lib/guild.c is faulty - [10Mar2006-21:09:24] Cratylus is it ever - [10Mar2006-21:10:04] Cratylus its pretty much totally fuxt. guilds will probably look very different by the time i'm done - [10Mar2006-21:10:52] Brodbane@Eve Ok, so i change GenerateObviousExits(), and then a update /lib/* and /lib/std/*, and -r of course and still no propogation - [10Mar2006-21:11:30] Cratylus whatever room oyu want to have the new functionality: update -r /path/to/room.c - [10Mar2006-21:12:39] Brodbane@Eve It helps when i'm in a room that isn't circumventing my change by calling it itself - [10Mar2006-21:12:39] Cratylus rooms not yet loaded will then have the functionality when you do load them - [10Mar2006-21:32:41] Brodbane@Eve doesnt inherit LIB_OBJECT give you object::init access? - [10Mar2006-21:32:51] Cratylus no - [10Mar2006-21:33:03] Cratylus erm wait iread that wrong - [10Mar2006-21:33:11] Brodbane@Eve i've got an object - [10Mar2006-21:33:19] Cratylus object::init(); - [10Mar2006-21:33:51] Cratylus unless theres good reason for it, that should be the first line in the init() fun of the object - [10Mar2006-21:34:07] Cratylus unless theres good reason for doing otherwise, that should be the first line in the init() fun of the object - [10Mar2006-21:34:15] Brodbane@Eve /open/Brodbane/poolTable.c line 181: No such inherited function object::init - [10Mar2006-21:34:23] Brodbane@Eve thats in my init() for the object - [10Mar2006-21:34:37] Brodbane@Eve oh btw, thats a working poolTable:) - [10Mar2006-21:44:24] Brodbane@Eve what an utterly disgusting amount of math - [10Mar2006-21:44:30] Brodbane@Eve vectors, collisions - [10Mar2006-21:44:50] Jerin@Jerins Folly Better you then me :p - [10Mar2006-22:28:32] Brodbane@Eve hmm TEAL isn't an available ansi color - [10Mar2006-22:29:38] Cratylus colors - [10Mar2006-22:33:33] Brodbane@Eve hmm, can you or them together to get a lighter... say blue? - [10Mar2006-22:33:41] Brodbane@Eve or them together* - [10Mar2006-22:36:24] Cratylus BOLD - [10Mar2006-22:36:36] Cratylus grep for BOLD in /lib/* - [10Mar2006-22:36:50] Cratylus grep BOLD /lib/* - [10Mar2006-22:37:00] Cratylus oh heh that wont work will it - [10Mar2006-22:37:08] Cratylus hang on - [10Mar2006-22:37:18] Brodbane@Eve holy crap, i love grep! - [10Mar2006-22:37:32] Brodbane@Eve the source looks like a light bright, but i like it - [10Mar2006-22:37:50] Cratylus ya anyway look for examples of color use in lib - [10Mar2006-22:38:05] Brodbane@Eve My old mud had a teal, but i just cant locate it - [10Mar2006-22:38:17] Cratylus what does teal look like? - [10Mar2006-22:38:43] Kristus@The Hollow thats regular cyan, isnt it? - [10Mar2006-22:38:51] Brodbane@Eve nah, cyan is very bright - [10Mar2006-22:38:57] Brodbane@Eve its a dull cyan - [10Mar2006-22:38:57] Kristus@The Hollow no, thats bold cyan - [10Mar2006-22:39:07] Kristus@The Hollow regular cyan isnt bright, bold cyan is - [10Mar2006-22:39:07] Ashon@Stargate Atlantis Teal is a yellowish green - [10Mar2006-22:39:21] Kristus@The Hollow teal is a blueish green isnt it? - [10Mar2006-22:39:25] Cratylus sounds like a bunch of goddamn interior decorators in here - [10Mar2006-22:39:33] Brodbane@Eve teal is blueish green - [10Mar2006-22:39:35] Ashon@Stargate Atlantis Brod, you wrote a pool table in lpc? - [10Mar2006-22:39:41] Kristus@The Hollow then thats regular cyan - [10Mar2006-22:39:49] Brodbane@Eve Not my pool table, its another guy's - [10Mar2006-22:40:05] Brodbane@Eve when i do 'colors' the cyan i see is offensive - [10Mar2006-22:40:15] Ashon@Stargate Atlantis :http://noz.day-break.net/webcolor/teal.html - [10Mar2006-22:40:47] Kristus@The Hollow dont go by that - [10Mar2006-22:41:01] Brodbane@Eve 006666 - [10Mar2006-22:41:05] Brodbane@Eve that one - [10Mar2006-22:41:16] Kristus@The Hollow regular cyan - [10Mar2006-22:41:32] Brodbane@Eve +points to Kirstus - [10Mar2006-22:41:54] Kristus@The Hollow eval return write("%^CYAN%^test%^RESET%^") - [10Mar2006-22:41:56] Brodbane@Eve side note, the 'colors' command needs to reflect the actual color of cyan - [10Mar2006-22:42:22] Brodbane@Eve thats more blue then 006666 - [10Mar2006-22:42:40] Kristus@The Hollow thats pretty damn close - [10Mar2006-22:42:58] Brodbane@Eve given the few choices, that must be it - [10Mar2006-22:45:43] Ashon@Stargate Atlantis Crat can I make a suggestion on the clone cmd? If the obj you are trying to clone isn't in the directory, it should output something a little more helpful, then: Failed to clone file: blah - [10Mar2006-22:45:57] Cratylus for example? - [10Mar2006-22:46:07] Brodbane@Eve It should read your mind - [10Mar2006-22:46:19] Cratylus right. clone what i meant not what i typed - [10Mar2006-22:46:29] Cratylus the parser isnt there yet - [10Mar2006-22:46:39] Ashon@Stargate Atlantis it should say something like: Failed to clone: file not in current directory. - [10Mar2006-22:46:41] Brodbane@Eve my VB.NET mudlib so assumes what i meant - [10Mar2006-22:46:55] Cratylus well why dont you marry it, then? - [10Mar2006-22:46:57] Ashon@Stargate Atlantis poking fun at me? - [10Mar2006-22:47:03] Brodbane@Eve no, at Ptah - [10Mar2006-22:47:25] Ashon@Stargate Atlantis okay, b/c my other project is a vb.net mud too. - [10Mar2006-22:47:46] Brodbane@Eve hehe, I didn't know that. Sometimes i forget their may be other VB programmers in the room - [10Mar2006-22:47:52] Brodbane@Eve their = there - [10Mar2006-22:48:32] Brodbane@Eve There are only a few conditions for the standard "failed to clone file:" message - [10Mar2006-22:48:44] Brodbane@Eve if they aren't prefixed with compile errors, its a directory issue - [10Mar2006-22:48:54] Brodbane@Eve compile = runtime - [10Mar2006-22:49:36] Ashon@Stargate Atlantis nods in understanding. - [10Mar2006-22:51:55] Brodbane@Eve Anyone know of a function that converts ints to string representation? I think I had to write one last time - [10Mar2006-22:52:11] Brodbane@Eve ie 1 = one - [10Mar2006-22:52:33] Cratylus itoa() - [10Mar2006-22:52:37] Cratylus on - [10Mar2006-22:52:41] Cratylus oh - [10Mar2006-22:52:55] Cratylus cardinal - [10Mar2006-22:52:57] Brodbane@Eve yeah a little more tricky - [10Mar2006-22:53:11] Cratylus cardinal(42) - [10Mar2006-22:53:36] Brodbane@Eve cardinal(42) == "Forty Two"? - [10Mar2006-22:53:48] Cratylus eval return cardinal(42) - [10Mar2006-22:54:00] Brodbane@Eve excellent - [10Mar2006-22:55:55] Kristus@The Hollow billion is as high as it goes? - [10Mar2006-22:56:10] Cratylus heh - [10Mar2006-22:56:22] Brodbane@Eve It can't handle over a billion? I'm so going to rewrite mudos - [10Mar2006-22:56:58] Ashon@Stargate Atlantis damn right. Teach mudos a lesson! - [10Mar2006-22:57:08] Brodbane@Eve eval return cardinal(999999999), i can't imagine how they did it - [10Mar2006-22:58:02] Ashon@Stargate Atlantis wow. - [10Mar2006-23:05:13] Brodbane@Eve bug: down doesn't alias to d - [10Mar2006-23:05:25] Brodbane@Eve ie, 'down' gets you no where - [10Mar2006-23:06:21] Kristus@The Hollow sure it does - [10Mar2006-23:06:23] Ashon@Stargate Atlantis VICTORY! - [10Mar2006-23:06:27] Cratylus neither does east - [10Mar2006-23:06:33] Cratylus "go down", "go east" - [10Mar2006-23:08:08] Brodbane@Eve hrmm, you got me there - [10Mar2006-23:10:46] Ashon@Stargate Atlantis DS accepts !=NULL as an evaluation for an if statement, yes? - [10Mar2006-23:12:25] Cratylus i've never tried it, i'd be surprised if it did - [10Mar2006-23:12:47] Cratylus if(!thing) - [10Mar2006-23:12:53] Cratylus if(thing == "") - [10Mar2006-23:13:49] Cratylus obviously the opposites are if(thing), if(thing != "") - [10Mar2006-23:14:27] Ashon@Stargate Atlantis nods. - [10Mar2006-23:35:18] Jerin@Jerins Folly Where can I find what is compiled in? - [10Mar2006-23:35:49] Ashon@Stargate Atlantis sweet, now I can add properties to items and verbs with the speed of my typing. - [10Mar2006-23:36:03] Ashon@Stargate Atlantis Jerin, waddya mean compiled in? - [10Mar2006-23:36:51] Jerin@Jerins Folly I was looking at pow in /doc/efun/floats and it said if PACKAGE_MATH is compiled in - [10Mar2006-23:37:51] Brodbane@Eve hmm. eventDescribeEnvironment and look do not contain the line that prints out the path of the room you are in - [10Mar2006-23:38:23] Ashon@Stargate Atlantis they were talking about floats earlier, I'm pretty sure it's part of the distro - [10Mar2006-23:38:35] Brodbane@Eve we have floats - [10Mar2006-23:38:50] Jerin@Jerins Folly I assumed as much - [10Mar2006-23:39:26] Cratylus ds2.0r14/v22.2b14/local_options - [10Mar2006-23:39:36] Cratylus ds2.0r14/v22.2b14/options.h - [10Mar2006-23:39:40] Brodbane@Eve eval return 1.45+2.5 - [10Mar2006-23:40:32] Brodbane@Eve eval return 1.544+2 - [10Mar2006-23:41:10] Jerin@Jerins Folly cool, thank ya much - [10Mar2006-23:41:20] Cratylus eval return 21.99/7.0 - [10Mar2006-23:41:32] Jerin@Jerins Folly or eval return pow( 2, 4 ) - [10Mar2006-23:41:58] Jerin@Jerins Folly that's the one I was specifically lookin at - [10Mar2006-23:42:04] Brodbane@Eve Cratylus, where the hell is the path being printed when 'look' is called - [10Mar2006-23:42:23] Cratylus players don't see that. only creators - [10Mar2006-23:42:27] Brodbane@Eve right - [10Mar2006-23:42:57] Brodbane@Eve I've checked out look and eventDescribeEnvironment expecting to find an if(creatorp()) - [10Mar2006-23:50:43] Cratylus /lib/creator line 105 - [10Mar2006-23:51:47] Brodbane@Eve ahhh, thanks - [10Mar2006-23:53:06] Ashon@Stargate Atlantis god, we'd all be lost if cratylus wasn't around as much as he is, wouldn't we? - [10Mar2006-23:53:18] Brodbane@Eve i'd just waste a lot more time - [10Mar2006-23:53:34] Ashon@Stargate Atlantis guffaws. - [11Mar2006-00:33:57] Cratylus heh. locates are for people on the intermud - [11Mar2006-00:34:17] Jerin@Jerins Folly lol - [11Mar2006-00:34:23] Jerin@Jerins Folly Whoops :p - [11Mar2006-00:34:31] Jerin@Jerins Folly Sorry bout that - [11Mar2006-00:35:01] Cratylus header files are usually in /include or /secure/include - [11Mar2006-00:35:01] Jerin@Jerins Folly 'spose I should read the help file before I type a new command then - [11Mar2006-00:35:15] Jerin@Jerins Folly Ya, that was my next spot to check - [11Mar2006-01:08:30] Brodbane@Eve Is there a function that will convert an int to a time format? ie, 123 = 2m3s? - [11Mar2006-01:08:46] Cratylus nope - [11Mar2006-01:13:30] Brodbane@Eve you know, you should have a convert_age() in time.c, so if a player sends you a tell and you are idle they get some indication back - [11Mar2006-01:13:56] Cratylus idle cratylus - [11Mar2006-01:14:04] Cratylus also rwho dead souls - [11Mar2006-01:14:42] Brodbane@Eve ah, that works too - [11Mar2006-01:20:08] Brodbane@Eve what function are you using to convert query_idle into that nice string? - [11Mar2006-01:20:30] Cratylus dunno. what's it look like? - [11Mar2006-01:21:04] Brodbane@Eve Recluse has been idle for eighteen minutes and seventeen seconds. - [11Mar2006-01:21:20] Cratylus heh - [11Mar2006-01:21:30] Cratylus which idle - [11Mar2006-01:21:38] Brodbane@Eve 'idle' - [11Mar2006-01:21:42] Cratylus more /cmds/players/idle.c - [11Mar2006-01:22:23] Cratylus that will show you where the command is, and what it contains - [11Mar2006-01:24:33] Cratylus and yes i'm the lib maintainer :) - [11Mar2006-01:24:39] Cratylus damn. mischan - [11Mar2006-01:26:24] Brodbane@Eve hehe - [11Mar2006-01:35:21] Brodbane@Eve ok, done with the who command now - [11Mar2006-01:35:51] Brodbane@Eve it now reports idleness, if people are tell blocking, if people are in ed - [11Mar2006-01:35:53] Brodbane@Eve the works - [11Mar2006-01:40:18] Jerin@Jerins Folly Now just a hypothetical, if people reworked commands, would you make something such as a snippets page? - [11Mar2006-01:42:53] Cratylus mmhmmm...? - [11Mar2006-01:42:59] Cratylus oh - [11Mar2006-01:43:07] Cratylus well sure i can do that - [11Mar2006-01:43:19] Jerin@Jerins Folly I doubt it'd happen, but just asking in general - [11Mar2006-01:43:43] Jerin@Jerins Folly Like for myself, I'm trying to create a blank command that I can refer to later on when and if I want to - [11Mar2006-01:44:09] Cratylus take a look in cmds/ in your homedir - [11Mar2006-01:44:17] Jerin@Jerins Folly Yup, doin that now - [11Mar2006-01:45:10] Jerin@Jerins Folly k, after adding in a so-called command, what else do I need to do? - [11Mar2006-01:45:42] Cratylus update /daemon/command - [11Mar2006-01:46:06] Jerin@Jerins Folly Awesome, thanks - [11Mar2006-01:46:12] Cratylus no prob - [11Mar2006-01:54:20] Brodbane@Eve i'd have no problem sharing any or all of Eve's modifications - [11Mar2006-02:03:57] Ashon@Stargate Atlantis the problem becomes maintaining all the inheritance schemes, and all that stuff to do snippets. I think that is one of the biggest reasons that LP is not as popular (other then those talked about yesterday) - [11Mar2006-02:04:11] Ashon@Stargate Atlantis IRT: sharing lib mods. - [11Mar2006-02:04:15] Jerin@Jerins Folly Well, if they were generic enough - [11Mar2006-02:05:51] Brodbane@Eve some are, some aren't - [11Mar2006-02:05:58] Ashon@Stargate Atlantis It would become a headache to maintain. Just getting upgrades out from the core development lib is going to cause headaches. - [11Mar2006-02:06:00] Brodbane@Eve commands are fairly abstract enough - [11Mar2006-02:06:22] Ashon@Stargate Atlantis sure but they have to be applicable too. - [11Mar2006-02:07:00] Jerin@Jerins Folly Well just being able to see the thought processes of other people though, they may be able to modify it to suit their needs or make something that accomplishes the same - [11Mar2006-03:44:29] Ashon@Stargate Atlantis anyone on who knows where the save function is? preferably the player/soul one? - [11Mar2006-10:09:22] Cratylus yer prolly looking for one of the functions in /doc/efun/general - [11Mar2006-11:16:07] Ashon@Stargate Atlantis yah, I was actually looking for the code. - [11Mar2006-11:33:04] Cratylus unfortunately that's in the guts of the driver - [11Mar2006-11:41:28] Ashon@Stargate Atlantis throws his hands up in disgust. - [11Mar2006-11:42:20] Ashon@Stargate Atlantis that's allright, I shuffled my todo list last night, b/c I realized that that wasn't what I wanted to do next. I want to do Dynamic Descriptions next! - [11Mar2006-12:30:23] Cratylus i can't think of any way to save/manipulate files without efuns...some stuff just belongs in the driver - [11Mar2006-12:30:49] Cratylus if it's i/o, you want it happening as fast and efficiently as possible to avoid lag - [11Mar2006-12:34:20] Ashon@Stargate Atlantis nods. - [11Mar2006-13:17:25] Brodbane@Eve hist - [11Mar2006-13:26:08] Ashon@Stargate Atlantis -erectomy! - [11Mar2006-13:26:40] Ashon@Stargate Atlantis fails to chuckle at his own joke. - [11Mar2006-14:28:33] Brodbane@Eve quiet here today - [11Mar2006-14:34:45] Jerin@Jerins Folly Yup - [11Mar2006-14:35:17] Jerin@Jerins Folly On three different muds I play/work on the player numbers are low - [11Mar2006-14:42:39] Cratylus intermud went down - [11Mar2006-14:42:47] Cratylus just came back up a few minutes ago - [11Mar2006-14:45:12] Brodbane@Eve i hate a great time with the 9mm pistol last night - [11Mar2006-14:45:20] Brodbane@Eve little saddened by its reload bug - [11Mar2006-14:45:30] Brodbane@Eve i had* - [11Mar2006-14:45:36] Brodbane@Eve man i cant type as of late - [11Mar2006-14:48:09] Cratylus havent played with the pistol in a while - [11Mar2006-14:48:27] Cratylus its part of a ranged weapon project thats dormant for now - [11Mar2006-15:04:54] Brodbane@Eve it wont be used in our mud - [11Mar2006-15:05:00] Brodbane@Eve just a fun pulp fiction distraction - [11Mar2006-16:57:02] Alensin@Dead_Souls_alensin Is it possible to change descriptions for races so they don't just reflect the number and types of limbs they have? For RP and such? - [11Mar2006-16:57:48] Niang@Kol no idea but i like the sound of it :) - [11Mar2006-16:59:24] Niang@Kol Can you remember which way round the SetMelee flag gose is it 1 for does normally use weapon of 0 for dose normally use weapon? - [11Mar2006-17:00:25] Cratylus melee is non weapon - [11Mar2006-17:00:49] Cratylus melee 1 makes the thing good at unarmed combat - [11Mar2006-17:01:23] Niang@Kol ahh so my rabbit should be melee 1 then - [11Mar2006-17:01:25] Alensin@Dead_Souls_alensin Where are the race descriptions and such autogenerated from? - [11Mar2006-17:01:29] Cratylus as to race descriptions, sure. you can put descriptions in /doc/help - [11Mar2006-17:01:45] Niang@Kol thanx cratylus - [11Mar2006-17:01:49] Cratylus np - [11Mar2006-17:01:51] Alensin@Dead_Souls_alensin Ah. - [11Mar2006-17:03:20] Alensin@Dead_Souls_alensin I'm not sure, where do the extant race help files come from? - [11Mar2006-17:03:26] Alensin@Dead_Souls_alensin I can't see them in /doc/help/races - [11Mar2006-17:03:46] Cratylus nope theyre not there - [11Mar2006-17:03:52] Cratylus oh thats not files - [11Mar2006-17:04:04] Cratylus those are autogenerated byt he races daemon - [11Mar2006-17:04:14] Alensin@Dead_Souls_alensin Ah... - [11Mar2006-17:04:42] Alensin@Dead_Souls_alensin Any way to fiddle with that short of rewriting the daemon entirely? - [11Mar2006-17:05:48] Cratylus no need. next release will output the file in help/races instead of the autogenerated stuff, if the file is there - [11Mar2006-17:06:17] Alensin@Dead_Souls_alensin Oh, good. - [11Mar2006-17:06:51] Oriam@Age of Darkness Hello everyone. - [11Mar2006-17:06:55] Cratylus howdy - [11Mar2006-17:07:03] Niang@Kol hello - [11Mar2006-17:07:13] Oriam@Age of Darkness Hey crat, I finally got a working quest up. - [11Mar2006-17:07:21] Oriam@Age of Darkness It sucks, but works none the less. - [11Mar2006-17:07:23] Cratylus awesome - [11Mar2006-17:07:41] Niang@Kol cheers - [11Mar2006-17:07:57] Niang@Kol sorry not very good with emote yet - [11Mar2006-17:08:29] Oriam@Age of Darkness can you emote over ds? - [11Mar2006-17:08:58] Niang@Kol no idea, force of habit from playing on other muds - [11Mar2006-17:09:00] Alensin@Dead_Souls_alensin Perhaps the racial description could be part of the race file format? - [11Mar2006-17:09:02] Cratylus dsemote cheers. - [11Mar2006-17:09:14] Niang@Kol cheers - [11Mar2006-17:09:20] Niang@Kol thanx - [11Mar2006-17:09:22] Cratylus np - [11Mar2006-17:09:26] Oriam@Age of Darkness cheers. - [11Mar2006-17:09:28] Oriam@Age of Darkness cool - [11Mar2006-17:09:34] Alensin@Dead_Souls_alensin cackles. - [11Mar2006-17:10:00] Niang@Kol thing is every mud i've every played on dose it diffently - [11Mar2006-17:11:30] Oriam@Age of Darkness same here - [11Mar2006-17:11:42] Niang@Kol ahhh i've got a poor likkle goblin sentry with no armour or weapons - [11Mar2006-17:11:57] Oriam@Age of Darkness but then again, ive only played on two other muds, and by definition the one doesnt qualify as a mud - [11Mar2006-17:12:47] Niang@Kol i've played on a few, i started (and still play elephant mud) i've also played starmud and nightmare - [11Mar2006-17:13:05] Oriam@Age of Darkness im active on Ages of Despair, but i use to play Nightmist - [11Mar2006-17:15:46] Oriam@Age of Darkness hey crat, you programmed all the pre loaded areas right? - [11Mar2006-17:17:14] Cratylus Ylsrim is not mine - [11Mar2006-17:17:20] Cratylus but town and default are - [11Mar2006-17:17:55] Cratylus Ylsrim is from the original 1.1 release, though i did have to work on it to get it to work - [11Mar2006-17:22:28] Oriam@Age of Darkness where are the efuns located? - [11Mar2006-17:23:32] Niang@Kol next to the dfuns andjust before the ffuns? - [11Mar2006-17:23:40] Oriam@Age of Darkness ... - [11Mar2006-17:24:28] Niang@Kol sorry i'm in a very silly mood this evening - [11Mar2006-17:25:35] Cratylus heh - [11Mar2006-17:26:23] Cratylus http://dead-souls.sourceforge.net/ds-admin-faq.html - [11Mar2006-17:34:40] Oriam@Age of Darkness kay i got a question about vendors - [11Mar2006-17:35:36] Oriam@Age of Darkness anything in the room i designate as a storage room is sold by the vendor correct? - [11Mar2006-17:36:10] Oriam@Age of Darkness nvm - [11Mar2006-17:41:58] Cratylus ok intermud is back i guess - [11Mar2006-17:42:04] Cratylus damn its been really flaky lately - [11Mar2006-17:42:10] Oriam@Age of Darkness lol its all good - [11Mar2006-17:42:38] Cratylus anyway, oriam, please read the admin faq at http://dead-souls.sourceforge.net/ds-admin-faq.html for an explanation of efuns - [11Mar2006-17:42:52] Oriam@Age of Darkness i know what they are, i just didnt know where to find em - [11Mar2006-17:42:58] Cratylus and yes anything in the vebdors storage room is sellable by them - [11Mar2006-17:43:12] Cratylus they're in the driver, not findable on the lib - [11Mar2006-17:43:38] Cratylus you'll have to go through the C++ code in v22.2b14 - [11Mar2006-17:43:58] Niang@Kol sooner you than me oriam :) - [11Mar2006-17:44:13] Oriam@Age of Darkness what are estates? - [11Mar2006-17:44:35] Oriam@Age of Darkness i cant seem to find any files directly describing them - [11Mar2006-17:45:01] Cratylus that's legacy or unimplemented functionality, depending on yer point of view. theres nothing set up for it now, but that's where player rooms go - [11Mar2006-17:45:11] Cratylus in nightmare, players could buy houses n stuff - [11Mar2006-17:45:13] Oriam@Age of Darkness ahh okay - [11Mar2006-17:45:19] Oriam@Age of Darkness yeah, you can do that in my other mud - [11Mar2006-17:45:41] Oriam@Age of Darkness i just planned on taking direct requests for them then hand coding it. - [11Mar2006-17:46:13] Oriam@Age of Darkness god bless the QCS - [11Mar2006-17:46:23] Niang@Kol amen to that - [11Mar2006-17:47:21] Niang@Kol i think they should create a new nobel prize of muds and That would most definatly get the first prize - [11Mar2006-17:47:42] Oriam@Age of Darkness whats that? - [11Mar2006-17:48:00] Niang@Kol the QCS - [11Mar2006-17:48:38] Oriam@Age of Darkness well im out guys, see ya later - [11Mar2006-17:48:46] Niang@Kol bye - [11Mar2006-17:49:10] Cratylus seeya - [11Mar2006-17:51:25] Niang@Kol ok a little direction here please, i'm looking for the coding that does the checking to see if you can wield a weapon. I know i can alter it for each weapon but i wanted to look at the one that is already there, any ideas which files i should be looking at? - [11Mar2006-17:52:25] Cratylus hmm - [11Mar2006-17:52:59] Niang@Kol i did a serch looking for wield and got about 30 result :( - [11Mar2006-17:53:13] Cratylus type: read chapter 29 in manual - [11Mar2006-17:55:12] Avatar@OuterSpace likes the sound of tbat (up to date documentation rocks) - [11Mar2006-18:02:18] Cratylus yeah i'm just finishing up docs now in preparation for the next release. prolly tonight or tomorrow - [11Mar2006-18:02:48] Jerin@Jerins Folly and this'll be r15, correct? - [11Mar2006-18:02:56] Cratylus actually r16 - [11Mar2006-18:03:20] Cratylus some releases are just for sanity checking and not released into the wild - [11Mar2006-18:03:26] Avatar@OuterSpace will happily explore the new release next weekend. - [11Mar2006-18:03:30] Jerin@Jerins Folly Ah - [11Mar2006-18:03:55] Niang@Kol it alway gose in twos :), you'll get used to it - [11Mar2006-18:04:33] Cratylus yeah actually, i guess they are but it isnt really on purpose. it's jus tthat i usually fuck up one last thing and catch it in time - [11Mar2006-18:05:47] Jerin@Jerins Folly Let's say I was working on an area, would I be able to just drop that in with minimal effort? - [11Mar2006-18:05:49] Niang@Kol you can't stop doing it now, you'd really throw me - [11Mar2006-18:06:33] Cratylus heh - [11Mar2006-18:06:37] Niang@Kol almost certainly if the last releases are anything to go by :) - [11Mar2006-18:07:16] Cratylus yeah well i really dont recommend trying to upgrade to a new release by copying it over the old one. i release patches for that - [11Mar2006-18:07:40] Cratylus the patches are important because they contain special files that make corrections that just overwriting cannot - [11Mar2006-18:08:02] Cratylus but niang is right, i try to make it as painless as possible to upgrade - [11Mar2006-18:08:32] Jerin@Jerins Folly k - [11Mar2006-18:09:14] Niang@Kol it's very painless and i've been 'upgrading' for quite a while now, if i can do then most people can - [11Mar2006-18:09:36] Cratylus it's painful for maniacs like brodbane and ashon because patches often contain files like player.c etc which theyve been working on themselves - [11Mar2006-18:09:54] Cratylus but if youve only been coding areas n stuff, you'll prolly only notice goodness - [11Mar2006-18:10:09] Cratylus you should do a full backup anyway, though - [11Mar2006-18:10:33] Niang@Kol for which you also supply good insturctions - [11Mar2006-18:10:43] Niang@Kol well for the unix version anyway - [11Mar2006-18:10:53] Cratylus my best instruction is "do the backup" - [11Mar2006-18:11:07] Jerin@Jerins Folly k - [11Mar2006-18:11:13] Niang@Kol i still have to read how to do the tar bit - [11Mar2006-18:11:29] Jerin@Jerins Folly That's pretty easy :p - [11Mar2006-18:11:57] Niang@Kol unix/linux isn't really my element, - [11Mar2006-18:12:27] Niang@Kol i was primarily a Oracle pl/sql database programmer - [11Mar2006-18:12:49] Niang@Kol rollback and commit, i can cope with - [11Mar2006-18:13:44] Niang@Kol select * from User where id = 'Smith' ..... that sort of thing anything else i have to really think about - [11Mar2006-18:14:28] Ashon@Stargate Atlantis NOOOOOOOOOOOOOOOOOOOOOOOO! - [11Mar2006-18:14:38] Jerin@Jerins Folly Ya, that's an easy query :p - [11Mar2006-18:15:14] Niang@Kol it most certainly is, - [11Mar2006-18:15:22] Ashon@Stargate Atlantis cratylus, you'd best give me a diff report for each release! - [11Mar2006-18:16:10] Niang@Kol pl/sql is quite close to c/C++ and lpc so i can cope with this - [11Mar2006-18:16:26] Cratylus heh - [11Mar2006-18:17:17] Cratylus well, you dont HAVE to upgrade - [11Mar2006-18:17:37] Cratylus but youd be missing out on some nifty new stuff - [11Mar2006-18:21:38] Niang@Kol i'm soory i started that search now :( .. i was hoping to find a nice little formual that, baised on your skills, calulated a max class to the weapon you can wield .... - [11Mar2006-18:22:16] Niang@Kol unfourtunatly what i've found is if your a newbie and the class is >30 you can't wield it :( - [11Mar2006-18:25:07] Cratylus you stop being a newbie at level 4 or so - [11Mar2006-18:25:31] Cratylus basically if you finish the newbie mansion quest, you can advance past newbieness - [11Mar2006-18:25:51] Cratylus but if you dislike the newbie concept, just disable it in /secure/include/config.h - [11Mar2006-18:27:02] Niang@Kol no... i wanted to link the max weapons class to weapon skill, the higher youre skill the better the weapon you can use - [11Mar2006-18:27:14] Cratylus oh - [11Mar2006-18:27:18] Cratylus why cant you? - [11Mar2006-18:28:10] Cratylus you'd have to code it in LIB_WEAPON - [11Mar2006-18:28:18] Niang@Kol i can, i was just looking to see if there wassomething like that already. I didn't want to reinvent the wheel - [11Mar2006-18:28:26] Cratylus nods. - [11Mar2006-18:30:49] Niang@Kol well it's rapiadly appraoching midnight (although i've just had this 'The sun appears just over the horizon.' appear :) ) and i'm on dinner duty tommorow, so i got to get up early :( - [11Mar2006-18:30:59] Niang@Kol see ya all around - [11Mar2006-18:31:25] Niang@Kol waves - [11Mar2006-18:31:41] Jerin@Jerins Folly Later - [11Mar2006-18:31:51] Avatar@OuterSpace do I recognize a bit of elephant style in that idea Miang? - [11Mar2006-18:32:07] Niang@Kol nods solemnly. - [11Mar2006-18:32:33] Avatar@OuterSpace is an elemud player gto ;) - [11Mar2006-18:32:33] Niang@Kol i am an elephant mudder - [11Mar2006-18:32:58] Niang@Kol really, who if i maybe so bold? - [11Mar2006-18:34:04] Avatar@OuterSpace dolenlhaw - [11Mar2006-18:34:42] Niang@Kol mmmm don't reconise the name, what class are you? - [11Mar2006-18:34:54] Avatar@OuterSpace ranger. - [11Mar2006-18:35:00] Niang@Kol i'v played many characters over teh years, - [11Mar2006-18:35:28] Niang@Kol ahhh, i'm playing knife the rogue at the moment - [11Mar2006-18:35:44] Niang@Kol although i'm also known as Nosmo the monk - [11Mar2006-18:35:46] Avatar@OuterSpace I only play ele sincd last years or so. (t years in mud time) - [11Mar2006-18:36:39] Niang@Kol i have played rangers, i helped play test them when they first came online, changed alot since those days - [11Mar2006-18:37:27] Niang@Kol ho well i got to go to bed now maybe i'll see you on ele someday. Be carefule outthere - [11Mar2006-18:38:17] Avatar@OuterSpace waves. - [11Mar2006-20:15:00] Jerin@Jerins Folly intermud must be down again - [11Mar2006-20:22:04] Ashon@Stargate Atlantis you can always go to the arch room and check the printout - [11Mar2006-20:23:55] Jerin@Jerins Folly ? - [11Mar2006-20:24:55] Cratylus that can be deceptive - [11Mar2006-20:24:57] Ashon@Stargate Atlantis the ds channel uses the intermud protocols, so if intermud is down, ds wouldn't work either, - [11Mar2006-20:25:11] Cratylus the next release has a ping feature that lets you test intermud connectivity - [11Mar2006-20:25:58] Ashon@Stargate Atlantis woot! - [11Mar2006-20:27:14] Ashon@Stargate Atlantis just a quick lib question for you Cratylus. - [11Mar2006-20:28:22] Ashon@Stargate Atlantis eventFunctions, ie eventBlessing in /lib/std/item.c are handled just like any other function right? or is there actually an event handler? - [11Mar2006-20:33:08] Cratylus normal - [11Mar2006-20:33:12] Cratylus no special handler - [11Mar2006-20:33:18] Cratylus the format is just a convention - [11Mar2006-20:33:48] Cratylus makes code a bit more understandable - [11Mar2006-20:38:35] Ashon@Stargate Atlantis sweet. excellent. - [11Mar2006-20:38:51] Ashon@Stargate Atlantis pets his cat in an evil master type way. --- 0 ---- diff -c -r --new-file ds2.0r18/lib/log/domain_stats ds2.0r20b/lib/log/domain_stats *** ds2.0r18/lib/log/domain_stats Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/log/domain_stats Wed Apr 5 23:20:05 2006 *************** *** 0 **** --- 1,5 ---- + town 0 0 + default 0 0 + Ylsrim 0 0 + BACKBONE 0 0 + NONAME 0 0 diff -c -r --new-file ds2.0r18/lib/obj/stargate.c ds2.0r20b/lib/obj/stargate.c *** ds2.0r18/lib/obj/stargate.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/obj/stargate.c Thu Apr 13 21:14:11 2006 *************** *** 0 **** --- 1,83 ---- + #include + #include + #include "/lib/include/stargate.h" + + /** + * based on portal.c by Brodbane - March 2006 + * + * $Id: stargate.c,v 1.1 2006/04/05 05:48:39 jam Exp $ + * + * The desired functionality is much like a "star gate": users dialed + * letters or full words that lined up with destinations. A portal opens to + * that destination briefly. To define destinations you must setup a + * constant below then add it to the switch statement in the cmdDial + * function. This object is crude and basic, but gets the job done. + * + * 2006-03-22, jonez + * - original version of this file is from Daelas@Moraelinost + * 2006-03-23, jonez + * - altered so code uses existing verbs (touch, enter) where possible. last add_action is for dial command. + * - added single mapping called "database" and made the "dial" command use it. + * - dial command no longer uses switch/case, making adding a new destination simpler + * - made use of SetPreventGet() / SetPreventPut() + * - made use of new stargate daemon + * - made use of LIB_STARGATE + * - made use of STARGATE_D + * + * IDEAS: + * - create a daemon that holds the stargate network [DONE] + * - allow for stargate failure + * - add dhd object + * - change the code so that it uses a single mapping of names and + * destinations, perhaps in a database file. currently an update to the + * object requires an update for all the objects. [DONE] + * - dhd skill (thanks plato) + * - delay when dialing gate. destination dhd lights up? + * - player should not be able to dial earth if earth is already connected elsewhere (need daemon) [DONE] + * - make use of existing verbs (enter, touch) instead of doing our own thing. [DONE] + * - daemon should contain a class that maps the various gates to each other. see lib/include/door.h [DONE] + * - shout "off world activation" into the gateroom when the gate engages. + * - track status as "incoming" or "outgoing".. you can only "enter" an outgoing gate (rhk) [DONE] + * - if room is empty, shut down the gate (rhk) + * - change callout time when someone goes through the gate (rhk) + */ + + /* + Cratylus@Dead Souls but let me give you a quick outline + Cratylus@Dead Souls i type dial thing + Cratylus@Dead Souls the thing inherits LIB_DIAL + Cratylus@Dead Souls which is in /lib/events/dial.c + Cratylus@Dead Souls and all that contains is like direct_dial_ob() return 1; this kind of thing + Cratylus@Dead Souls take a look at LIB_TURN + Cratylus@Dead Souls what LIB_DIAL does is provide the object with hooks, so it *can* be dialed + Cratylus@Dead Souls so, when i type dial thing, the thing goes, yeah i + can be dialed, and then the parser enters the can_dial and do_dial funcs + in the verb + Cratylus@Dead Souls tellya what. i'd like to work with you on this one. i think it's less straightforward than it + seems, and i need to test some ideas before i can say "do it this way" + + */ + inherit LIB_STARGATE; + + int readScreen(); + + void create() + { + ::create(); + setOrigin("default", "/obj/room"); + // SetRead(([ ({ "screen" }) : (: readScreen :) ]) ); + // SetItems(([ ({ "screen" }) : "a computer screen which shows the status of the gate network" ]) ); + } + + void init() + { + ::init(); + } + + int readScreen() + { + write("stargate network status\n"); + write("-----------------------\n"); + write("\n"); + + } diff -c -r --new-file ds2.0r18/lib/realms/template/area/npc/fighter.c ds2.0r20b/lib/realms/template/area/npc/fighter.c *** ds2.0r18/lib/realms/template/area/npc/fighter.c Mon Nov 7 13:31:47 2005 --- ds2.0r20b/lib/realms/template/area/npc/fighter.c Wed Apr 5 19:50:40 2006 *************** *** 2,7 **** --- 2,8 ---- #include "../../customdefs.h" inherit LIB_NPC; + static void create(){ npc::create(); SetKeyName("fighter"); *************** *** 19,21 **** --- 20,25 ---- MY_WEAP "/sword.c" : "wield sword", ])); } + void init(){ + ::init(); + } \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/realms/template/area/obj/key.c ds2.0r20b/lib/realms/template/area/obj/key.c *** ds2.0r18/lib/realms/template/area/obj/key.c Mon Nov 7 13:31:47 2005 --- ds2.0r20b/lib/realms/template/area/obj/key.c Wed Apr 5 19:50:46 2006 *************** *** 2,7 **** --- 2,8 ---- inherit LIB_ITEM; + static void create() { item::create(); SetKeyName("key"); *************** *** 13,16 **** SetBaseCost(1); SetDisableChance(100); } ! --- 14,19 ---- SetBaseCost(1); SetDisableChance(100); } ! void init(){ ! ::init(); ! } \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/realms/template/area/obj/table.c ds2.0r20b/lib/realms/template/area/obj/table.c *** ds2.0r18/lib/realms/template/area/obj/table.c Sun Dec 11 21:16:17 2005 --- ds2.0r20b/lib/realms/template/area/obj/table.c Wed Apr 5 19:50:53 2006 *************** *** 3,8 **** --- 3,9 ---- inherit LIB_TABLE; + void create() { ::create(); SetKeyName("sample table"); *************** *** 16,18 **** --- 17,22 ---- MY_OBJ "/key" : 1, ]) ); } + void init(){ + ::init(); + } \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/secure/cfg/preload.cfg ds2.0r20b/lib/secure/cfg/preload.cfg *** ds2.0r18/lib/secure/cfg/preload.cfg Fri Mar 24 14:37:42 2006 --- ds2.0r20b/lib/secure/cfg/preload.cfg Wed Apr 12 23:49:14 2006 *************** *** 9,14 **** --- 9,15 ---- #/secure/daemon/remote #/secure/daemon/inet /secure/daemon/log + /secure/daemon/snoop /secure/room/arch /secure/room/control /secure/daemon/update diff -c -r --new-file ds2.0r18/lib/secure/cfg/races/bugbear ds2.0r20b/lib/secure/cfg/races/bugbear *** ds2.0r18/lib/secure/cfg/races/bugbear Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cfg/races/bugbear Wed Apr 5 19:44:19 2006 *************** *** 0 **** --- 1,26 ---- + RACE bugbear + PLAYER_RACE 1 + SENSITIVITY 20:80 + LANGUAGE Bugbearish + RESISTANCE SHOCK:high + RESISTANCE COLD:low + STATS charisma:21:3 + STATS durability:43:1 + STATS intelligence:21:3 + STATS luck:10:4 + STATS agility:1:5 + STATS wisdom:31:2 + STATS speed:1:5 + STATS strength:43:1 + STATS coordination:1:5 + LIMB torso:0:1:A_ARMOR,A_BODY_ARMOR,A_CLOAK,A_VEST,A_SHIRT,A_AMULET,A_BELT + LIMB neck:torso:1:A_COLLAR,A_AMULET + LIMB head:neck:1:A_HELMET,A_VISOR,A_AMULET + LIMB left rear leg:torso:3:A_LONG_BOOT,A_BODY_ARMOR,A_PANTS,A_LONG_SOCK + LIMB right rear leg:torso:3:A_LONG_BOOT,A_BODY_ARMOR,A_PANTS,A_LONG_SOCK + LIMB right foreleg:torso:3:A_LONG_BOOT,A_BODY_ARMOR,A_PANTS,A_LONG_SOCK + LIMB left foreleg:torso:3:A_LONG_BOOT,A_BODY_ARMOR,A_PANTS,A_LONG_SOCK + LIMB left forepaw:left foreleg:4:: + LIMB right forepaw:right foreleg:4:: + LIMB left rear paw:left rear leg:4:: + LIMB right rear paw:right rear leg:4:: diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/banish.c ds2.0r20b/lib/secure/cmds/admins/banish.c *** ds2.0r18/lib/secure/cmds/admins/banish.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/admins/banish.c Sun Apr 9 23:40:55 2006 *************** *** 0 **** --- 1,36 ---- + // /bin/dev/_banish.c + // from the Dead Souls Mudlib + // prevents a name being used by a new player + // created by Descartes of Borg ??? + + #include + #include + + inherit LIB_DAEMON; + + int cmd(string str) { + if(!str || str == ""){ + write("Syntax: banish "); + return 1; + } + if(!user_exists(str = lower_case(str))) { + write(capitalize(str)+" is now banished.\n"); + catch(call_other(BANISH_D, "banish_name", str)); + } + else { + write("A player by that name already exists.\n"); + this_player()->eventPrint((string)FINGER_D->GetFinger(str)); + } + return 1; + } + + void help() { + write("Syntax: \n\n" + "Protects a name from being used by a new player.\n" + "For example, if you have created a monster named Cassandra, in order\n" + "to avoid problems with player complaining \"I typed 'kill\n" + "cassandra' meaning to kill the evil enchantress, but Cassandra\n" + "walked in and I accidentally killed her.\" It is also to be\n" + "used to keep people from using offensive names.\n" + ); + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/decre.c ds2.0r20b/lib/secure/cmds/admins/decre.c *** ds2.0r18/lib/secure/cmds/admins/decre.c Sat Mar 11 11:16:43 2006 --- ds2.0r20b/lib/secure/cmds/admins/decre.c Thu Apr 13 21:04:27 2006 *************** *** 6,11 **** --- 6,12 ---- #include #include + #include inherit LIB_DAEMON; *************** *** 23,35 **** --- 24,47 ---- possessive_noun(mud_name()) + " reality."; if( !strsrch(file = save_file(nom), DIR_PLAYERS) ) return "You cannot make "+capitalize(args)+" a player."; + + if(!ob = find_player(nom)){ + PLAYERS_D->RemovePendingEncre(lower_case(nom)); + PLAYERS_D->AddPendingDecre(lower_case(nom)); + write(capitalize(nom)+" will be demoted on their next login."); + return 1; + } + if( file_size(DIR_PLAYERS+"/"+nom[0..0]) != -2) mkdir(DIR_PLAYERS+"/"+nom[0..0]); if(rename(file+__SAVE_EXTENSION__, DIR_PLAYERS+"/"+nom[0..0]+"/"+nom+__SAVE_EXTENSION__)) return "You failed due to lack of write access to "+DIR_PLAYERS+"."; + PLAYERS_D->eventDecre(lower_case(nom)); + if( ob = find_player(nom) ) { PlayerName = nom; inv = deep_inventory(ob); + ob->eventMove(ROOM_FURNACE); if(sizeof(inv)) inv->eventMove(ROOM_FURNACE); catch(player_ob = (object)master()->player_object(nom)); PlayerName = 0; *************** *** 51,56 **** --- 63,69 ---- this_player()); if( file_size(file+__SAVE_EXTENSION__) > -1 ) rm(file+__SAVE_EXTENSION__); } + player_ob->eventMove(ROOM_START); return 1; } diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/domainadmin.c ds2.0r20b/lib/secure/cmds/admins/domainadmin.c *** ds2.0r18/lib/secure/cmds/admins/domainadmin.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/admins/domainadmin.c Sun Apr 9 23:54:48 2006 *************** *** 0 **** --- 1,127 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + string rep, flag, domain, person; + string write_perms = read_file("/secure/cfg/write.cfg"); + string *tmp_array = explode(write_perms, "\n"); + string *admin_array = ({}); + mapping DomainsMap = ([]); + + + if(!archp(this_player()) || this_player()->GetForced()){ + return "No."; + } + + //tc("tp_array: "+identify(tmp_array),"white"); + + if(!args || args == ""){ + write(this_object()->GetHelp()); + return 1; + } + + if(sscanf(args,"%s %s %s", flag, domain, person) != 3){ + write(this_object()->GetHelp()); + return 1; + } + + person = lower_case(person); + + if(!user_exists(person)){ + write("Invalid person."); + return 1; + } + + if(!directory_exists("/domains/"+domain)){ + write("Invalid domain."); + return 1; + } + + write_perms = replace_string(write_perms, "\n",";\n"); + + foreach(string line in tmp_array){ + string where, admins; + if(sscanf(line,"(/domains/%s/) %s", where, admins)){ + DomainsMap[where] = admins; + if(sizeof(DomainsMap[domain])) admin_array = explode(DomainsMap[domain],":"); + } + } + + if(flag == "-a"){ + + if(member_array(person, admin_array) != -1){ + write("That person already administers that domain."); + return 1; + } + + else admin_array += ({ person }); + + rep = "(/domains/"+domain+"/) "+implode(admin_array, ":"); + + //tc("rep: "+rep,"blue"); + + if(grepp(write_perms, "(/domains/"+domain+"/)")){ + write_perms = replace_matching_line(write_perms, "/domains/"+domain, rep); + write_perms = replace_string(write_perms, ";\n","\n"); + //tc("write_perms: "+write_perms, "yellow"); + } + else{ + write_perms = replace_string(write_perms, ";\n","\n"); + write_perms = newline_trim(write_perms); + write_perms += "\n(/domains/"+domain+"/) "+person+"\n"; + //tc("write_perms: "+write_perms); + } + } + + else if(flag == "-d"){ + if(member_array(person, admin_array) == -1){ + write("That person does not administer that domain."); + return 1; + } + + else admin_array -= ({ person }); + //tc("admin_array: "+identify(admin_array),"cyan"); + //tc("domain: "+domain,"cyan"); + //tc("erite_terms: "+write_perms,"cyan"); + + if(!sizeof(admin_array)){ + write_perms = remove_matching_line(write_perms, "(/domains/"+domain+"/)",1); + write_perms = replace_string(write_perms, ";\n","\n"); + //tc("write_perms: "+write_perms); + } + else { + rep = "(/domains/"+domain+"/) "+implode(admin_array, ":"); + //tc("rep: "+rep,"blue"); + write_perms = replace_matching_line(write_perms, "/domains/"+domain, rep); + write_perms = replace_string(write_perms, ";\n","\n"); + //tc("write_perms: "+write_perms); + } + } + + else { + write("Invalid flag."); + return 1; + } + + //tc("write_perms: "+write_perms,"green"); + write_file("/secure/cfg/write.cfg", write_perms, 1); + update("/secure/daemon/master"); + return 1; + } + + string GetHelp(string args) { + return ("Syntax: domainadmin [-a | -d] \n\n" + "This command manages the write permissions to a specified " + "domain. For example, to give a creator named Snuffy write " + "privileges to /domains/SnuffLand, you would type: " + "\ndomainadmin -a SnuffLand snuffy\n" + "To revoke those privileges:\n" + "\domainadmin -d SnuffLand snuffy\n" + "This permits the creator to use QCS within the domain's " + "directories. " + "Write privileges are listed in /secure/cfg/write.cfg" + "\n\n" + "See also: admintool"); + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/encre.c ds2.0r20b/lib/secure/cmds/admins/encre.c *** ds2.0r18/lib/secure/cmds/admins/encre.c Wed Feb 22 15:33:33 2006 --- ds2.0r20b/lib/secure/cmds/admins/encre.c Thu Apr 13 21:04:27 2006 *************** *** 4,9 **** --- 4,10 ---- */ #include + #include #include inherit LIB_DAEMON; *************** *** 21,29 **** --- 22,43 ---- possessive_noun(mud_name()) + " reality."; if( !strsrch(file = save_file(nom), DIR_CRES) ) return "You cannot make "+capitalize(args)+" a creator."; + + if(!ob=find_player(nom)){ + if(member_array(nom, PLAYERS_D->GetPendingEncres()) != -1){ + write("That person is already pending creatorship."); + return 1; + } + PLAYERS_D->RemovePendingDecre(lower_case(nom)); + PLAYERS_D->AddPendingEncre(lower_case(nom)); + write(capitalize(nom)+" will be a creator next time they log in."); + return 1; + } + if( file_size(DIR_CRES+"/"+nom[0..0]) != -2) mkdir(DIR_CRES+"/"+nom[0..0]); if(rename(file+__SAVE_EXTENSION__, DIR_CRES+"/"+nom[0..0]+"/"+nom+__SAVE_EXTENSION__)) return "You failed due to lack of write access to "+DIR_CRES+"."; + PLAYERS_D->eventEncre(lower_case(nom)); if( ob = find_player(nom) ) { ob->SetProperty("brand_spanking_new",0); PlayerName = nom; *************** *** 62,67 **** --- 76,82 ---- book = new("/domains/default/obj/manual"); if(book && !present("manual",cre_ob)) book->eventMove(cre_ob); else if(book) book->eventMove(ROOM_FURNACE); + cre_ob->save_player((string)cre_ob->GetKeyName()); //message("system", "You will now be logged off.", cre_ob); //message("system", "Please log back in to use your new powers.", cre_ob); //cre_ob->eventForce("quit"); diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/resetpasswd.c ds2.0r20b/lib/secure/cmds/admins/resetpasswd.c *** ds2.0r18/lib/secure/cmds/admins/resetpasswd.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/admins/resetpasswd.c Thu Apr 6 22:54:01 2006 *************** *** 0 **** --- 1,96 ---- + #include + #include + #include + #include + + inherit LIB_DAEMON; + + static void NewPass(string pass); + static void ConfirmPass(string str, string newpass); + + string savefile; + + mixed cmd(string args) { + + if(!archp(this_player())) { + write("No."); + return 1; + } + + args = lower_case(args); + + if(args == "me" || args == this_player()->GetKeyName()){ + write("To reset your own password, use the command: passwd"); + return 1; + } + + if( (int)previous_object()->GetForced() ) + return "You cannot be forced to change a password."; + if( previous_object() != this_player() ) + return "You're being sploited to reset someone's password."; + + if(!user_exists(args)){ + write("That person does not exist on this mud."); + return 1; + } + + if(find_player(args)){ + write("That player is currently logged on. Please use " + "the passwd command to reset their password."); + return 1; + } + + savefile = DIR_CRES + "/" + args[0..0] + "/" + args + ".o"; + if(!file_exists(savefile)) { + write("Couldn't find "+savefile+". Looking for alternate."); + savefile = DIR_PLAYERS + "/" + args[0..0] + "/"+ args + ".o"; + } + + if(!file_exists(savefile)){ + write("Save file could not be found. Exiting."); + return 1; + } + + write("Found "+savefile+"."); + + previous_object()->eventPrint("New password: ", MSG_PROMPT); + input_to( (: NewPass :), I_NOECHO | I_NOESC, previous_object() || args); + return 1; + } + + static void NewPass(string pass) { + if( !pass || strlen(pass) < 5 ) { + this_player()->eventPrint("Password must be at least 5 " + "characters, password change failed.", + MSG_SYSTEM); + return; + } + this_player()->eventPrint("\nConfirm: ", MSG_PROMPT); + input_to( (: ConfirmPass :), I_NOECHO | I_NOESC, pass); + } + + static void ConfirmPass(string str, string newpass) { + string *lines; + if( str != newpass ) { + this_player()->eventPrint("Passwords do not match.", MSG_SYSTEM); + return; + } + + lines = explode(unguarded((: read_file, savefile :)),"\n"); + unguarded((: rm, savefile :)); + foreach(string line in lines) { + string val; + + if( sscanf(line, "Password %s", val) ) + line = "Password \"" + crypt(newpass, 0) + "\""; + unguarded((: write_file, savefile, line + "\n" :)); + } + this_player()->eventPrint("\nPassword changed.", MSG_SYSTEM); + } + + void help() { + message("help", "Syntax: resetpasswd \n\n" + "Allows you to change someone's password if they " + "are not logged on.\n\n" + "See also: passwd", this_player()); + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/router.c ds2.0r20b/lib/secure/cmds/admins/router.c *** ds2.0r18/lib/secure/cmds/admins/router.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/admins/router.c Wed Apr 5 19:46:45 2006 *************** *** 0 **** --- 1,44 ---- + #include + #include + + inherit LIB_DAEMON; + + mixed cmd(string args) { + string subcmd, arg1, arg2; + + if(find_object(ROUTER_D)) + write("I3 router daemon is loaded."); + else { + write("I3 router daemon is not loaded."); + return 1; + } + + if(!args || args == ""){ + return 1; + } + + if(args == "show"){ + write("Router config: \n"+ROUTER_D->get_info()); + return 1; + } + + if(sscanf(args,"%s %s",subcmd, arg1) != 2){ + write("Invalid router subcommand."); + return 1; + } + + if(arg1 == "mudlist"){ + mapping mudlist = ROUTER_D->query_mudinfo(); + write("Mudlist: \n"+identify(mudlist)); + } + + + write("Router command completed."); + return 1; + } + + string GetHelp(string args) { + return ("Syntax: \n\n" + "\n\n" + ""); + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/switchrouter.c ds2.0r20b/lib/secure/cmds/admins/switchrouter.c *** ds2.0r18/lib/secure/cmds/admins/switchrouter.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/admins/switchrouter.c Sun Apr 9 23:54:57 2006 *************** *** 0 **** --- 1,70 ---- + #include + #include + + inherit LIB_DAEMON; + + string file; + + mixed cmd(string args) { + string ip, name; + int port, octet1, octet2, octet3, octet4; + + if(!archp(this_player())) return "No."; + + find_object(INTERMUD_D)->eventDestruct(); + rm("/save/intermud.o"); + + if(!args || args == ""){ + write("No argument provided. Reloading intermud daemon."); + if( load_object(INTERMUD_D) ) write("Intermud daemon reloaded."); + else write("Failed to reload intermud daemon."); + return 1; + } + + if(sscanf(args,"%s %s %d", name, ip, port) != 3 || port > 65534 || + sscanf(ip,"%d.%d.%d.%d", octet1, octet2, octet3, octet4) != 4){ + write("Invalid router reference. \nTry: switchrouter "); + write("For example: switchrouter yatmim 149.152.218.102 23"); + if( load_object(INTERMUD_D) ) write("Intermud daemon reloaded."); + else write("Failed to reload intermud daemon."); + return 1; + } + + file = read_file(INTERMUD_D+".c"); + //write_file("/tmp/1.txt",file,1); + + file = replace_matching_line(file, "//Nameservers", ""); + + //write_file("/tmp/2.txt",file,1); + if(first(name,1) != "*") name = "*"+name; + + file = replace_matching_line(file, "Nameservers = ({", + " Nameservers = ({ ({ \""+name+"\", \""+ip+" "+port+"\" }) });", 1); + + //write_file("/tmp/3.txt",file,1); + + unguarded( (: write_file(INTERMUD_D+".c",file,1) :) ); + + if( load_object(INTERMUD_D) ) write("Intermud daemon reloaded."); + else write("Failed to reload intermud daemon."); + + write("Done."); + return 1; + } + + + string GetHelp(string args) { + return ("Syntax: switchrouter \n\n" + "Stops the intermud daemon, changes the default intermud " + "router to the ip and port you specify, wipes the previous " + "router data, and reloads INTERMUD_D. Without arguments, " + "this command will clear your intermud cache and reload " + "the daemon. Known routers are:\n" + "*gjs 198.144.203.194 9000 (The \"official\" intermud.org router)\n" + "*yatmim 149.152.218.102 23 (The \"official\" Dead Souls router)\n" + "The official current Dead Souls router's IP will always be " + "available at:\n" + "http://dead-souls.net/router.html" + "\n\n" + "See also: router, mudlist"); + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/admins/unmonitor.c ds2.0r20b/lib/secure/cmds/admins/unmonitor.c *** ds2.0r18/lib/secure/cmds/admins/unmonitor.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/admins/unmonitor.c Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,34 ---- + #include + #include + + inherit LIB_DAEMON; + + int cmd(string str) { + object ob; + + if(!archp(this_player())) { + write("Only an arch may halt a monitoring process."); + return 0; + } + if( !str || str == "" ) { + write("Unmonitor whom?\n"); + } + else if(!user_exists(str)) + write(str+": no such player.\n"); + else{ + SNOOP_D->RemoveMonitor(this_player()->GetKeyName(), str); + write("The snoop daemon has received your request."); + } + return 1; + } + + int help() + { + write( @EndText + Syntax: unmonitor + Effect: Stops the logging of a user's input and output. + See also: monitor, snoop, unsnoop + EndText + ); + return 1; + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/banish.c ds2.0r20b/lib/secure/cmds/creators/banish.c *** ds2.0r18/lib/secure/cmds/creators/banish.c Mon Nov 7 13:32:16 2005 --- ds2.0r20b/lib/secure/cmds/creators/banish.c Wed Dec 31 19:00:00 1969 *************** *** 1,34 **** - // /bin/dev/_banish.c - // from the Dead Souls Mudlib - // prevents a name being used by a new player - // created by Descartes of Borg ??? - - #include - #include - - inherit LIB_DAEMON; - - int cmd(string str) { - if(!user_exists(str = lower_case(str))) { - write(capitalize(str)+" is now banished.\n"); - //seteuid(UID_BANISH); - catch(call_other(BANISH_D, "banish_name", str)); - //seteuid(getuid()); - } - else { - write("A player by that name already exists.\n"); - this_player()->eventPrint((string)FINGER_D->GetFinger(str)); - } - return 1; - } - - void help() { - write("Syntax: \n\n" - "Protects a name from being used by a new player.\n" - "For example, if you have created a monster named Cassandra, in order\n" - "to avoid problems with player complaining \"I typed 'kill\n" - "cassandra' meaning to kill the evil enchantress, but Cassandra\n" - "walked in and I accidentally killed her.\" It is also to be\n" - "used to keep people from using offensive names.\n" - ); - } --- 0 ---- diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/cp.c ds2.0r20b/lib/secure/cmds/creators/cp.c *** ds2.0r18/lib/secure/cmds/creators/cp.c Mon Nov 7 13:32:16 2005 --- ds2.0r20b/lib/secure/cmds/creators/cp.c Wed Apr 5 19:33:18 2006 *************** *** 6,11 **** --- 6,12 ---- // Help added by Brian (1/28/92) // Single arg cp added by Scythe@Dead Souls (1/25/93) // Bug in single arg cp fixed by Pallando (5/26/93) + // Added wild card support by Brodbane@Eve (4/3/06) */ #include *************** *** 13,24 **** int help(); ! int ! cmd(string str) { string line; string file1; string file2; int localdest; if(this_player()->GetForced()) { write("Someone has tried forcing you to cp " + str); return 1; --- 14,29 ---- int help(); ! string rmSlash(string str) { return replace_string(str,"//","/"); } ! ! int cmd(string str) { string line; string file1; string file2; int localdest; + string * files; + int ow; + if(this_player()->GetForced()) { write("Someone has tried forcing you to cp " + str); return 1; *************** *** 33,38 **** --- 38,45 ---- return 1; } } + + if( str && sscanf( str, "-o %s", str)) ow = 1; /* check for last parameter == "." */ if (file2 == ".") { localdest = 1; /* It's a local destination */ *************** *** 43,125 **** file1 = absolute_path(this_player()->query_cwd(), file1); file2 = absolute_path(this_player()->query_cwd(), file2); ! /* This used to give and lstat error, fixed 930208 by Plura */ ! if(file_size(file1) < 1) ! { ! notify_fail("cp: couldn't find "+file1+"\n"); ! return 0; } ! /* Check if the destination is a directory */ ! if (!localdest) { ! if (file_size(file2) == -2) localdest = 1; ! } ! if (localdest) { ! /* Extract the root file name from the source and use ! it for the destination. file2 should be just a ! directory path at this point so that the rootname can ! be appended. */ ! string newroot; ! string path; ! string rootname; ! rootname = file1; ! while(sscanf(rootname, "%s/%s", path, newroot) == 2) { ! rootname = newroot; } - file2 = file2 + "/" + rootname; - } - if(file_size(file1) == -2) /*Plura 930120*/ - { - notify_fail("cp: "+file1+" is a directory.\n"); - return 0; - } - #if 0 - if(file_size(file2) > 0) /* Plura 930120 */ - { - notify_fail("cp: "+file2+" already exists.\n"); - return 0; } - #endif - if (file1 == file2) { - notify_fail("cp: can not copy a file on top of itself!\n"); - return 0; - } - if(!master()->valid_read(file1, this_player(), "cp")) - { - notify_fail(file1 + ": Permission denied.\n"); - return 0; - } - if(!master()->valid_write(file2, this_player(), "cp")) - { - notify_fail(file2 + ": Permission denied.\n"); - return 0; - } - line = read_file(file1); - if (line == 0) { - /* Uhoh. Can't read source file. */ - notify_fail("cp: file not found: " + file1 + "\n"); - return 0; - } - if (file_size(file2) == -2) - { - notify_fail("Tried to overwrite the directory "+ file2 + "\n"); - return 0; - } - rm(file2); - write_file(file2, line); - message("system", "Copied: " + file1 + " to " + file2, this_player()); return 1; } int help() { message("help", "Command: cp\nSyntax: cp [pathname]\n" "This command makes a copy of the file using the new name " "and location passed. If a new pathname is not specified " ! "then the copy is put into the present working directory.", this_player()); return 1; } /* EOF */ --- 50,108 ---- file1 = absolute_path(this_player()->query_cwd(), file1); file2 = absolute_path(this_player()->query_cwd(), file2); ! /* Added by Brodbane to handle wild card options, 3/3/06 */ ! if( !sizeof( files = wild_card( file1 ) ) ) ! files = ({ file1 }); ! if( sizeof(files) > 1 ) ! { ! switch( file_size(file2) ) ! { ! case -1: ! this_player()->eventForce("mkdir "+file2); ! break; ! case -2: ! break; ! default: ! return(write("Cannot copy wild card to a single file."),1); ! } } ! foreach( string file in files ) { ! string dest = (file_size(file2)==-2 ? rmSlash(file2+"/"+ ! explode( file, "/")[<1]) : file2 ); ! ! ! if( file_size( file ) == -2 ) { localdest = 1; ! if( sizeof(files) > 1 ) ! continue; ! else write( "cp: "+file+" is a directory." ); ! } ! else if( file_size(file) < 1 ) { write( "cp: couldn't find "+file ); } ! else if( file == dest ) write( "cp: You cant copy a file on to itself!" ); ! else if( file_size(dest) > 0 && !ow && !sscanf(dest, "%*s.save" )) write( "cp: "+dest+" already exists." ); ! else if( !master()->valid_read( file, this_player(), "cp" ) ) write( file+": Permission denied." ); ! else if( !master()->valid_write( dest, this_player(), "cp" ) ) write( dest+": Permission denied." ); ! else { ! write_file( dest, read_file(file), 1 ); ! write( "Copied: "+file+" to "+dest ); } } return 1; } + int help() { message("help", "Command: cp\nSyntax: cp [pathname]\n" "This command makes a copy of the file using the new name " "and location passed. If a new pathname is not specified " ! "then the copy is put into the present working directory." ! "Optionally, wild cards can be used by employing the * operator.", this_player()); return 1; } /* EOF */ + + diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/dsversion.c ds2.0r20b/lib/secure/cmds/creators/dsversion.c *** ds2.0r18/lib/secure/cmds/creators/dsversion.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/creators/dsversion.c Wed Apr 5 19:44:19 2006 *************** *** 0 **** --- 1,277 ---- + /* /secure/cmds/creators/dsversion.c + * Created by Brodbane of Eve + * Date Created: 4/1/06 + */ + + #include + #include + #include + #include + + inherit LIB_DAEMON; + + #define HTTP_ADDRESS "149.152.218.102" + #define HTTP_HOST "www.dead-souls.net" + #define HTTP_PORT 80 + #define HTTP_PATH "/RELEASE_NOTES" + #define NOTES_DELIM "----" + + #define SAVE_FILE "/doc/RELEASE_NOTES_HTTP" + + + #define SOCK_FIND 0 + #define SOCK_CONNECTING 1 + #define SOCK_CONNECTED 2 + #define SOCK_DISCONNECTED 3 + #define SOC_ERROR 4 + + //#define _DEBUG + + int socket; + int status; + object player; + object person; + + string results; + + void sendHTTPGet(); + + int http_file_found; + + private string args_list; + + void ProcessHTTPResult() + { + int i = 0; + string * parts; + string * arg_array; + string * temp; + + //player->eventPrint(results); + parts = explode( results, NOTES_DELIM ); + //player->eventPrint( "Size of elements "+sizeof(parts) ); + + //found = regexp( parts, args_list+" +" ); + //player->eventPrint( sizeof( found ) ); + //if( !args_list ){ + //player->eventPrint( parts[0] ); + temp = explode( parts[0], "---" ); + player->eventPrint( "Current Version of "+mud_name()+": " + mudlib_version() ); + player->eventPrint( "Latest Version of Dead Souls: %^RED%^"+trim(temp[0])+ "%^RESET%^" ); + write_file( SAVE_FILE, results, 1 ); + //player->eventPrint( "\nFor complete release notes refer to "+SAVE_FILE ); + //return; + //} + + arg_array = explode( args_list, " " ); + foreach( string str in arg_array ){ + temp = regexp( parts, args_list+" +" ); + if( sizeof( temp ) > 3 ){ + player->eventPrint( "Too many results, truncating..." ); + player->eventPrint( temp[0]+temp[1]+temp[2] ); + } + else{ + foreach( string s in temp ) + { + player->eventPrint( "---- "+s ); + i++; + } + } + } + + + write_file( SAVE_FILE, results, 1 ); + player->eventPrint( "For complete release notes refer to "+SAVE_FILE ); + } + + void read_callback( int fd, mixed message ) + { + if( !http_file_found ){ + if( message[9..11] != "200" ){ + player->eventPrint( "Error, unable to locate page requested." ); + + http_file_found = 3; + } + else + { + //player->eventPrint( message ); Uncomment this to see http header debug + http_file_found = 1; + } + } + else if( http_file_found == 1 ){ + //player->eventPrint( message ); + results += message; + } + else{ + + } + //player->eventPrint( message ); + //results += message; + //player->eventPrint( message ); + //player->eventPrint( "------------------" ); + } + + void write_callback( int fd ) + { + #ifdef _DEBUG + player->eventPrint("Connected!"); + #endif + status = SOCK_CONNECTED; + http_file_found = 0; + sendHTTPGet(); + } + + void close_callback( int fd ) + { + if( status == SOCK_CONNECTED ) + { + // Process HTML here + #ifdef _DEBUG + player->eventPrint("Connection closed by host."); + #endif + ProcessHTTPResult(); + } + if( status == SOCK_CONNECTING ) + { + player->eventPrint("Connection attempt failed."); + } + socket_close( fd ) ; + status = SOCK_DISCONNECTED; + } + + void sendHTTPGet() + { + string str ="GET "+HTTP_PATH+" HTTP/1.0\r\n"+ + "Host: "+HTTP_HOST+"\r\n" + + "User-Agent: "+ player->GetName() + "@" + mud_name() + " " + + mudlib()+ "/" + mudlib_version() +" ("+ query_os_type()+";) "+ + version() + "\r\n\r\n"; + int result = 0; + results = ""; + #ifdef _DEBUG + player->eventPrint("Sending HTTP get request..." ); + #endif + if( status == SOCK_CONNECTED ) + { + result = socket_write( socket, (string)str ); + #ifdef _DEBUG + player->eventPrint( "HTTP request sent to " + socket + " result = "+result ); + #endif + } + } + + int openHTTPConnection() + { + + int sock, sc_result; + string error; + status = SOCK_FIND; + + + status = SOCK_CONNECTING; + sock = socket_create( STREAM, "read_callback", "close_callback" ) ; + if (sock < 0) { + switch( sock ) + { + case EEMODENOTSUPP : + error = "Socket mode not supported.\n" ; + break ; + case EESOCKET : + error = "Problem creating socket.\n" ; + break ; + case EESETSOCKOPT : + error = "Problem with setsockopt.\n" ; + break ; + case EENONBLOCK : + error = "Problem with setting non-blocking mode.\n" ; + break ; + case EENOSOCKS : + error = "No more available efun sockets.\n" ; + break ; + case EESECURITY : + error = "Security violation attempted.\n" ; + break ; + default : + error = "Unknown error code: " + sock + ".\n" ; + break ; + } + notify_fail( "Unable to connect, problem with socket_create.\n" + "Reason: " + error ) ; + return 0 ; + } + #ifdef _DEBUG + write("Attempting to connect to "+HTTP_HOST+ " on port "+ HTTP_PORT + "\n"); + #endif + sc_result = socket_connect( sock, HTTP_ADDRESS + " " + HTTP_PORT, + "read_callback", "write_callback" ) ; + if( sc_result != EESUCCESS ) + { + status = SOCK_DISCONNECTED; + notify_fail( "Failed to connect.\n" ) ; + return 0 ; + } + else{ + #ifdef _DEBUG + player->eventPrint( "Socket connecting..." ); + #endif + } + + socket = sock; + return 1; + } + + void hostResolved( string address, string resolved, int key ) + { + if( !resolved ){ + #ifdef _DEBUG + player->eventPrint( "Unable to resolve "+address ); + #endif + return; + } + #ifdef _DEBUG + player->eventPrint( "Resolved "+address+" to "+ resolved ); + #endif + player->eventPrint( "Retrieving updated release notes from: http://www.dead-souls.net\n" ); + openHTTPConnection(); + } + + void resolveHost() + { + resolve( HTTP_HOST, "hostResolved" ); + } + + + mixed cmd(string args) { + player = previous_object(); + if(args) args_list = args; + else args_list = ""; + //resolveHost(); + openHTTPConnection(); + return 1; + } + + string GetErorMessage() { + return "There was a problem"; + } + + string GetHelp() { + return ("Syntax: dsversion [version]\n\n" + + "Shows the latest version of Dead Souls and release notes.\n"+ + "e.g. dsversion, dsversion r1, dsversion 2.0r1"); + } + + + + + + + + + + + + + + + + diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/eval.c ds2.0r20b/lib/secure/cmds/creators/eval.c *** ds2.0r18/lib/secure/cmds/creators/eval.c Fri Mar 24 14:38:48 2006 --- ds2.0r20b/lib/secure/cmds/creators/eval.c Wed Apr 12 23:49:46 2006 *************** *** 28,33 **** --- 28,34 ---- file = ""+ "#include \n"+ + "#include \n"+ "#include \n"+ "#include \n"+ "#include \n"+ diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/heal.c ds2.0r20b/lib/secure/cmds/creators/heal.c *** ds2.0r18/lib/secure/cmds/creators/heal.c Wed Dec 7 14:24:50 2005 --- ds2.0r20b/lib/secure/cmds/creators/heal.c Sun Apr 9 23:51:07 2006 *************** *** 18,23 **** --- 18,24 ---- string cmd = args; object who; mapping stumps; + string *limb_arr = ({}); int i, mhp, msp, mmp, self; if( !cmd || cmd == "" ) { *************** *** 50,55 **** --- 51,60 ---- who->AddMagicPoints(mmp); if(who->GetPoison() > 0) who->AddPoison(0 - who->GetPoison()); eventRegenerate(who); + limb_arr = who->GetLimbs(); + foreach(string limb in limb_arr) { + who->HealLimb(limb); + } return 1; } diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/indent.c ds2.0r20b/lib/secure/cmds/creators/indent.c *** ds2.0r18/lib/secure/cmds/creators/indent.c Wed Dec 7 14:24:50 2005 --- ds2.0r20b/lib/secure/cmds/creators/indent.c Wed Apr 5 19:33:19 2006 *************** *** 39,44 **** --- 39,45 ---- if(sizeof(paths)) foreach(string path in paths){ //tc("path: "+path); load_object("/secure/cmds/creators/lsed")->cmd(rulefile + " "+ path + "/*.c"); + load_object("/secure/cmds/creators/lsed")->cmd(rulefile + " "+ path + "/*.h"); } } diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/monitor.c ds2.0r20b/lib/secure/cmds/creators/monitor.c *** ds2.0r18/lib/secure/cmds/creators/monitor.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/creators/monitor.c Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,31 ---- + #include + #include + + inherit LIB_DAEMON; + + int cmd(string str) { + object ob; + + if( !str || str == "" ) { + write("Monitor whom?\n"); + } + else if(!user_exists(str)) + write(str+": no such player.\n"); + else{ + SNOOP_D->AddMonitor(this_player()->GetKeyName(), str); + write("The snoop daemon has received your request."); + } + return 1; + } + + int help() + { + write( @EndText + Syntax: monitor + Effect: Logs to a file everything sees or types. + To stop monitoring, an admin must type "unmonitor " + See also: unmonitor, snoop, unsnoop + EndText + ); + return 1; + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/snoop.c ds2.0r20b/lib/secure/cmds/creators/snoop.c *** ds2.0r18/lib/secure/cmds/creators/snoop.c Mon Nov 7 13:32:17 2005 --- ds2.0r20b/lib/secure/cmds/creators/snoop.c Wed Apr 12 23:49:53 2006 *************** *** 5,10 **** --- 5,11 ---- */ #include + #include inherit LIB_DAEMON; *************** *** 12,26 **** object ob; if( !str || str == "" ) { ! if(snoop(this_player())) ! write("Ok.\n"); ! else write("Couldn't stop snoop\n"); } else if(!(ob=find_player(str=lower_case(str)))) write(str+": no such player.\n"); else ! write(snoop(this_player(), ob)?"Now snooping.\n":str+": snoop failed.\n"); ! return 1; } --- 13,29 ---- object ob; if( !str || str == "" ) { ! write("Snoop whom?\n"); ! } ! else if(str == this_player()->GetKeyName()){ ! write("That would be very foolish."); ! return 1; } else if(!(ob=find_player(str=lower_case(str)))) write(str+": no such player.\n"); else ! SNOOP_D->AddWatcher(this_player()->GetKeyName(), str); ! write("The snoop daemon has received your request."); return 1; } *************** *** 28,36 **** { write( @EndText Syntax: snoop ! Effect: Echos to your screen everything sees or types. ! To stop snooping, type just "snoop" ! See also: snoopable EndText ); return 1; --- 31,39 ---- { write( @EndText Syntax: snoop ! Effect: Echoes to your screen everything sees or types. ! To stop snooping, type just "unsnoop " ! See also: unsnoop, monitor, unmonitor EndText ); return 1; diff -c -r --new-file ds2.0r18/lib/secure/cmds/creators/unsnoop.c ds2.0r20b/lib/secure/cmds/creators/unsnoop.c *** ds2.0r18/lib/secure/cmds/creators/unsnoop.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/cmds/creators/unsnoop.c Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,29 ---- + #include + #include + + inherit LIB_DAEMON; + + int cmd(string str) { + object ob; + + if( !str || str == "" ) { + write("Unsnoop whom?\n"); + } + else if(!(ob=find_player(str=lower_case(str)))) + write(str+": no such player.\n"); + else + SNOOP_D->RemoveWatcher(this_player()->GetKeyName(), str); + write("The snoop daemon has received your request."); + return 1; + } + + int help() + { + write( @EndText + Syntax: unsnoop + Effect: Stops snooping the specified user. + See also: snoop, monitor, unmonitor + EndText + ); + return 1; + } diff -c -r --new-file ds2.0r18/lib/secure/cmds/players/peer.c ds2.0r20b/lib/secure/cmds/players/peer.c *** ds2.0r18/lib/secure/cmds/players/peer.c Sat Mar 11 11:16:59 2006 --- ds2.0r20b/lib/secure/cmds/players/peer.c Wed Apr 5 19:33:19 2006 *************** *** 16,21 **** --- 16,33 ---- object env, *livings, *items; if( !sizeof(str) ) return "Syntax: peer "; + switch(str){ + case "n" : str = "north";break; + case "ne" : str = "northeast";break; + case "nw" : str = "northwest";break; + case "s" : str = "south";break; + case "se" : str = "southeast";break; + case "sw" : str = "southwest";break; + case "e" : str = "east";break; + case "w" : str = "west";break; + case "u" : str = "up";break; + case "d" : str = "down";break; + } env = environment(this_player()); if( !file = (string)env->GetExit(str) ) file = (string)env->GetEnter(str); if( !sizeof(file) ) diff -c -r --new-file ds2.0r18/lib/secure/cmds/players/suicide.c ds2.0r20b/lib/secure/cmds/players/suicide.c *** ds2.0r18/lib/secure/cmds/players/suicide.c Sun Dec 18 01:59:08 2005 --- ds2.0r20b/lib/secure/cmds/players/suicide.c Fri Apr 14 19:45:32 2006 *************** *** 83,88 **** --- 83,90 ---- static private void EndSuicide(string who) { string tmp, file, newfile; object *ob; + + if(!directory_exists(DIR_TMP + "/suicide/")) mkdir (DIR_TMP + "/suicide/"); file = DIR_TMP + "/" + who; newfile = DIR_TMP + "/suicide/" + who; diff -c -r --new-file ds2.0r18/lib/secure/daemon/autoexec.c ds2.0r20b/lib/secure/daemon/autoexec.c *** ds2.0r18/lib/secure/daemon/autoexec.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/autoexec.c Wed Apr 5 19:44:20 2006 *************** *** 0 **** --- 1,23 ---- + #include + #include + + inherit LIB_DAEMON; + + int hasrun = 0; + + static void eventRun() { + load_object("/secure/cmds/creators/update")->cmd("-r /lib/creator"); + if(RESET_INTERMUD){ + rm("/save/intermud.o"); + update("/daemon/intermud"); + } + load_object("/secure/cmds/creators/dsversion")->cmd(); + } + + static void create() { + daemon::create(); + if(hasrun) return; + call_out((: eventRun :), 60); + hasrun = 1; + } + diff -c -r --new-file ds2.0r18/lib/secure/daemon/chat.c ds2.0r20b/lib/secure/daemon/chat.c *** ds2.0r18/lib/secure/daemon/chat.c Fri Mar 24 14:39:55 2006 --- ds2.0r20b/lib/secure/daemon/chat.c Wed Apr 12 23:50:02 2006 *************** *** 89,98 **** return chans; } ! int cmdLast(string feep) ! { ! if(!chanlast||!Channels[feep]||member_array(this_player(), Channels[feep])==-1) ! { this_player()->eventPrint(mud_name() + " does not have that channel on record.", MSG_ERROR); return 1; } --- 89,98 ---- return chans; } ! int cmdLast(string feep){ ! ! if(!chanlast||!Channels[feep]||member_array(this_player(), Channels[feep])==-1){ ! this_player()->eventPrint(mud_name() + " does not have that channel on record.", MSG_ERROR); return 1; } *************** *** 140,154 **** object ob = 0; int emote; if(grepp(verb, "emote")) varb = replace_string(verb,"emote",""); ! else if(grepp(verb, ":")) varb = replace_string(verb,":",""); else varb = verb; - if(!CanTalk(this_player(),varb)){ - write("You lack privileges to that channel."); - return 1; - } - if( verb == "hist" ) { if( !Channels[str] ) return 0; if( member_array(this_player(), Channels[str]) == -1 ) return 0; --- 140,154 ---- object ob = 0; int emote; + if(first(str,1) == ":" && sizeof(str) > 3){ + if(!grepp(verb,"emote")) verb += "emote"; + str = trim(replace_string(str,":","",1)); + } + if(grepp(verb, "emote")) varb = replace_string(verb,"emote",""); ! else if(last(verb, 1) == ":") varb = replace_string(verb,":",""); else varb = verb; if( verb == "hist" ) { if( !Channels[str] ) return 0; if( member_array(this_player(), Channels[str]) == -1 ) return 0; *************** *** 172,177 **** --- 172,181 ---- "such a place.", MSG_ERROR); return 1; } + if(!CanTalk(this_player(),varb)){ + write("You lack privileges to that channel."); + return 1; + } SERVICES_D->eventSendChannelWhoRequest(ch, mud); this_player()->eventPrint("Remote listing request sent.", MSG_SYSTEM); *************** *** 191,196 **** --- 195,201 ---- string emote_cmd, remains; mixed array msg_data; int i; + //tc("we seem to think it's an emote"); if( !Channels[verb] ) { return 0; } diff -c -r --new-file ds2.0r18/lib/secure/daemon/finger.c ds2.0r20b/lib/secure/daemon/finger.c *** ds2.0r18/lib/secure/daemon/finger.c Mon Jan 16 23:04:22 2006 --- ds2.0r20b/lib/secure/daemon/finger.c Wed Apr 12 23:50:02 2006 *************** *** 17,23 **** private int LoginTime, Level, BirthTime, CreatorBirth, WhereBlock; private string CurrentUser, Short, CapName, RealName, Email; private string Town, Race, Gender, HostSite; ! private string Class, Guild, Long; private string Rank, WebPage; private string array Titles, Religion; private class marriage array Marriages; --- 17,23 ---- private int LoginTime, Level, BirthTime, CreatorBirth, WhereBlock; private string CurrentUser, Short, CapName, RealName, Email; private string Town, Race, Gender, HostSite; ! private string Class, Clan, Long; private string Rank, WebPage; private string array Titles, Religion; private class marriage array Marriages; *************** *** 100,106 **** int yr; ret += CapName+" the "+Gender+" "+Race+" "+(Class || "drifter"); ! if( Guild ) ret += " of the " + pluralize(Guild); if( creatorp(this_player()) && Level ) ret += " ("+Level+")"; ret += " is a " + Rank+" of " + Town + ".%^BR%^\n"; BirthTime = BirthTime - (18 * YEAR); --- 100,106 ---- int yr; ret += CapName+" the "+Gender+" "+Race+" "+(Class || "drifter"); ! if( Clan ) ret += " of the " + pluralize(Clan); if( creatorp(this_player()) && Level ) ret += " ("+Level+")"; ret += " is a " + Rank+" of " + Town + ".%^BR%^\n"; BirthTime = BirthTime - (18 * YEAR); diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/broadcast_chanlist.h ds2.0r20b/lib/secure/daemon/i3router/broadcast_chanlist.h *** ds2.0r18/lib/secure/daemon/i3router/broadcast_chanlist.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/broadcast_chanlist.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,31 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + // broadcast the chanlist-reply when a channel just now got changed... + static void broadcast_chanlist(string channame){ + string name; // channel name in first loop, then mud name in later loop + #ifdef SEND_WHOLE_CHANLIST + mapping out=([]); // only used if whole chanlist is sent + trr("broadcasting chanlist to let them know about "+channame); + foreach(name in keys(channel_updates)){ + if(!channels[channame]) + out[name]=0; + else + out[name]=({ channels[name][1], channels[name][0] }); + } + #else + if(!channels[channame]) + out = ([ channame:0 ]); + else + out = ([ channame:({ channels[channame][1], channels[channame][0] }) ]); + #endif + foreach(name in keys(connected_muds)){ + trr("inside loop with "+name); + if(member_array("channel", keys(mudinfo[name]["services"]))!=-1){ + // only tell muds that have the "channel" service... + write_data(connected_muds[name], ({ + "chanlist-reply",5,router_name,0,name,0,channel_update_counter,out + })); + } + trr("done with: "+name); + } + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/broadcast_mudlist.h ds2.0r20b/lib/secure/daemon/i3router/broadcast_mudlist.h *** ds2.0r18/lib/secure/daemon/i3router/broadcast_mudlist.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/broadcast_mudlist.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,66 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + // broadcast the mudlist when a mud just now got changed... + void broadcast_mudlist(string mudname){ + string targ_mudname; + mixed *packet1; // for muds that use protocol 1 or 2 + mixed *packet3; // for muds that use protocol 3 + trr("broadcasting mudlist to let them know about "+mudname,"red"); + packet1 = ({ "mudlist", 5, router_name, 0, "dummy", 0, mudinfo_update_counter,([ + mudname:({ + connected_muds[mudname] ? -1 : 0, + // -1=up, 0=down, n=down for n secs + mudinfo[mudname]["ip"], // ip_addr + mudinfo[mudname]["player_port"], // player_port + mudinfo[mudname]["imud_tcp_port"], // imud_tcp_port + mudinfo[mudname]["imud_udp_port"], // imud_udp_port + mudinfo[mudname]["mudlib"], // mudlib + mudinfo[mudname]["base_mudlib"], // base_mudlib + mudinfo[mudname]["driver"], // driver + mudinfo[mudname]["mud_type"], // mud_type + mudinfo[mudname]["open_status"], // open_status + mudinfo[mudname]["services"], // services + }) + ]) }); + packet3 = ({ "mudlist", 5, router_name, 0, "dummy", 0, mudinfo_update_counter,([ + mudname:({ + (connected_muds[mudname] ? -1 : 0), + // -1=up, 0=down, n=down for n secs + mudinfo[mudname]["ip"], // ip_addr + mudinfo[mudname]["player_port"], // player_port + mudinfo[mudname]["imud_tcp_port"], // imud_tcp_port + mudinfo[mudname]["imud_udp_port"], // imud_udp_port + mudinfo[mudname]["mudlib"], // mudlib + mudinfo[mudname]["base_mudlib"], // base_mudlib + mudinfo[mudname]["driver"], // driver + mudinfo[mudname]["mud_type"], // mud_type + mudinfo[mudname]["open_status"], // open_status + mudinfo[mudname]["admin_email"], // admin_email + mudinfo[mudname]["services"], // services + mudinfo[mudname]["other_data"], // other_data + }) + ]) }); + if(!mudinfo[mudname]){ // deleted mud... + // just send a 0 to everyone + foreach(targ_mudname in keys(connected_muds)){ + write_data(connected_muds[targ_mudname], ({ + "mudlist", 5, router_name, 0, targ_mudname, + 0, mudinfo_update_counter, ([mudname:0]) + }) ); + } + return; + } + foreach(targ_mudname in keys(connected_muds)){ + switch(mudinfo[targ_mudname]["protocol"]){ + case 1: + case 2: + packet1[4]=targ_mudname; + write_data(connected_muds[targ_mudname], packet1); + break; + case 3: + packet3[4]=targ_mudname; + write_data(connected_muds[targ_mudname], packet3); + break; + } + } + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/core_stuff.h ds2.0r20b/lib/secure/daemon/i3router/core_stuff.h *** ds2.0r18/lib/secure/daemon/i3router/core_stuff.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/core_stuff.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,71 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + #include + + static void create(){ + SetNoClean(1); + //save::create(); + sockets = ([]); + connected_muds = ([]); + if(!mudinfo) mudinfo = ([]); + if(!mudinfo_updates) mudinfo_updates = ([]); + if(!mudinfo_update_counter) mudinfo_update_counter = 1; + if(!listening) listening = ([]); + if(!channels) channels = ([]); + if(!channel_updates) channel_updates = ([]); + if(!channel_update_counter) channel_update_counter = 1; + if(!router_name) router_name = "*test"; + //if(!router_list) router_list = ({ ({"*yatmim", "149.152.218.102 23"}) }); + if(!router_list) router_list = ({ ({"*test", "192.168.0.201 9000"}) }); + log_file("server", "Created when uptime = " + uptime() + "\n"); + trr("server got created"); + call_out("setup", 5); + set_heart_beat(10); + } + + void heart_beat(){ + trr("BING!","white"); + this_object()->clear_discs(); + } + + + static void setup(){ + trr("setup got called"); + if ((router_socket = socket_create(MUD, "read_callback", "close_callback")) < 0){ + log_file("server", "setup: Failed to create socket.\n"); + trr("setup: Failed to create socket.\n"); + return; + } + if (socket_bind(router_socket, MYSERVER) < 0) { + socket_close(router_socket); + log_file("server", "setup: Failed to bind socket to port.\n"); + trr("setup: Failed to bind socket to port.\n"); + return; + } + if (socket_listen(router_socket, "listen_callback") < 0) { + socket_close(router_socket); + log_file("server", "setup: Failed to listen to socket.\n"); + trr("setup: Failed to listen to socket.\n"); + } + trr("setup ended"); + } + + void remove(){ + string mudname; + log_file("server", "Being removed by: "+identify(previous_object())+"\n"); + trr("Being removed by: "+identify(previous_object())+"\n"); + log_file("server", "sockets:"+identify(sockets)+"\n"); + trr("sockets:"+identify(sockets)+"\n"); + log_file("server", "Starting to destruct at uptime = " + uptime() + "\n"); + trr("Starting to destruct at uptime = " + uptime() + "\n"); + mudinfo_update_counter++; // just increment once... all the connected muds + // getting simultaneously disconnected is okay to count as one change :) + foreach(mudname in keys(connected_muds)){ + mudinfo_updates[mudname]; + mudinfo[mudname]["disconnect_time"]=time(); + map_delete(connected_muds,mudname); // unneeded: connected_muds isn't saved anyway + } + log_file("server", "Successfully destructed when uptime = " + uptime() + "\n"); + trr("Successfully destructed when uptime = " + uptime() + "\n"); + destruct(this_object()); + } + int query_prevent_shadow(object ob){ return 1; } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/debug.h ds2.0r20b/lib/secure/daemon/i3router/debug.h *** ds2.0r18/lib/secure/daemon/i3router/debug.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/debug.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,24 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + varargs void Debug(string str, int level){ + if(find_player(DEBUGGER_GUY)) + switch(level){ + case DEB_IN: + message("trr", "%^BOLD%^%^WHITE%^SERVER INCOMING: %^MAGENTA%^"+str+"%^RESET%^\n", + find_player(DEBUGGER_GUY)); + break; + case DEB_OUT: + message("trr", "%^BOLD%^%^WHITE%^SERVER OUTGOING: %^CYAN%^"+str+"%^RESET%^\n", + find_player(DEBUGGER_GUY)); + break; + case DEB_INVALID: + message("trr", "%^BOLD%^%^WHITE%^SERVER THINKS THIS IS INVALID: %^RED%^"+str+"%^RESET%^\n", + find_player(DEBUGGER_GUY)); + break; + case DEB_OTHER: + default: + message("trr", "%^BOLD%^%^WHITE%^SERVER INFO: %^GREEN%^"+str+"%^RESET%^\n", + find_player(DEBUGGER_GUY)); + break; + } + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/funcs.h ds2.0r20b/lib/secure/daemon/i3router/funcs.h *** ds2.0r18/lib/secure/daemon/i3router/funcs.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/funcs.h Wed Apr 5 18:44:57 2006 *************** *** 0 **** --- 1,10 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static mapping muds_on_this_fd(int fd){ + return filter_mapping(connected_muds,"value_equals",this_object(),fd); + } + int value_equals(string a,int b, int c){ return b==c; } + static mapping muds_not_on_this_fd(int fd){ + return filter_mapping(connected_muds,"value_equals",this_object(),fd); + } + int value_not_equals(string a,int b, int c){ return b!=c; } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/process_channel.h ds2.0r20b/lib/secure/daemon/i3router/process_channel.h *** ds2.0r18/lib/secure/daemon/i3router/process_channel.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/process_channel.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,232 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static void process_channel(int fd, mixed *info){ + string mudname; + trr("extra stuff is ["+info[0][8..]+"]"); + switch(info[0][8..]){ // what is after the "channel-" + case "m": // message + case "e": // emote + case "t": // targetted emote + trr("they want to do a message..."); + // (drop-through from m/e is intentional) + // Probably should check if the target is 0@0 like it should be, + // and give a warning if it's not... I don't carethough, I'll just + // ignore the target and save some CPU. + // Check if string parts are strings... + if(info[0][8..]=="t"){ + if(sizeof(info)!=12 || !stringp(info[9]) || !stringp(info[10]) || + !stringp(info[11]) || !stringp(info[12])){ + send_error(info[2],info[3],"bad-pkt","Bad packet format.",info); + return; + } + } + else{ // m, e + if(sizeof(info)!=9){ + send_error(info[2],info[3],"bad-pkt","Bad packet format.",info); + return; + } + } + if(info[4]!=0 || info[5]!=0 || !stringp(info[6]) || + !stringp(info[7]) || !stringp(info[8])){ + send_error(info[2],info[3],"bad-pkt","Bad packet format.",info); + return; + } + if(!channels[info[6]]){ // error, channel is not registered! + send_error(info[2],info[3],"unk-channel", + "Unknown channel: "+info[6],info); + return; + } + if(member_array(info[2],listening[info[6]])==-1){ + // if mud is not listening, then make them listen + // and let them know they weren't listening. + send_error(info[2],info[3],"warning", + // No applicable message codes... change + // "warning" to something else if you want. + "Your mud wasn't listening to "+info[6]+ + ", so I'll start you listening right now.",info); + // Could do all the listen stuff, or could just + // pretend they requested it... I'm gonna pretend... + process_channel(fd,({ "channel-listen", 5, info[2], 0, + router_name, 0, info[6], 1 })); + return; + } + if(channels[info[6]][0]==2){ // filtered channel + if(channels[info[6]][1]!=info[2]){ // not from chan owner + // if from anybody else other than the owner, + // check if the owner is online, then either give + // an error, or forward to the owner... + if(!connected_muds[channels[info[6]][1]]){ + send_error(info[2],info[3],"unk-dst", + channels[info[6]][1]+" is not online to filter "+info[6], + info); + return; + } + if(info[4]!=0 || info[5]!=0 || !stringp(info[6]) || + !stringp(info[7]) || !stringp(info[8])){ + send_error(info[2],info[3],"bad-pkt","Bad packet format",info); + return; + } + write_data(connected_muds[channels[info[6]][1]],({ + "chan-filter-req", + 5, + router_name, + 0, + channels[info[6]][1], // mud name of chan owner + 0, + info[6], + info + })); + return; + } + // IS from chan owner, just broadcast it... + // drop through and broadcast like the other types do... + } + trr("CHAN: I think it's a good message at this point..."); + // at this point, they're wanting to do a message on a + // selective banned/allowed channel, or else are the owner + // of a filtered channel and they have not been + // blocked, so I will just do it... + foreach(mudname in keys(connected_muds)){ + if(member_array(mudname, listening[info[6]])!=-1) + write_data(connected_muds[mudname],info); + } + //broadcast_data(muds_not_on_this_fd(fd), info); + // send to all the other fd's that have a mud listening + // write_data(fd,info); + // also send the message to the connection that this mud is on + // from too... why do this? 'cause I'm allowing multiple muds to + // log on from the same connection :) + // I think the normal I3 server does this too, but I don't know + // since I can't test at the moment. + return; + case "add": + // check if already exists... + // check if a valid channel name (illegal characters?) + // check if other stuff is valid, like channel_type is 0,1,2 + // at this point, is being successfully added... + channel_update_counter++; + channels[info[6]]=({ info[7], info[2], ({}) }); + channel_updates[info[6]] = channel_update_counter; + trr(info[3]+"@"+info[2]+" created the channel: "+info[6]); + // broadcast an update saying that this channel is added or changed now + // chanlist-reply packet to everybody (who has a channel service?) + broadcast_chanlist(info[6]); + // broadcast_data(muds_not_on_this_fd(fd), ({ + // "chanlist-reply",5,router_name,0, + // 0, // should be mudname, I think 0 would work just as well? + // 0, channel_update_counter, + // ([ info[6]:({ info[2], info[7] }) ]) + // })); + // write_data(fd,({ + // "chanlist-reply",5,router_name,0, + // 0, // should be mudname, I think 0 would work just as well? + // 0, channel_update_counter, + // ([ info[6]:({ info[2], info[7] }) ]) + // })); + return; + case "remove": + if(!channels[info[6]]){ // error, channel is not registered! + send_error(info[2],info[3],"unk-channel", + "Unknown channel: "+info[6],info); + return; + } + if(channels[info[6]][1]!=info[2]){ // error, not owner! + send_error(info[2],info[3],"not-allowed","Channel "+ + info[6]+" owned by: "+channels[info[6]][1],info); + return; + } + // at this point, is being removed by the owner... + channel_update_counter++; + map_delete(channels,info[6]); + channel_updates[info[6]] = channel_update_counter; + trr(info[3]+"@"+info[2]+" deleted the channel: "+info[6]); + // broadcast an update saying that this channel is gone now + return; + case "admin": + // add/delete muds from the 2 lists... + if(!listening[info[6]]) listening[info[6]] = ({}); + if(info[7]){ // add to list... + channels[info[6]][2] += info[7]; + // if add to ban list, unlisten... + if(channels[info[6]][0]==0) // type 0 means selective ban + listening[info[6]] -= info[7]; + } + if(info[8]){ // remove from list... + channels[info[6]][2] += info[8]; + if(channels[info[6]][0]!=0) // type 0 means selective ban... + // selective allow and filtered are the same though... + // so if not selective ban, then act like selective allow... + // if removed from allow list, unlisten... + listening[info[6]] -= info[8]; + } + return; + case "listen": // mudname=info[2], channame=info[6], on_or_off=info[7] + if(!channels[info[6]]){ // error, channel is not registered! + send_error(info[2],info[3],"unk-channel", + "Unknown channel: "+info[6],info); + return; + } + if(!listening) listening=([ ]); + if(!listening[info[6]]) listening[info[6]]=({ }); // first MUD to listen + if(info[7]){ // on_or_off is on + if(member_array(info[2],listening[info[6]])!=-1) + return; // already listening, ignore them + } + else{ // on_or_off is on + if(member_array(info[2],listening[info[6]])==-1) + return; // already NOT listening, ignore them + } + trr("listening change on chan:"+info[6]+", mud="+info[2]+", on_or_off="+info[7]); + // only CHANGES should get to this point + switch(channels[info[6]][0]){ + case 0: // selectively banned + if(member_array(info[2],channels[info[6]][2])!=-1){ + // in list, you're banned... + send_error(info[2],0,"not-allowed", + "Banned from "+info[6],info); + return; + } + // not in ban list at this point + if(info[7]) + listening[info[6]] += ({ info[2] }); + else + listening[info[6]] -= ({ info[2] }); + return; + case 1: // selectively allowed + if(member_array(info[2],channels[info[6]][2])==-1 && + info[2] != channels[info[6]][1]){ + // NOT in list, you're banned! + send_error(info[2],0,"not-allowed", + "Not in allow list for "+info[6],info); + return; + } + // in allow list at this point + if(info[7]) + listening[info[6]] += ({ info[2] }); + else + listening[info[6]] -= ({ info[2] }); + return; + case 2: // filtered... act like selectively allowed + if(member_array(info[2],channels[info[6]][2])==-1 && + info[2] != channels[info[6]][1]){ + // NOT in list, you're banned! + send_error(info[2],0,"not-allowed", + "Not in allow list for "+info[6], + info); + return; + } + // in allow list at this point + if(info[7]) + listening[info[6]] += ({ info[2] }); + else + listening[info[6]] -= ({ info[2] }); + return; + } // switch + default: // trying to do "channel-blah" + send_error(info[2],info[3],"unk-type","I don't know what "+info[0]+ + " means.",info); + trr("Don't know what the ["+info[0]+"] packet means.", DEB_INVALID); + return; + } + trr("can't get here?"); + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/process_startup_req.h ds2.0r20b/lib/secure/daemon/i3router/process_startup_req.h *** ds2.0r18/lib/secure/daemon/i3router/process_startup_req.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/process_startup_req.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,215 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static void process_startup_req(int protocol, mixed info, int fd){ + // Handles startup stuff. + // Loads info into newinfo mapping. + // Error if mud is already connected. + mapping newinfo; + string site_ip, junk; + // router name is info[4], I'll just pretend I'm every router though, ha-ha! + // also, should verify that all the fields are the right type + + trr("info: "+identify(info)); + trr("process_startup_req: protocol="+protocol+", mud="+info[2]); + + if(sizeof(info)<18){ + // smallest protocol is protocol 1/2 which have size 18 + trr("THIS SHOULDNT BE HERE"); + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], + 0, + "bad-pkt", + "Bad startup_req packet", + info + })); + return; + } + //sscanf(socket_address(fd), "%s %s", site_ip,junk); + //socket_bind(fd,random(1000)+10000); + //site_ip = path_prefix(socket_status(fd)[4],"."); + //if(!site_ip || site_ip == "" || site_ip == "*"){ + //if(true()){ + trr("bad ip "+site_ip+" from "+info[2]); + //socket_close(fd); + //return; + //} + //junk = "foo"; + trr("fd is:" +fd); + + site_ip=socket_address(fd); + trr("site_ip: "+site_ip); + newinfo = ([ + "ip":site_ip, + "connect_time":time(), + "disconnect_time":0, + "password":info[6], + "old_mudlist_id":info[7], + "old_chanlist_id":info[8], + "player_port":info[9], + "imud_tcp_port":info[10], + "imud_udp_port":info[11], + "mudlib":info[12], + "base_mudlib":info[13], + "driver":info[14], + "mud_type":info[15], + "open_status":info[16], + "protocol":protocol, + "restart_delay":-1, + ]); + trr("newinfo: "+identify(newinfo)); + switch(protocol){ + case 1: + case 2: + if(sizeof(info)!=18){ + trr("error"); + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], + 0, + "bad-pkt", + "Bad startup_req packet", + info + })); + return; + } + newinfo["services"]=info[17]; + newinfo["admin_email"]="Unknown"; // only in protocol 3 + newinfo["other_data"]=0; // only in protocol 3 + break; + case 3: + if(sizeof(info)!=20){ + trr("error"); + + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], + 0, + "bad-pkt", + "Bad startup_req packet", + info + })); + return; + } + newinfo["admin_email"]=info[17]; + newinfo["services"]=info[18]; + newinfo["other_data"]=info[19]; + break; + default: + trr("error"); + + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], // mud name + 0, + "not-imp", + "unknown protocol: "+protocol, + info + })); + return; + } + // Check valid values... + if( + !stringp(newinfo["open_status"]) || + !stringp(newinfo["admin_email"]) || + !stringp(newinfo["mud_type"]) || + !stringp(newinfo["driver"]) || + !stringp(newinfo["base_mudlib"]) || + !stringp(newinfo["mudlib"]) || + !mapp(newinfo["services"]) || + !intp(newinfo["imud_udp_port"]) || + !intp(newinfo["imud_tcp_port"]) || + !intp(newinfo["player_port"]) || + !intp(newinfo["password"]) || + !intp(newinfo["old_chanlist_id"]) || + !intp(newinfo["old_mudlist_id"]) || + (!mapp(newinfo["other_data"]) && newinfo["other_data"]!=0) + ){ + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], + 0, + "bad-pkt", + "Bad startup_req packet", + info + })); + return; + } + if(connected_muds[info[2]]){ + // if MUD is already connected + trr("mud already connected"); + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], // mud name + 0, + "bad-proto", // doesn't seem to me like it should be bad-proto... + // see what the official one uses for this + // it might just boot the earlier MUD off? + "MUD already connected", // Error message + info + })); + return; + } + if(mudinfo[info[2]] && mudinfo[info[2]]["password"] != newinfo["password"]){ + // if MUD is already known, not connected, and wrong password + if(newinfo["ip"]==mudinfo[info[2]]["ip"]){ + // same IP as last time... let's just trust 'em... + write_data(fd,({ + "error",5,router_name,0,info[2],0, + "warning", // nothing in error summary that seems applicable? + // Change later if I find a better error code + "wrong password, but I'll allow you since it's the same IP as last time",0 + })); + } + else{ + trr("wrong password, and from a new IP"); + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], // mud name + 0, + "not-allowed", // Change later! + "wrong password, and from a new IP", // Error message + info + })); + return; + } + } + if(!mudinfo[info[2]]){ + // if new MUD, assign it a password + newinfo["password"]=random(10000); + // Change this maybe... see if the password is supposed to be in a certain range + } + // MUD should be okay at this point. + trr("about to update the mudinfo..."); + mudinfo[info[2]]=newinfo; // update the mudinfo + connected_muds[info[2]] = fd; // add this MUD to list of connected muds + trr("about to send the startup reply..."); + send_startup_reply(info[2]); // reply to MUD + mudinfo_update_counter++; + mudinfo_updates[info[2]]=mudinfo_update_counter; + send_mudlist_updates(info[2], newinfo["old_mudlist_id"]); + broadcast_mudlist(info[2]); + if(member_array("channel", keys(newinfo["services"]))) + send_chanlist_reply(info[2], newinfo["old_chanlist_id"]); + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/read_callback.h ds2.0r20b/lib/secure/daemon/i3router/read_callback.h *** ds2.0r18/lib/secure/daemon/i3router/read_callback.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/read_callback.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,160 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static void read_callback(int fd, mixed info){ + // This is called when messages come in from a MUD. + // Should reject all messages if they have not done a (successful) startup-req, + // Should check to make sure the fd matches with the mud they are claiming to be, else error. + // because all packets require an originator_mudname. + + // If target is the name of the router, then call the function in this object. + // if target is 0, then broadcast to muds. + // Do an error if target mudname is not known. + // + + // According to: http://www.intermud.org/i3/specs/formats.php3 + // Transmissions are LPC arrays with a predefined set of six initial elements: + // ({ type, ttl, originator mudname, originator username, target mudname, target username, ... }). + // info[0]=type + // info[1]=ttl + // info[2]=originator mudname + // info[3]=originator username + // info[4]=target mudname + // info[5]=target username + + string mudname; + int i; + trr("Received from fd("+fd+"), fd("+socket_address(fd)+")\n"+identify(info)); + // Base info in a packet is of size 6. + if(sizeof(info)<6 || + !stringp(info[0]) || + !intp(info[1]) || !stringp(info[2]) || + (!stringp(info[3]) && info[3]!=0) || + (!stringp(info[4]) && info[4]!=0) || + (!stringp(info[5]) && info[5]!=0) ) { + write_data(fd,({ + // okay, their initial data isn't fully there... + // careful about array out of bounds... + "error",5,router_name,0, + (sizeof(info)>=3 ? info[2] : 0), // mud name + (sizeof(info)>=4 ? info[3] : 0), // user name + "bad-pkt","Invalid initial data",info + })); + return; + } + if(info[4]!=0 && !connected_muds[info[4]] && info[4]!=router_name){ + // if target mud is not 0 (broadcasting), not the router name, + // and not a connected MUD + write_data(fd,({ + "error", + 5, + router_name, + 0, + info[2], + info[3], + "unk-dst", // same as I3 + "destination unknown", // same as I3 + info + })); + trr("Error [unk-dst], because target is "+info[4]+" and thus invalid."); + return; + } + if(sscanf(info[0],"startup-req-%d",i)==1){ + // special condition for startup-req... + trr("calling process_startup_req, i="+i+", fd="+fd+" which is: "+socket_address(fd)); + //call_other(this_object(),"process_startup_req",i,info,fd); + this_object()->process_startup_req(i,info,fd); + return; + } + if(!connected_muds[info[2]] || (connected_muds[info[2]]!=fd)){ + // MUD hasn't done a startup-req yet + write_data(fd,({ + "error", + 5, + router_name, + 0, // originator username + info[2], // mud name + info[3], // user name + "unk-src", // error code + "Your MUD hasn't registered as "+info[2]+" yet", // Error message + info + })); + trr("They have not done a startup-req for fd="+fd+", mudname="+info[2]); + return; + } + // at this point, I guess it has a valid origin and stuff + if(sscanf(info[0],"channel-%*s")==1){ // command has a "channel-" prefix + // special case for channel stuff + trr("calling process_channel..."); + process_channel(fd,info); + return; + } + if(info[0]=="chan-filter-reply"){ + if(!stringp(info[6]) || sizeof(info[7])<9 ){ + // avoid out-of-bounds + send_error(info[2],info[3],"bad-pkt", + "Invalid chan-filter-reply packet.",info); + } + if(channels[info[6]][1]!=info[2]){ + send_error(info[2],info[3],"not-allowed", + "You are not the owner of "+info[6],info); + return; + } + if(member_array(info[7][6],({ "channel-a", "channel-e", "channel-t"}))==-11){ + // Not a valid channel packet. + send_error(info[2],info[3],"not-allowed","*giggles*",info); + } + if(info[6]!=info[7][6]){ + // They're trying to trick me into broadcasting + // fake messages on another channel! + // That's pretty funny :P + // I'll have to remember to check if the official router falls for it. + send_error(info[2],info[3],"not-allowed","Hehe!",info); + return; + } + if(member_array(info[7][6],({ "channel-a", "channel-e", "channel-t"}))){ + + } + // Broadcast the message... + foreach(mudname in keys(connected_muds)){ + if(member_array(mudname, listening[info[6]])!=-1) + write_data(connected_muds[mudname],info[7]); + } + return; + } + + if(info[4]==0){ // if broadcasting this... + broadcast_data(connected_muds,info); + return; + } + if(info[4]==router_name) { + // Something meant for the router but not handled by now! + send_error(info[2],info[3],"not-imp","Unknown command sent to router: "+info[0],info); + trr("unhandled command meant for router: "+info[0]); + log_file("server","UNHANDLED PACKET:\n"+identify(info)+"\n"); + return; + } + // at this point, I guess you should forward it to the destination... + if(info[0]=="locate-reply"){ + // Special case for locate-reply, because protocol 3 has a larger packet... + if(sizeof(info)==8 && mudinfo[info[4]]["protocol"]>2){ + // originator mud is sending a protocol 1/2 response, + // but target understands 3, so add the extra info + write_data(connected_muds[info[4]], ({ + info[0],info[1],info[2],info[3],info[4],info[5], + info[6],info[7],0,0 + })); + return; + } + if(sizeof(info)==10 && mudinfo[info[4]]["protocol"]<=2){ + // target mud is being sent a protocol 3 response, + // but only understands 1 & 2, so strip the extra info + write_data(connected_muds[info[4]], ({ + info[0],info[1],info[2],info[3],info[4],info[5], + info[6],info[7] + })); + return; + } + } + write_data(connected_muds[info[4]], info); + return; + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/readme.txt ds2.0r20b/lib/secure/daemon/i3router/readme.txt *** ds2.0r18/lib/secure/daemon/i3router/readme.txt Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/readme.txt Tue Apr 4 18:23:30 2006 *************** *** 0 **** --- 1,23 ---- + // This I3 router code was written completely by Tim Johnson (Tim@TimMUD, + // Tim@The Eternal Fantasy) + // To use it, #include the server.h file or else just rename it to server.c + // + // If you use it yourself, I'd like you to mention in whatever appropriate + // (if your I3 network or your primary MUD has a web site or board for example) + // place that I wrote all this and you're welcome to list what you may have + // changed on it after downloading mine. I'd actually prefer there to be a + // list somewhere simply because I'm curious what kinds of ideas people add. + // If it's something good, other people would probably be curious about it as + // well. + // + // I haven't done any router-to-router communications, so don't expect this to + // hook you up to the main network. This will only be useful for private I3 + // networks. + // Also, this is LPC code and needs to be on a MUD for it to run. It works + // good on a stock TMI-2 MUD, one day I'll make a stripped-down mudlib solely + // for running my router on (without code for players to log in and such). + // Until then, just download TMI-2 and put these files on your MUD and it + // should work. + // + // -Tim (Last edited February 16, 2004) + diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/remove_mud.h ds2.0r20b/lib/secure/daemon/i3router/remove_mud.h *** ds2.0r18/lib/secure/daemon/i3router/remove_mud.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/remove_mud.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,13 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static void remove_mud(string mudname){ + if(connected_muds[mudname]){ + trr("Cannot remove mud ["+mudname+"] because it is still online right now.\n"); + return; + } + if(!mudinfo[mudname]){ + trr("Cannot remove mud ["+mudname+"] because it is not in the mudinfo list.\n"); + return; + } + map_delete(mudinfo, mudname); + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/send_chanlist_reply.h ds2.0r20b/lib/secure/daemon/i3router/send_chanlist_reply.h *** ds2.0r18/lib/secure/daemon/i3router/send_chanlist_reply.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/send_chanlist_reply.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,35 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static void send_chanlist_reply(string mudname, int old_chanid){ + string channame; // channel name + // string *output; // array of which channel names to tell them about + mapping out=([ ]); // mapping to send + int i; // counter + trr("send_chanlist_reply, mudname="+mudname+", old_chanid="+old_chanid); + foreach(channame in keys(channel_updates)){ + #ifndef SEND_WHOLE_CHANLIST + if(channel_updates[channame]>old_chanid){ // needs updating + #endif + if(!channels[channame]){ // add to output; + out[channame] = 0; + } + else{ + out[channame] = ({ channels[channame][1], + channels[channame][0] }); // host, type + } + #ifndef SEND_WHOLE_CHANLIST + } + #endif + } + write_data(connected_muds[mudname],({ + "chanlist-reply", + 5, + router_name, + 0, + mudname, + 0, + channel_update_counter, + out, + })); + mudinfo[mudname]["old_chanlist_id"]=channel_update_counter; + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/send_error.h ds2.0r20b/lib/secure/daemon/i3router/send_error.h *** ds2.0r18/lib/secure/daemon/i3router/send_error.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/send_error.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,21 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static void send_error(string mud, string user, string errcode, string errmsg, mixed *info){ + if(!connected_muds[mud]){ + trr("Can't send error to "+mud+" because they're not connected."); + return; + } + write_data(connected_muds[mud],({ + "error", + 5, + router_name, + 0, + mud, // mud name + user, // user name + 0, + errcode, + errmsg, + info + })); + return; + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/send_mudlist_updates.h ds2.0r20b/lib/secure/daemon/i3router/send_mudlist_updates.h *** ds2.0r18/lib/secure/daemon/i3router/send_mudlist_updates.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/send_mudlist_updates.h Sun Apr 9 23:51:25 2006 *************** *** 0 **** --- 1,113 ---- + // This file written completely by Tim Johnson (Tim@TimMUD) + + static void send_mudlist_updates(string updating_mudname, int old_mudlist_id){ + string mudname; // mud name + string *kys; // array of strings for keys that need to be sent + mapping out=([ ]); // mapping to send + int i; // counter + trr("old_mudlist_id: "+old_mudlist_id,"blue"); + trr("updating_mudname: "+updating_mudname,"blue"); + trr("send_mudlist_updates, updating_mudname="+updating_mudname+", old_mudlist_id="+old_mudlist_id,"blue"); + foreach(mudname in keys(mudinfo_updates)){ + #ifndef SEND_WHOLE_MUDLIST + if(mudinfo_updates[mudname]>old_mudlist_id){ // needs updating + #endif + if(!mudinfo[mudname]){ // deleted mud; + out[mudname] = 0; + } + else{ + switch(mudinfo[updating_mudname]["protocol"]){ + case 1: + case 2: + out[mudname] = ({ + connected_muds[mudname] ? -1 : 0, + // -1=up, 0=down, n=down for n secs + mudinfo[mudname]["ip"], // ip_addr + mudinfo[mudname]["player_port"], // player_port + mudinfo[mudname]["imud_tcp_port"], // imud_tcp_port + mudinfo[mudname]["imud_udp_port"], // imud_udp_port + mudinfo[mudname]["mudlib"], // mudlib + mudinfo[mudname]["base_mudlib"], // base_mudlib + mudinfo[mudname]["driver"], // driver + mudinfo[mudname]["mud_type"], // mud_type + mudinfo[mudname]["open_status"], // open_status + mudinfo[mudname]["services"], // services + }); + break; + case 3: + out[mudname] = ({ + (connected_muds[mudname] ? -1 : 0), + // -1=up, 0=down, n=down for n secs + mudinfo[mudname]["ip"], // ip_addr + mudinfo[mudname]["player_port"], // player_port + mudinfo[mudname]["imud_tcp_port"], // imud_tcp_port + mudinfo[mudname]["imud_udp_port"], // imud_udp_port + mudinfo[mudname]["mudlib"], // mudlib + mudinfo[mudname]["base_mudlib"], // base_mudlib + mudinfo[mudname]["driver"], // driver + mudinfo[mudname]["mud_type"], // mud_type + mudinfo[mudname]["open_status"], // open_status + mudinfo[mudname]["admin_email"], // admin_email + mudinfo[mudname]["services"], // services + mudinfo[mudname]["other_data"], // other_data + }); + break; + } // switch + } // else not deleted + #ifndef SEND_WHOLE_MUDLIST + } // if needs updating + #endif + } // foreach + // out now has the mapping of what to tell the mud about... + // this might be big, so later I'll make it so it sends only 10 muds at a time... + // take an idea from /cmds/std/_semote.c + kys=keys(out); + for(i=0;i + #include + #include + #define DEB_IN 1 // trr-Incoming + #define DEB_OUT 2 // trr-Outgoing + #define DEB_INVALID 3 // trr-Invalid + #define DEB_OTHER 0 // trr-Other + #define MYSERVER 9000 // Port to accept connections on. + #define DEBUGGER_GUY "cratylus" // Name of who to display trrging info to. + #undef DEBUGGER_GUY + #define DEBUGGER_GUY "guest" + #define MAXIMUM_RETRIES 5 + // SEND_WHOLE_MUDLIST makes it act like the official I3 server instead of like the I3 specs + #define SEND_WHOLE_MUDLIST + // SEND_WHOLE_CHANLIST makes it act like the official I3 server instead of like the I3 specs + #define SEND_WHOLE_CHANLIST + inherit LIB_SAVE; + inherit LIB_CLEAN; + + // Unsaved variables... + static private int router_socket; + // socket that the router is using + static private mapping sockets; + // physically connected sockets and their info + static private mapping connected_muds; + // muds that have successfully done a startup + // (key=mudname, value=fd) + //static private + mapping listening; + // list of muds listening to each channel + // (key=chan name, value=mud array) + + // Saved variables... + string router_name; // Name of the router. + string *router_list; // Ordered list of routers to use. + mapping mudinfo; // Info about all the muds which the router knows about. + mapping channels; // Info about all the channels the router handles. + mapping channel_updates; // Tells when a channel was last changed. + int channel_update_counter; // Counter for the most recent change. + // Why is this not a part of the channels mapping? + // Because I need to remember that some channels got deleted. + mapping mudinfo_updates; // Like channel_updates except for muds. + int mudinfo_update_counter; // Similar to channel_update_counter + + // Prototypes + void write_data(int fd, mixed data); + void close_connection(int fd); + static mapping muds_on_this_fd(int fd); + static mapping muds_not_on_this_fd(int fd); + static void broadcast_data(mapping targets, mixed data); + // Ones with their own files... + static void broadcast_chanlist(string channame); + static void broadcast_mudlist(string mudname); + static varargs void Debug(string str, int level); + static void process_channel(int fd, mixed *info); + static void process_startup_req(int protocol, mixed info, int fd); + static void read_callback(int fd, mixed info); + static void remove_mud(string mudname); + static void send_chanlist_reply(string mudname, int old_chanid); + static void send_mudlist(string mudname); + static void send_mudlist_updates(string updating_mudname, int old_mudlist_id); + static void send_startup_reply(string mudname); + static void send_error(string mud, string user, string errcode, string errmsg, mixed *info); + // core_stuff.h... + static void create(); + static void setup(); + void remove(); + // funcs.h... + static mapping muds_on_this_fd(int fd); + int value_equals(string a,int b, int c); + static mapping muds_not_on_this_fd(int fd); + int value_not_equals(string a,int b, int c); + // socket_stuff.h + static void close_callback(int fd); + static void listen_callback(int fd); + static void write_data_retry(int fd, mixed data, int counter); + static void close_connection(int fd); + static void write_data(int fd, mixed data); + static void broadcast_data(mapping targets, mixed data); + + // Code for all the stuff in the prototypes... + #include "./broadcast_chanlist.h" + #include "./broadcast_mudlist.h" + #include "./debug.h" + #include "./process_channel.h" + #include "./process_startup_req.h" + #include "./read_callback.h" + #include "./remove_mud.h" + #include "./send_chanlist_reply.h" + #include "./send_mudlist_updates.h" + #include "./send_startup_reply.h" + #include "./send_error.h" + + #include "./core_stuff.h" + #include "./funcs.h" + #include "./socket_stuff.h" + + + + // trrging stuff... + mapping query_mudinfo(){ return copy(mudinfo); } + mapping query_mud(string str){ return copy(mudinfo[str]); } + void get_info() { + write_file ("/tmp/info.txt", + "router_name: "+router_name+ + "\nrouter_list"+identify(router_list)+ + "\nchannel_update_counter: "+ channel_update_counter+ + "\nchannels:"+identify(channels)+ + "\nchannel_updates:"+identify(channel_updates)+ + "\nlistening:"+identify(listening)+ + "\nmudinfo:"+identify(mudinfo)+ + "\nmudinfo_update_counter: "+ mudinfo_update_counter+ + "\nmudinfo_updates:"+identify(mudinfo_updates)+ + "\nconnected:"+identify(connected_muds)+"\n"); + } + void clear(){ string mudname; foreach(mudname in keys(mudinfo)) remove_mud(mudname); + } + + mapping GetConnectedMuds(){ + return copy(connected_muds); + } + + + void clear_discs(){ + string mudname; + foreach(mudname in keys(mudinfo)) { + if(query_mud(mudname)["disconnect_time"] && + time() - query_mud(mudname)["disconnect_time"] > 60 && + time() - query_mud(mudname)["disconnect_time"] < 80){ + //trr("Removing mud: "+identify(mudname),"red"); + //remove_mud(mudname); + trr("Broadcasting updated mudlist.","white"); + broadcast_mudlist(mudname); + + } + } + } + diff -c -r --new-file ds2.0r18/lib/secure/daemon/i3router/socket_stuff.h ds2.0r20b/lib/secure/daemon/i3router/socket_stuff.h *** ds2.0r18/lib/secure/daemon/i3router/socket_stuff.h Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/i3router/socket_stuff.h Sun Apr 9 23:51:26 2006 *************** *** 0 **** --- 1,77 ---- + // This file written in great part by Tim Johnson (Tim@TimMUD) + + static void close_callback(int fd){ + string mudname; + trr("close_callback: fd="+fd+"\n"); + foreach(mudname in keys(muds_on_this_fd(fd))){ + trr("Removing mud from connected_muds list: "+mudname); + mudinfo[mudname]["disconnect_time"] = time(); + map_delete(connected_muds, mudname); + broadcast_mudlist(mudname); + } + close_connection(fd); + } + + static void listen_callback(int fd){ + int fdstat; + if ((fdstat = socket_accept(fd, "read_callback", "write_callback")) < 0) { + return; + } + } + + void write_callback(int fd){ + if (sockets[fd]["write_status"] == EEALREADY) { + write_data(fd, sockets[fd]["pending"]); + map_delete(sockets[fd], "pending"); + } + else { + sockets[fd]["write_status"] = EESUCCESS; + } + } + + static void write_data_retry(int fd, mixed data, int counter){ + int rc; + if (counter == MAXIMUM_RETRIES) { + close_connection(fd); + return; + } + rc = socket_write(fd, data); + if(!sockets[fd]) sockets[fd]=([]); // Tim + sockets[fd]["write_status"] = rc; + switch (rc) { + case EESUCCESS: + break; + case EEALREADY: + sockets[fd]["pending"] = data; + break; + case EECALLBACK: + break; + case EESEND: + if (counter < MAXIMUM_RETRIES) { + trr("retry hit"); + call_out("retry_write", 2, ({fd, data, counter + 1})); + return; + } + default: + trr("write_data_retry: " + socket_error(rc)); + close_connection(fd); + break; + } + } + + static void close_connection(int fd){ + int sockerr; + map_delete(sockets, fd); + sockerr = socket_close(fd); + trr("closing sockerr:"+sockerr); + } + + static void write_data(int fd, mixed data){ + write_data_retry(fd, data, 0); + } + + static void broadcast_data(mapping targets, mixed data){ + foreach(int *arr in unique_array(values(targets), (: $1 :))){ + write_data(arr[0], data); + } + } diff -c -r --new-file ds2.0r18/lib/secure/daemon/imc2.c ds2.0r20b/lib/secure/daemon/imc2.c *** ds2.0r18/lib/secure/daemon/imc2.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/secure/daemon/imc2.c Wed Apr 5 19:33:19 2006 *************** *** 1,23 **** // Tim Johnson // Started on May 1, 2004. // Use this however you want. // Connection data... ! //#define HOSTNAME "hub01.muddomain.com" ! //#define HOSTPORT 3333 ! //#define HOSTPORT 5000 ! #define HOSTPORT 3333 // HostIP overrides HOSTNAME, in case the mud doesn't want to resolve addresses. #define HOSTIP "70.85.248.74" - //#define HOSTIP "70.85.244.100" - //#define HOSTIP "66.218.49.113" // What name the network knows your mud as... ! #define MUDNAME "DeadSouls" // Passwords... ! #define CLIENT_PW "ClientPass321" ! #define SERVER_PW "ServPass321" // File to save data to, .o will be added automatically to the end. // This will have private stuff in it, don't put this in a directory where your wizards can read it. --- 1,22 ---- // Tim Johnson // Started on May 1, 2004. // Use this however you want. + // + // Dead Souls tweaks and fixes courtesy of Shadyman + // // Connection data... ! #define HOSTNAME "server01.intermud.us" ! #define HOSTPORT 5000 // HostIP overrides HOSTNAME, in case the mud doesn't want to resolve addresses. #define HOSTIP "70.85.248.74" // What name the network knows your mud as... ! #define MUDNAME "YADSM" // Passwords... ! #define CLIENT_PW "ClientPass" ! #define SERVER_PW "ServPass" // File to save data to, .o will be added automatically to the end. // This will have private stuff in it, don't put this in a directory where your wizards can read it. *************** *** 45,51 **** // Your MUD's URL is shared with other muds when building the mud list. // This you could also put this in your who reply. ! #define URL "http://dead-souls.sourceforge.net/" // ANNOUNCE_LOG is where network announcements get logged to. // I suggest you keep this turned on. --- 44,50 ---- // Your MUD's URL is shared with other muds when building the mud list. // This you could also put this in your who reply. ! #define URL "http://qs.bounceme.net" // ANNOUNCE_LOG is where network announcements get logged to. // I suggest you keep this turned on. *************** *** 66,80 **** // WHO_STR is the code that you want a who request to display. ! #define WHO_STR "/cmds/std/_who.c"->do_who()+URL+ \ ! "\ntelnet://www.darkwoodinc.com:3333\n" \ ! "______________________________________________________________________________" #include #include #include #include #ifndef VERSION --- 65,78 ---- // WHO_STR is the code that you want a who request to display. ! #define WHO_STR "/cmds/std/_who.c"->do_who()+URL+"\ntelnet://qs.bounceme.net 5500\n"+"______________________________________________________________________________" #include #include #include #include + #include #ifndef VERSION *************** *** 90,95 **** --- 88,101 ---- #define MODE_CONNECT_ERROR 3 // Not used yet, I need to see what the hub sends. #define MODE_HUB_DOWN 4 // Not used yet either. + + // What's the file for the channel daemon? + #ifndef CHANNEL_BOT + #define CHANNEL_BOT CHAT_D + #endif + //#ifndef CHANNEL_BOTS + //#define CHANNEL_BOTS ([ "local" : CHAT_D ]) + //#endif #ifndef STREAM #define STREAM 1 #endif *************** *** 228,242 **** // Shouldn't have to change anything beyond this point. ! private int read_callback(object socket, string info){ ! // string str, *strs; ! string a,b; int done=0; ! if(!sizeof(info)) return 0; ! //debug(save_variable(info),DEB_IN); #ifdef DATA_LOG ! log_file(DATA_LOG,"SERVER: "+save_variable(info)+"\n"); #endif buf += info; // The hub groups packets, unfortunately. switch(mode){ case MODE_WAITING_ACCEPT: // waiting for Hub to send autosetup --- 234,259 ---- // Shouldn't have to change anything beyond this point. ! void write_callback(int fd){ ! #ifdef DATA_LOG ! log_file(DATA_LOG,"Write_Callback on socket " + fd + "\n"); ! #endif ! start_logon(); ! } ! ! ! void read_callback(int socket, mixed info){ ! string a,b; ! int done=0; ! #ifdef DATA_LOG ! log_file(DATA_LOG,"SERVER: "+info+"\n"); #endif + + if(!sizeof(info)) return 0; + //debug(save_variable(info),DEB_IN); buf += info; + // The hub groups packets, unfortunately. switch(mode){ case MODE_WAITING_ACCEPT: // waiting for Hub to send autosetup *************** *** 247,285 **** send_is_alive("*"); send_keepalive_request(); send_ice_refresh(); ! } ! else if(sscanf(info, "PW %s %s version=%d %s\n", hub_name, server_pass, server_version, network_name)==4){ mode = MODE_CONNECTED; send_is_alive("*"); send_keepalive_request(); send_ice_refresh(); ! } ! else{ // Failed login sends plaintext error message. //debug("Failed to connect... "+info); } buf=""; // clear buffer break; ! case MODE_CONNECTED: while(!done){ if(sscanf(buf,"%s\n\r%s",a,b)==2){ // found a break... got_packet(a); buf=b; ! } ! else{ // no break... done = 1; } } - /* - strs = explode(info,"\n\r"); - foreach(str in strs){ - got_packet(str); - } - buf=""; - */ break; } ! return 1; } private void got_packet(string info){ --- 264,292 ---- send_is_alive("*"); send_keepalive_request(); send_ice_refresh(); ! } else if(sscanf(info, "PW %s %s version=%d %s\n", hub_name, server_pass, server_version, network_name)==4){ mode = MODE_CONNECTED; send_is_alive("*"); send_keepalive_request(); send_ice_refresh(); ! } else{ // Failed login sends plaintext error message. //debug("Failed to connect... "+info); } buf=""; // clear buffer break; ! case MODE_CONNECTED: while(!done){ if(sscanf(buf,"%s\n\r%s",a,b)==2){ // found a break... got_packet(a); buf=b; ! } else { // no break... done = 1; } } break; } ! return; } private void got_packet(string info){ *************** *** 291,297 **** mapping data; object who; if(!sizeof(info)) return; ! //debug(save_variable(info),DEB_PAK); str = info; // messages end with " \n\r" or "\n" or sometimes just a space --- 298,307 ---- mapping data; object who; if(!sizeof(info)) return; ! //debug(save_variable(info),DEB_PAK);; ! #ifdef DATA_LOG ! log_file(DATA_LOG,"GOT PACKET: "+info+"\n"); ! #endif str = info; // messages end with " \n\r" or "\n" or sometimes just a space *************** *** 465,471 **** return; } ! void create(){ #ifndef NO_UIDS seteuid(getuid()); #endif --- 475,483 ---- return; } ! void create(){ ! int temp; ! #ifndef NO_UIDS seteuid(getuid()); #endif *************** *** 482,499 **** mode = MODE_WAITING_ACCEPT; #ifdef HOSTIP // We already know the IP, go straight to the connecting, just do callback as if it found the IP. ! resolve_callback(HOSTIP,HOSTIP,1); #else ! if(!resolve(HOSTNAME, "resolve_callback")){ //debug("Addr_server is not running, resolve failed."); ! #ifdef DATA_LOG log_file(DATA_LOG,"Addr_server is not running, resolve failed.\n"); ! #endif remove(); return; } #endif - //debug("creating IMC2 object"); } void remove(){ --- 494,511 ---- mode = MODE_WAITING_ACCEPT; #ifdef HOSTIP // We already know the IP, go straight to the connecting, just do callback as if it found the IP. ! //resolve_callback(HOSTIP,HOSTIP,1); #else ! temp = resolve(HOSTNAME, "resolve_callback"); ! if(temp == 0){ //debug("Addr_server is not running, resolve failed."); ! #ifdef DATA_LOG log_file(DATA_LOG,"Addr_server is not running, resolve failed.\n"); ! #endif remove(); return; } #endif } void remove(){ *************** *** 507,520 **** destruct(this_object()); } ! private void resolve_callback( string address, string resolved, int key ) { // Figured out what the IP is for the address. int error; //debug("Resolved to: "+resolved); ! start_logon(); ! write_file("/tmp/imc2.log","address: "+address); ! write_file("/tmp/imc2.log","resolved: "+resolved); ! write_file("/tmp/imc2.log","key: "+key); //socket_num = socket_create(STREAM, "close_callback"); socket_num = socket_create(STREAM, "read_callback", "close_callback"); --- 519,531 ---- destruct(this_object()); } ! void resolve_callback( string address, string resolved, int key ) { // Figured out what the IP is for the address. int error; //debug("Resolved to: "+resolved); ! write_file("/tmp/imc2.log","address: "+address+"\n"); ! write_file("/tmp/imc2.log","resolved: "+resolved+"\n"); ! write_file("/tmp/imc2.log","key: "+key+"\n"); //socket_num = socket_create(STREAM, "close_callback"); socket_num = socket_create(STREAM, "read_callback", "close_callback"); *************** *** 525,531 **** tc("socket_create: " + socket_error(socket_num) + "\n"); return; } ! //debug("Created socket descriptor " + socket_num); error = socket_connect(socket_num, resolved+" "+HOSTPORT, "read_callback", "write_callback"); if (error != EESUCCESS) { --- 536,544 ---- tc("socket_create: " + socket_error(socket_num) + "\n"); return; } ! #ifdef DATA_LOG ! log_file(DATA_LOG,"socket_create: Created Socket " + socket_num + "\n"); ! #endif error = socket_connect(socket_num, resolved+" "+HOSTPORT, "read_callback", "write_callback"); if (error != EESUCCESS) { *************** *** 536,548 **** socket_close(socket_num); return; } ! } ! private void write_callback(){ ! // start_logon(); } ! private void start_logon(){ //debug("Gonna try logging in, sending the PW thing..."); #if NOT_AUTO send_text(sprintf("PW %s %s version=%d\n", --- 549,562 ---- socket_close(socket_num); return; } ! #ifdef DATA_LOG ! log_file(DATA_LOG,"socket_connect: connected socket " + socket_num + " to " + resolved+" "+HOSTPORT + "\n"); ! #endif ! //write_callback(socket_num); } ! void start_logon(){ //debug("Gonna try logging in, sending the PW thing..."); #if NOT_AUTO send_text(sprintf("PW %s %s version=%d\n", *************** *** 642,648 **** return out; } ! private void send_packet(string sender, string packet_type, string target, string destination, string data){ // Sends a packet in the format that IMC2 uses. sequence++; send_text(sprintf("%s@%s %d %s %s %s@%s %s\n", --- 656,662 ---- return out; } ! void send_packet(string sender, string packet_type, string target, string destination, string data){ // Sends a packet in the format that IMC2 uses. sequence++; send_text(sprintf("%s@%s %d %s %s %s@%s %s\n", *************** *** 668,674 **** VERSION, network_name, URL)); } ! private int chan_listening(object user, string chan){ // Tells if a user is listening to a channel or not. if(!localchaninfo[chan]) return 0; if(member_array(GET_NAME(user),localchaninfo[chan]["users"])==-1) return 0; --- 682,688 ---- VERSION, network_name, URL)); } ! int chan_listening(object user, string chan){ // Tells if a user is listening to a channel or not. if(!localchaninfo[chan]) return 0; if(member_array(GET_NAME(user),localchaninfo[chan]["users"])==-1) return 0; *************** *** 684,693 **** int emote=0; int sz; - /* - tell_object(find_player("tim"),("data="+identify(data)+"\n")); - */ - sender=fromname+"@"+frommud; if(data["sender"]) sender=data["sender"]; if(data["realfrom"]) sender=data["realfrom"]; --- 698,703 ---- *************** *** 699,709 **** #ifdef CHANNEL_BOT // Can define CHANNEL_BOT to something with got_chan(channel,from,text,emote) // It will be given all channel messages. Be aware of this. ! call_other(CHANNEL_BOT,"got_chan",data["channel"],sender,data["text"],emote); #endif #ifdef CHANNEL_BOTS if(CHANNEL_BOTS[local]){ ! call_other(CHANNEL_BOTS[local],"got_chan",local,sender,data["text"],emote); } else if(CHANNEL_BOTS[data["channel"]]){ call_other(CHANNEL_BOTS[data["channel"]],"got_chan",data["channel"],sender,data["text"],emote); --- 709,719 ---- #ifdef CHANNEL_BOT // Can define CHANNEL_BOT to something with got_chan(channel,from,text,emote) // It will be given all channel messages. Be aware of this. ! CHANNEL_BOT->eventSendChannel(sender, data["channel"], data["text"], emote); #endif #ifdef CHANNEL_BOTS if(CHANNEL_BOTS[local]){ ! call_other(CHANNEL_BOTS[local],"got_chan",local,sender,data["text"],emote); } else if(CHANNEL_BOTS[data["channel"]]){ call_other(CHANNEL_BOTS[data["channel"]],"got_chan",data["channel"],sender,data["text"],emote); *************** *** 976,982 **** } private void whois_in(string fromname, string frommud, string targ, mapping data){ ! if(FIND_PLAYER(lower_case(targ)) #ifdef INVIS && !INVIS(FIND_PLAYER(lower_case(targ))) #endif --- 986,992 ---- } private void whois_in(string fromname, string frommud, string targ, mapping data){ ! if(FIND_PLAYER(lower_case(targ)) #ifdef INVIS && !INVIS(FIND_PLAYER(lower_case(targ))) #endif *************** *** 1134,1140 **** x=0; y=0; output=sprintf("[%s] %-20s %-20s %-20s\n","U/D?","Name","Network","IMC2 Version"); foreach (mud in muds){ ! if(!mudinfo[mud]) output += "Error on mud: "+mud+"\n"; else{ if(mudinfo[mud]["online"]) x++; else y++; --- 1144,1150 ---- x=0; y=0; output=sprintf("[%s] %-20s %-20s %-20s\n","U/D?","Name","Network","IMC2 Version"); foreach (mud in muds){ ! if(!mudinfo[mud]) output += "Error on mud: "+mud+"\n"; else{ if(mudinfo[mud]["online"]) x++; else y++; *************** *** 1270,1276 **** case "chans": output="Local setup for "+NETWORK_ID+" channels:\n"; output += sprintf("%-15s %-15s %-15s %-15s\n", ! "Local Name","Allowed (you?)","Listening","Network Name"); foreach(a in sort_array(keys(localchaninfo),1)){ output += sprintf("%-15s %s%-15s%%^RESET%%^ %s%-15s%%^RESET%%^ %-15s\n", a, --- 1280,1286 ---- case "chans": output="Local setup for "+NETWORK_ID+" channels:\n"; output += sprintf("%-15s %-15s %-15s %-15s\n", ! "Local Name","Allowed (you?)","Listening","Network Name"); foreach(a in sort_array(keys(localchaninfo),1)){ output += sprintf("%-15s %s%-15s%%^RESET%%^ %s%-15s%%^RESET%%^ %-15s\n", a, *************** *** 1287,1293 **** case "allchans": output=NETWORK_ID+" channels:\n"; output += sprintf("%-23s %-17s %-7s %-6s %-10s %-10s\n", ! "Name","Owner","Policy","Level","Suggested","Local Name"); foreach(a in sort_array(keys(chaninfo),1)){ output += sprintf("%-23s %-17s %-7s %-6s %-10s %-10s\n", a,chaninfo[a]["owner"], --- 1297,1303 ---- case "allchans": output=NETWORK_ID+" channels:\n"; output += sprintf("%-23s %-17s %-7s %-6s %-10s %-10s\n", ! "Name","Owner","Policy","Level","Suggested","Local Name"); foreach(a in sort_array(keys(chaninfo),1)){ output += sprintf("%-23s %-17s %-7s %-6s %-10s %-10s\n", a,chaninfo[a]["owner"], *************** *** 1343,1349 **** sprintf("channel=%s text=%s emote=%d echo=1", localchaninfo[a]["name"],escape(pinkfish_to_imc2(b)),emote)); return 1; ! break; case "reply": // Drop-through case "replyemote": // Drop-through case "tellemote": // Drop-through --- 1353,1359 ---- sprintf("channel=%s text=%s emote=%d echo=1", localchaninfo[a]["name"],escape(pinkfish_to_imc2(b)),emote)); return 1; ! break; case "reply": // Drop-through case "replyemote": // Drop-through case "tellemote": // Drop-through diff -c -r --new-file ds2.0r18/lib/secure/daemon/include/chat.h ds2.0r20b/lib/secure/daemon/include/chat.h *** ds2.0r18/lib/secure/daemon/include/chat.h Sat Oct 22 18:08:55 2005 --- ds2.0r20b/lib/secure/daemon/include/chat.h Wed Apr 5 19:33:19 2006 *************** *** 6,12 **** string *eventRemoveMember(string *chans); int cmdChannel(string verb, string str); varargs void eventSendChannel(string who, string ch, string msg, int emote, ! string target, string targmsg); string *GetChannelList(string ch); string GetLocalChannel(string ch); string GetRemoteChannel(string ch); --- 6,12 ---- string *eventRemoveMember(string *chans); int cmdChannel(string verb, string str); varargs void eventSendChannel(string who, string ch, string msg, int emote, ! string target, string targmsg); string *GetChannelList(string ch); string GetLocalChannel(string ch); string GetRemoteChannel(string ch); diff -c -r --new-file ds2.0r18/lib/secure/daemon/include/imc2_code.h ds2.0r20b/lib/secure/daemon/include/imc2_code.h *** ds2.0r18/lib/secure/daemon/include/imc2_code.h Wed Jan 11 23:18:00 2006 --- ds2.0r20b/lib/secure/daemon/include/imc2_code.h Wed Apr 5 19:33:19 2006 *************** *** 106,113 **** private void send_ice_refresh(); private void resolve_callback(string address, string resolved, int key); ! //private varargs void debug(mixed msg, int x){ ! // Add stuff in here if you want to see messages. //} // Functions for users to change. --- 106,113 ---- private void send_ice_refresh(); private void resolve_callback(string address, string resolved, int key); ! //private varargs void Debug(mixed msg, int x){ ! // Add stuff in here if you want to see messages. //} // Functions for users to change. *************** *** 132,153 **** // so you can do groups without having to always do subgroups of higher // ones or anything like 'levels'. BACKLOG_WEB_LEVEL is the only one of // significance, as it's the only one that the web backlog thing works on. ! switch(i){ ! case 2: return "arch"; ! case 1: return "creator"; ! case 0: return "public"; ! } ! return "invalid"; } int chan_perm_allowed(object user, string chan){ // Using the permission level assigned locally to a channel, // return 1 if user is allowed to use the channel, 0 if not. ! switch(localchaninfo[chan]["perm"]){ ! case 2: if(archp(user)) return 1; return 0; ! case 1: if(creatorp(user)) return 1; return 0; ! case 0: return 1; ! } } --- 132,153 ---- // so you can do groups without having to always do subgroups of higher // ones or anything like 'levels'. BACKLOG_WEB_LEVEL is the only one of // significance, as it's the only one that the web backlog thing works on. ! switch(i){ ! case 2: return "arch"; ! case 1: return "creator"; ! case 0: return "public"; ! } ! return "invalid"; } int chan_perm_allowed(object user, string chan){ // Using the permission level assigned locally to a channel, // return 1 if user is allowed to use the channel, 0 if not. ! switch(localchaninfo[chan]["perm"]){ ! case 2: if(archp(user)) return 1; return 0; ! case 1: if(creatorp(user)) return 1; return 0; ! case 0: return 1; ! } } *************** *** 157,163 **** // string str, *strs; string a,b; int done=0; if(!sizeof(info)) return 0; ! //debug(save_variable(info),DEB_IN); #ifdef DATA_LOG log_file(DATA_LOG,"SERVER: "+save_variable(info)+"\n"); #endif --- 157,163 ---- // string str, *strs; string a,b; int done=0; if(!sizeof(info)) return 0; ! //Debug(save_variable(info),DEB_IN); #ifdef DATA_LOG log_file(DATA_LOG,"SERVER: "+save_variable(info)+"\n"); #endif *************** *** 167,173 **** case MODE_WAITING_ACCEPT: // waiting for Hub to send autosetup if(sscanf(info, "autosetup %s accept %s\n\r", hub_name, network_name)==2){ ! //debug("Connected, hub is "+hub_name+", network is "+network_name); mode = MODE_CONNECTED; send_is_alive("*"); send_keepalive_request(); --- 167,173 ---- case MODE_WAITING_ACCEPT: // waiting for Hub to send autosetup if(sscanf(info, "autosetup %s accept %s\n\r", hub_name, network_name)==2){ ! //Debug("Connected, hub is "+hub_name+", network is "+network_name); mode = MODE_CONNECTED; send_is_alive("*"); send_keepalive_request(); *************** *** 181,187 **** send_ice_refresh(); } else{ // Failed login sends plaintext error message. ! //debug("Failed to connect... "+info); } buf=""; // clear buffer break; --- 181,187 ---- send_ice_refresh(); } else{ // Failed login sends plaintext error message. ! //Debug("Failed to connect... "+info); } buf=""; // clear buffer break; *************** *** 216,222 **** mapping data; object who; if(!sizeof(info)) return; ! //debug(save_variable(info),DEB_PAK); str = info; // messages end with " \n\r" or "\n" or sometimes just a space --- 216,222 ---- mapping data; object who; if(!sizeof(info)) return; ! //Debug(save_variable(info),DEB_PAK); str = info; // messages end with " \n\r" or "\n" or sometimes just a space *************** *** 235,246 **** sender="*"; origin=a; } data = string_to_mapping(strdata); ! // debug("sender="+sender); ! // debug("origin="+origin); ! // debug("sequence="+sequence); ! // debug("route="+route); ! // debug("packet_type="+packet_type); ! // debug("data="+save_variable(data)); if(!mudinfo[origin]) mudinfo[origin] = ([ ]); switch(packet_type){ --- 235,246 ---- sender="*"; origin=a; } data = string_to_mapping(strdata); ! // Debug("sender="+sender); ! // Debug("origin="+origin); ! // Debug("sequence="+sequence); ! // Debug("route="+route); ! // Debug("packet_type="+packet_type); ! // Debug("data="+save_variable(data)); if(!mudinfo[origin]) mudinfo[origin] = ([ ]); switch(packet_type){ *************** *** 251,257 **** //mudinfo[origin]["version"]="blah"; mudinfo[origin]+=data; mudinfo[origin]["online"]=1; ! //debug("handled is-alive for mud "+origin); break; case "close-notify": // Someone disconnected. if(!mudinfo[data["host"]]) mudinfo[data["host"]] = ([]); --- 251,257 ---- //mudinfo[origin]["version"]="blah"; mudinfo[origin]+=data; mudinfo[origin]["online"]=1; ! //Debug("handled is-alive for mud "+origin); break; case "close-notify": // Someone disconnected. if(!mudinfo[data["host"]]) mudinfo[data["host"]] = ([]); *************** *** 347,365 **** case "remote-admin": // For controlling the hub case "ice-refresh": // Request data about channels case "ice-msg-p": // Private channel message ! //debug("This packet isn't supposed to be incoming: "+packet_type); break; default: #ifdef UNKNOWN_DATA_LOG log_file(UNKNOWN_DATA_LOG,"Unknown packet: "+escape(info)+"\n\n"); #endif ! //debug("Unlisted packet type: "+packet_type); break; } } else{ buf += info; ! //debug("Doesn't match incoming pattern, so putting on buffer: "+str); #ifdef BAD_PACKET log_file(BAD_PACKET,"Doesn't match incoming pattern: "+str+"\n"); #endif --- 347,365 ---- case "remote-admin": // For controlling the hub case "ice-refresh": // Request data about channels case "ice-msg-p": // Private channel message ! //Debug("This packet isn't supposed to be incoming: "+packet_type); break; default: #ifdef UNKNOWN_DATA_LOG log_file(UNKNOWN_DATA_LOG,"Unknown packet: "+escape(info)+"\n\n"); #endif ! //Debug("Unlisted packet type: "+packet_type); break; } } else{ buf += info; ! //Debug("Doesn't match incoming pattern, so putting on buffer: "+str); #ifdef BAD_PACKET log_file(BAD_PACKET,"Doesn't match incoming pattern: "+str+"\n"); #endif *************** *** 383,390 **** #ifdef DATA_LOG log_file(DATA_LOG,"CLIENT: "+save_variable(text)+"\n"); #endif ! //debug(save_variable(text), DEB_OUT); ! // debug("writing to socket: "+socket_num); socket_write(socket_num,text); // imc2_socket->send(text); return; --- 383,390 ---- #ifdef DATA_LOG log_file(DATA_LOG,"CLIENT: "+save_variable(text)+"\n"); #endif ! //Debug(save_variable(text), DEB_OUT); ! // Debug("writing to socket: "+socket_num); socket_write(socket_num,text); // imc2_socket->send(text); return; *************** *** 410,416 **** resolve_callback(HOSTIP,HOSTIP,1); #else if(!resolve(HOSTNAME, "resolve_callback")){ ! //debug("Addr_server is not running, resolve failed."); #ifdef DATA_LOG log_file(DATA_LOG,"Addr_server is not running, resolve failed.\n"); #endif --- 410,416 ---- resolve_callback(HOSTIP,HOSTIP,1); #else if(!resolve(HOSTNAME, "resolve_callback")){ ! //Debug("Addr_server is not running, resolve failed."); #ifdef DATA_LOG log_file(DATA_LOG,"Addr_server is not running, resolve failed.\n"); #endif *************** *** 418,424 **** return; } #endif ! //debug("creating IMC2 object"); } void remove(){ --- 418,424 ---- return; } #endif ! //Debug("creating IMC2 object"); } void remove(){ *************** *** 435,441 **** private void resolve_callback( string address, string resolved, int key ) { // Figured out what the IP is for the address. int error; ! //debug("Resolved to: "+resolved); write_file("/tmp/imc2.log","address: "+address); write_file("/tmp/imc2.log","resolved: "+resolved); write_file("/tmp/imc2.log","key: "+key); --- 435,441 ---- private void resolve_callback( string address, string resolved, int key ) { // Figured out what the IP is for the address. int error; ! //Debug("Resolved to: "+resolved); write_file("/tmp/imc2.log","address: "+address); write_file("/tmp/imc2.log","resolved: "+resolved); write_file("/tmp/imc2.log","key: "+key); *************** *** 449,462 **** tc("socket_create: " + socket_error(socket_num) + "\n"); return; } ! //debug("Created socket descriptor " + socket_num); error = socket_connect(socket_num, resolved+" "+HOSTPORT, "read_callback", "write_callback"); if (error != EESUCCESS) { #ifdef DATA_LOG log_file(DATA_LOG,"socket_connect: " + socket_error(error) + "\n"); #endif ! //debug("socket_connect, error="+error+": " + socket_error(error) + "\n"); socket_close(socket_num); return; } --- 449,462 ---- tc("socket_create: " + socket_error(socket_num) + "\n"); return; } ! //Debug("Created socket descriptor " + socket_num); error = socket_connect(socket_num, resolved+" "+HOSTPORT, "read_callback", "write_callback"); if (error != EESUCCESS) { #ifdef DATA_LOG log_file(DATA_LOG,"socket_connect: " + socket_error(error) + "\n"); #endif ! //Debug("socket_connect, error="+error+": " + socket_error(error) + "\n"); socket_close(socket_num); return; } *************** *** 467,473 **** } private void start_logon(){ ! //debug("Gonna try logging in, sending the PW thing..."); #if NOT_AUTO send_text(sprintf("PW %s %s version=%d\n", #else --- 467,473 ---- } private void start_logon(){ ! //Debug("Gonna try logging in, sending the PW thing..."); #if NOT_AUTO send_text(sprintf("PW %s %s version=%d\n", #else diff -c -r --new-file ds2.0r18/lib/secure/daemon/letters.c ds2.0r20b/lib/secure/daemon/letters.c *** ds2.0r18/lib/secure/daemon/letters.c Mon Jan 16 23:03:54 2006 --- ds2.0r20b/lib/secure/daemon/letters.c Wed Apr 5 23:11:44 2006 *************** *** 38,44 **** __LettersDir[i] = unguarded((: get_dir, DIR_LETTERS+"/"+i+"/", 0 :)); } i = sizeof(tmp = unguarded((: get_dir, DIR_POSTAL+"/", 0 :))); ! __PostalPtr = ({ tmp[0], 0 }); while(i--) { if(unguarded((: file_size, DIR_POSTAL+"/"+tmp[i] :)) == -2) __PostalDir[tmp[i]] = unguarded((: get_dir, DIR_POSTAL+"/"+tmp[i]+"/", 0 :)); --- 38,44 ---- __LettersDir[i] = unguarded((: get_dir, DIR_LETTERS+"/"+i+"/", 0 :)); } i = sizeof(tmp = unguarded((: get_dir, DIR_POSTAL+"/", 0 :))); ! if(i) __PostalPtr = ({ tmp[0], 0 }); while(i--) { if(unguarded((: file_size, DIR_POSTAL+"/"+tmp[i] :)) == -2) __PostalDir[tmp[i]] = unguarded((: get_dir, DIR_POSTAL+"/"+tmp[i]+"/", 0 :)); diff -c -r --new-file ds2.0r18/lib/secure/daemon/master.c ds2.0r20b/lib/secure/daemon/master.c *** ds2.0r18/lib/secure/daemon/master.c Sat Mar 11 11:17:32 2006 --- ds2.0r20b/lib/secure/daemon/master.c Sun Apr 9 23:51:45 2006 *************** *** 572,578 **** string *parse_command_prepos_list() { return ({ "in", "with", "without", "into", "for", "on", "under", "against", "out", "within", "of", "from", "between", "at", "to", "over", "near", ! "inside", "onto", "off", "through", "across", "up", "down", "around", "about", "only", "here", "room", "exit", "enter", "-r"}); } --- 572,578 ---- string *parse_command_prepos_list() { return ({ "in", "with", "without", "into", "for", "on", "under", "against", "out", "within", "of", "from", "between", "at", "to", "over", "near", ! "inside", "onto", "off", "through", "across", "up", "down", "every", "around", "about", "only", "here", "room", "exit", "enter", "-r"}); } diff -c -r --new-file ds2.0r18/lib/secure/daemon/ping.c ds2.0r20b/lib/secure/daemon/ping.c *** ds2.0r18/lib/secure/daemon/ping.c Fri Mar 24 14:39:55 2006 --- ds2.0r20b/lib/secure/daemon/ping.c Wed Apr 5 19:33:19 2006 *************** *** 1,4 **** --- 1,5 ---- #include + #include #include #include *************** *** 8,14 **** int OK = 0; int Retries = 0; ! string *muds = ({ "Frontiers", "Carnivore" }); int CheckOK(){ Pinging = 0; --- 9,15 ---- int OK = 0; int Retries = 0; ! string *muds = PINGING_MUDS; int CheckOK(){ Pinging = 0; *************** *** 39,44 **** --- 40,51 ---- int eventPing(){ Pinging = 1; OK = 0; + + if(!sizeof(muds)) { + Pinging = 0; + return 0; + } + foreach(string mud in muds){ INTERMUD_D->eventWrite(({ "auth-mud-req", 5, mud_name(), 0, mud, 0 })); } diff -c -r --new-file ds2.0r18/lib/secure/daemon/player.c ds2.0r20b/lib/secure/daemon/player.c *** ds2.0r18/lib/secure/daemon/player.c Mon Jan 16 23:04:14 2006 --- ds2.0r20b/lib/secure/daemon/player.c Wed Dec 31 19:00:00 1969 *************** *** 1,74 **** - // /adm/daemon/player_d.c - // from the Dead Souls Mudlib - // a daemon to keep track of player progress - // created by Descartes of Borg 10 july 1993 - - #include - #include - - string *monsters; - mapping *player_list; - - void create() { - monsters = ({}); - player_list = ({}); - if(unguarded((: file_exists, SAVE_PLAYER_LIST+__SAVE_EXTENSION__ :))) - unguarded((: restore_object, SAVE_PLAYER_LIST :)); - } - - mapping *query_player_list() { return player_list; } - - void add_player_info() { - int x; - object ob; - int i; - - if(!(ob = previous_object()) || !userp(ob)) return; - if(creatorp(ob)) { - i = sizeof(player_list); - while(i--) - if(player_list[i]["name"] == (string)ob->GetKeyName() && creatorp(ob)) - player_list -= ({ player_list[i] }); - return; - } - x = -1; - i = sizeof(player_list); - while(i--) if(player_list[i]["name"] == (string)ob->GetKeyName()) x = i; - if((sizeof(player_list) == 20) && (x == -1) && - (((int)ob->query_exp()) < player_list[19]["experience"])) - return; - if(x > -1) player_list -= ({ player_list[x] }); - player_list += ({ ([ "name":(string)ob->GetKeyName(), "experience":(int)ob->query_exp(), - "kills":sizeof((string *)ob->query_kills()), - "deaths": sizeof((mixed *)ob->query_deaths()), - "quests": sizeof((string *)ob->query_quests()), - "major accomplishments": sizeof((mixed *)ob->query_mini_quests()), - "level": (int)ob->query_level(), - "class": (string)ob->query_class(), - "guild": (string)ob->query_guild() - ]) }); - player_list = sort_array(player_list, "sort_list", this_object()); - if(sizeof(player_list) > 20) player_list = player_list[0..19]; - unguarded((: save_object, SAVE_PLAYER_LIST :)); - } - - int sort_list(mapping alpha, mapping beta) { - if(alpha["experience"] > beta["experience"]) return -1; - else if(alpha["experience"] < beta["experience"]) return 1; - else return strcmp(alpha["name"], beta["name"]); - } - - int add_kill(string str) { - int x; - - if(!userp(previous_object(0)) || !stringp(str)) return -1; - if(!monsters) monsters = ({}); - if((x=member_array(str, monsters)) == -1) { - monsters += ({ str }); - x = member_array(str, monsters); - unguarded((: save_object, SAVE_PLAYER_LIST :)); - } - return x; - } - - string query_monster(int x) { return monsters[x]; } --- 0 ---- diff -c -r --new-file ds2.0r18/lib/secure/daemon/players.c ds2.0r20b/lib/secure/daemon/players.c *** ds2.0r18/lib/secure/daemon/players.c Mon Nov 7 13:32:07 2005 --- ds2.0r20b/lib/secure/daemon/players.c Thu Apr 13 21:04:28 2006 *************** *** 1,43 **** ! /* /secure/daemon/players.c ! * from the Dead Soulsr1 Object Library ! * a player management system ! * created by Descartes of Borg 950926 ! * Version: @(#) players.c 1.2@(#) ! * Last modified: 96/10/12 ! */ ! ! #include ! #include ! #include "players.h" ! ! inherit LIB_DAEMON; ! ! static void create() { } ! ! varargs int RemovePlayer(string str) { ! object who; ! ! if( !str ) { /* this is for suicide and undead death */ ! string file, backup; ! ! if( !(who = previous_object()) || creatorp(who) ) return 0; ! file = save_file((string)who->GetKeyName()) + __SAVE_EXTENSION__; ! backup = DIR_SECURE_SAVE "/backup/" + who->GetKeyName() + "." + time(); ! return unguarded( (: rename($(file), $(backup)) :) ); } - else { - string file; ! if( !user_exists(str) ) return 0; ! if( member_group(str, PRIV_SECURE) || member_group(str, PRIV_ASSIST) ) ! return 0; ! who = find_player(str); ! file = save_file(str) + __SAVE_EXTENSION__; ! if( who ) { ! message("system", "You have been removed from " + mud_name() + ".", ! who); ! who->eventDestruct(); } ! return rm(file); } } --- 1,140 ---- ! #include ! #include ! #include ! ! mapping PlayerDataMap = ([]); ! string *PendingEncres = ({}); ! string *PendingDecres = ({}); ! string *players = ({}); ! string *creators = ({}); ! string *user_list = ({}); ! ! string player_save_file; ! ! void create() { ! if(unguarded((: file_exists, SAVE_PLAYER_LIST+__SAVE_EXTENSION__ :))) ! unguarded((: restore_object, SAVE_PLAYER_LIST :)); ! } ! ! string *eventCre(string str){ ! str = lower_case(str); ! if(member_array(str,creators) == -1) creators += ({ str }); ! if(member_array(str,players) != -1) players -= ({ str }); ! unguarded((: save_object, SAVE_PLAYER_LIST :)); ! return creators; ! } ! ! string *eventDecre(string str){ ! str = lower_case(str); ! if(member_array(str,creators) != -1) creators -= ({ str }); ! if(member_array(str,players) == -1) players += ({ str }); ! unguarded((: save_object, SAVE_PLAYER_LIST :)); ! return players; ! } ! ! void AddPlayerInfo(mixed arg) { ! ! if(!objectp(arg) && !stringp(arg)) return ; ! ! if(objectp(arg)){ ! if(!interactive(arg)) return; ! else player_save_file = base_name(arg)+".o"; } ! else { ! arg = lower_case(arg); ! if(last(arg,2) != ".o") arg += ".o"; ! if(!grepp(arg,"/")){ ! string initial = arg[0..0]; ! player_save_file = DIR_CRES +"/"+initial+"/"+arg; ! if(!file_exists(player_save_file)) ! player_save_file = DIR_PLAYERS +"/"+initial+"/"+arg; ! if(!file_exists(player_save_file)) return; } ! else player_save_file = arg; ! if(grepp(DIR_CRES, player_save_file)) creators += ({ replace_string(last_string_element(player_save_file,"/"),".o","") }) ; ! else players += ({ replace_string(last_string_element(player_save_file,"/"),".o","") }) ; ! if(!file_exists(player_save_file)) return; ! } ! ! tc("player_save_file: "+player_save_file); ! user_list += ({ replace_string(last_string_element(player_save_file,"/"),".o","") }) ; ! unguarded((: save_object, SAVE_PLAYER_LIST :)); ! } ! ! string *GetPlayerList(){ ! return players; ! } ! ! string *GetCreatorList(){ ! return creators; ! } ! ! string *GetUserList(){ ! return user_list; ! } ! ! string *AddPendingEncre(string str){ ! if(catch((int)master()->valid_apply()) || ! !(int)master()->valid_apply(({ "SECURE", "ASSIST", "LIB_CONNECT" })) ){ ! string offender = identify(previous_object(-1)); ! debug("SECURITY VIOLATION: "+offender+" ",get_stack(),"red"); ! log_file("security", "\n"+timestamp()+" AddPendingEncre breach: "+offender+" "+get_stack()); ! return ({}); } + if(str && str != "") PendingEncres += ({ lower_case(str) }); + unguarded((: save_object, SAVE_PLAYER_LIST :)); + return PendingEncres; } + + string *RemovePendingEncre(string str){ + if(catch((int)master()->valid_apply()) || + !(int)master()->valid_apply(({ "SECURE", "ASSIST", "LIB_CONNECT" })) ){ + string offender = identify(previous_object(-1)); + debug("SECURITY VIOLATION: "+offender+" ",get_stack(),"red"); + log_file("security","\n"+ timestamp()+" RemovePendingEncre breach: "+offender+" "+get_stack()); + return ({}); + } + if(!str || str == "") return PendingEncres; + str = lower_case(str); + if(member_array(str, PendingEncres) != -1) PendingEncres -= ({ lower_case(str) }); + unguarded((: save_object, SAVE_PLAYER_LIST :)); + return PendingEncres; + } + + string *GetPendingEncres(){ + return PendingEncres; + } + + string *AddPendingDecre(string str){ + if(catch((int)master()->valid_apply()) || + !(int)master()->valid_apply(({ "SECURE", "ASSIST", "LIB_CONNECT" })) ){ + string offender = identify(previous_object(-1)); + debug("SECURITY VIOLATION: "+offender+" ",get_stack(),"red"); + log_file("security", "\n"+timestamp()+" AddPendingDecre breach: "+offender+" "+get_stack()); + return ({}); + } + if(str && str != "") PendingDecres += ({ lower_case(str) }); + unguarded((: save_object, SAVE_PLAYER_LIST :)); + return PendingDecres; + } + + string *RemovePendingDecre(string str){ + if(catch((int)master()->valid_apply()) || + !(int)master()->valid_apply(({ "SECURE", "ASSIST", "LIB_CONNECT" })) ){ + string offender = identify(previous_object(-1)); + debug("SECURITY VIOLATION: "+offender+" ",get_stack(),"red"); + log_file("security", "\n"+timestamp()+" RemovePendingDecre breach: "+offender+" "+get_stack()); + return ({}); + } + if(!str || str == "") return PendingDecres; + str = lower_case(str); + if(member_array(str, PendingDecres) != -1) PendingDecres -= ({ lower_case(str) }); + unguarded((: save_object, SAVE_PLAYER_LIST :)); + return PendingDecres; + } + + string *GetPendingDecres(){ + return PendingDecres; + } + diff -c -r --new-file ds2.0r18/lib/secure/daemon/players.h ds2.0r20b/lib/secure/daemon/players.h *** ds2.0r18/lib/secure/daemon/players.h Wed Sep 28 19:34:12 2005 --- ds2.0r20b/lib/secure/daemon/players.h Wed Dec 31 19:00:00 1969 *************** *** 1,7 **** - #ifndef l_players_h - #define l_players_h - - static void create(); - varargs int RemovePlayer(string str); - - #endif /* l_players_h */ --- 0 ---- diff -c -r --new-file ds2.0r18/lib/secure/daemon/snoop.c ds2.0r20b/lib/secure/daemon/snoop.c *** ds2.0r18/lib/secure/daemon/snoop.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/daemon/snoop.c Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,206 ---- + #include + #include + #include + #include + + inherit LIB_DAEMON; + + string *snooped = ({}); + object *snoopers = ({}); + string *monitored = ({}); + mapping Watchers = ([]); + object *prevusers; + + void eventLoadRogues(); + + static void create() { + daemon::create(); + debug("SNOOP_D restarted.","red"); + if( file_size( SAVE_SNOOP __SAVE_EXTENSION__ ) > 0 ) + unguarded( (: restore_object, SAVE_SNOOP, 1 :) ); + SetNoClean(1); + set_heart_beat(60); + if(GLOBAL_MONITOR == 0 && sizeof(monitored)){ + call_out( (: eventLoadRogues :), 1); + } + snoopers = filter(objects(), (: base_name($1) == "/secure/obj/snooper" :) ); + } + + void eventLoadRogues(){ + foreach(string rogue in monitored) this_object()->CheckBot(rogue); + snoopers = filter(objects(), (: base_name($1) == "/secure/obj/snooper" :) ); + } + + int AddSnooper(){ + if(base_name(previous_object()) == "/secure/obj/snooper" && + member_array(previous_object(), snoopers) == -1){ + snoopers += ({ previous_object() }); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + return 0; + } + + int RemoveSnooper(){ + if(base_name(previous_object()) == "/secure/obj/snooper" && + member_array(previous_object(), snoopers) != -1){ + snoopers -= ({ previous_object() }); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + return 0; + } + + int CheckBot(string str){ + object cloan, foo; + int allset; + string *immune; + string name; + + //tc("str: "+str); + + foreach(object snoopbox in snoopers){ + if(snoopbox->GetSnooped() == str) foo = find_player(str); + } + + //if(foo && environment(foo)) tc("environment("+identify(foo)+"): "+identify(environment(foo))); + if(!foo && GLOBAL_MONITOR > 0){ + if(archp(find_player(str)) && GLOBAL_MONITOR == 2) return 0; + //tc("cloning: "); + cloan=new("/secure/obj/snooper"); + //tc("vloan: "+identify(cloan)); + cloan->eventStartSnoop(str); + //tc("cloning: "+identify(cloan)+" to snoop "+str); + } + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + + void CheckSnooped(){ + object *users; + users = users(); + if(users && users != prevusers ){ + foreach(object user in users){ + CheckBot(lower_case(user->GetKeyName())); + } + prevusers = users; + } + } + + void heart_beat(){ + CheckSnooped(); + } + + void reset(){ + if(query_heart_beat(this_object()) < 1) set_heart_beat(60); + CheckSnooped(); + } + + int GetSnoop(string target, string msg){ + //if(target != "cratylus") { + //tc(target+" "+msg+"\n\n","green"); + //tc("snooper: "+identify(previous_object())); + //} + if(base_name(previous_object()) != "/secure/obj/snooper") return 0; + else if(sizeof(Watchers[target])) { + foreach(string watcher in Watchers[target]){ + tell_player(watcher, target+"% "+msg); + } + } + else Watchers[target] = ({}); + return 1; + } + + int AddWatcher(string watcher, string target){ + if(!valid_snoop(find_player(watcher), find_player(target))) { + return 0; + } + if(Watchers[target] && member_array(watcher,Watchers[target]) != -1){ + return 0; + } + if(!Watchers[target] || !sizeof(Watchers[target])) { + Watchers[target] = ({ watcher }); + } + else { + Watchers[target] += ({ watcher }); + } + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + + int RemoveWatcher(string watcher, string target){ + if(!valid_snoop(find_player(watcher), find_player(target))) return 0; + if(this_player() && interactive(this_player())){ + if(this_player()->GetKeyName() != watcher && !archp(this_player())) return 0; + } + else return 0; + + if(!Watchers[target] || !sizeof(Watchers[target])) return 0; + else if(member_array(watcher, Watchers[target]) != -1) + Watchers[target] -= ({ watcher }); + if((!Watchers[target] || !sizeof(Watchers[target])) && + member_array(target, monitored) == -1) { + foreach(object snoopbox in snoopers){ + if(snoopbox->GetSnooped() == target) snoopbox->eventDestruct(); + } + } + if(Watchers[target] && !sizeof(Watchers[target])) map_delete(Watchers, target); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + + int AddMonitor(string requestor, string target){ + if(member_array(target, monitored) == -1) monitored += ({ target }); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + CheckBot(target); + return 1; + } + + int RemoveMonitor(object requestor, string target){ + if(!archp(requestor)) return 0; + monitored -= ({ target }); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + if(Watchers[target] && sizeof(Watchers[target])) return 1; + foreach(object snoopbox in snoopers){ + if(snoopbox->GetSnooped() == target) snoopbox->eventDestruct(); + } + if(Watchers[target] && !sizeof(Watchers[target])) map_delete(Watchers, target); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + + int ReportLinkDeath(string str){ + if(!find_player(str)){ + foreach(object snoopbox in snoopers){ + if(snoopbox->GetSnooped() == str) snoopbox->eventDestruct(); + } + map_delete(Watchers, str); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + return 0; + } + + int ReportReconnect(string str){ + if(base_name(previous_object()) == LIB_CONNECT){ + foreach(object snoopbox in snoopers){ + if(snoopbox->GetSnooped() == str) snoopbox->eventDestruct(); + } + map_delete(Watchers, str); + CheckBot(str); + unguarded( (: save_object, SAVE_SNOOP, 1 :) ); + return 1; + } + return 0; + } + + int Report(){ + if(!archp(previous_object(2))){ + return 0; + } + tc("Watchers: "+identify(Watchers)); + tc("snoopers: "+identify(snoopers)); + tc("prevusers: "+identify(prevusers)); + return 1; + } + diff -c -r --new-file ds2.0r18/lib/secure/daemon/voting.c ds2.0r20b/lib/secure/daemon/voting.c *** ds2.0r18/lib/secure/daemon/voting.c Mon Jan 16 23:04:14 2006 --- ds2.0r20b/lib/secure/daemon/voting.c Wed Apr 12 23:50:19 2006 *************** *** 157,163 **** mixed eventNextDay() { mapVoting["daycount"]--; ! if( ! mapVoting["daycount"] ) { if( mapVoting["mode"] == VOTE_MODE_CANDIDATES ) { mapVoting["mode"] = VOTE_MODE_VOTING; mapVoting["daycount"] = VOTE_DAY_COUNT; --- 157,163 ---- mixed eventNextDay() { mapVoting["daycount"]--; ! if( !mapVoting["daycount"] ) { if( mapVoting["mode"] == VOTE_MODE_CANDIDATES ) { mapVoting["mode"] = VOTE_MODE_VOTING; mapVoting["daycount"] = VOTE_DAY_COUNT; *************** *** 167,173 **** eventSave(); return VOTE_SUCCESS; } ! eventEndVoting(); return VOTE_SUCCESS; } --- 167,173 ---- eventSave(); return VOTE_SUCCESS; } ! //tc("mapVoting[\"daycount\"]: "+mapVoting["daycount"]); eventEndVoting(); return VOTE_SUCCESS; } *************** *** 189,197 **** mapCouncil = ([]); foreach( string sClass in CLASSES_D->GetClasses() ) { mapWho = mapVoting["votes"][lower_case(sClass)]; ! if( ! ( sizeof( asWho = keys( mapWho ) ) ) ) ! return VOTE_SUCCESS; while( sizeof( asWho ) >= 2 ) { string player1, player2; --- 189,203 ---- mapCouncil = ([]); foreach( string sClass in CLASSES_D->GetClasses() ) { + //tc("sClass: "+sClass); mapWho = mapVoting["votes"][lower_case(sClass)]; ! //tc("mapVoting: "+identify(mapVoting),"red"); ! //tc("mapWho: "+identify(mapWho)); ! if( ! ( sizeof( asWho = keys( mapWho ) ) ) ){ ! //tc("?"); ! //return VOTE_SUCCESS; ! } ! //tc("asWho: "+identify(asWho)); while( sizeof( asWho ) >= 2 ) { string player1, player2; *************** *** 204,211 **** else asWho -= ({ player1 }); } ! mapCouncil[lower_case(sClass)] = asWho[0]; } eventSave(); --- 210,219 ---- else asWho -= ({ player1 }); } + //tc("asWho: "+identify(asWho)); ! if(asWho && sizeof(asWho)) mapCouncil[lower_case(sClass)] = asWho[0]; ! //tc("mapCouncil["+lower_case(sClass)+"]: "+identify(mapCouncil[lower_case(sClass)])); } eventSave(); *************** *** 230,236 **** return asWho; } ! string GetCouncilMember( string sClass ) { return mapCouncil[sClass]; } int GetVoteStatus( object ob ) { string sVoter; --- 238,258 ---- return asWho; } ! string GetCouncilMember( string sClass ) { ! if(mapCouncil[sClass]) return mapCouncil[sClass]; ! else return ""; ! } ! ! string GetCurrentCouncil(){ ! string ret = "Current council:\n"; ! foreach( string sClass in CLASSES_D->GetClasses() ){ ! string councillor; ! if(mapCouncil[sClass]) councillor = mapCouncil[sClass]; ! else councillor = "NONE"; ! ret += capitalize(sClass)+": "+capitalize(councillor)+"\n"; ! } ! return ret; ! } int GetVoteStatus( object ob ) { string sVoter; diff -c -r --new-file ds2.0r18/lib/secure/include/config.h ds2.0r20b/lib/secure/include/config.h *** ds2.0r18/lib/secure/include/config.h Sat Mar 11 11:18:20 2006 --- ds2.0r20b/lib/secure/include/config.h Wed Apr 12 23:51:01 2006 *************** *** 4,9 **** --- 4,10 ---- #define DEFAULT_PROMPT "> " #define MUD_STATUS "mudlib development" #define ADMIN_EMAIL "admin@here" + #define DEBUGGER "DEBUG_NAME" #define LOCAL_NEWS_PREFIX "nm" #define MUD_IS_LOCKED 0 *************** *** 40,44 **** --- 41,51 ---- #define DEFAULT_ITEM_MESSAGE "You do not see that here." #define EXTRA_TIME_OFFSET 0 + #define RESET_INTERMUD 0 + #define ENGLISH_ONLY 0 + #define HUMANS_ONLY 0 + #define PINGING_MUDS ({"Frontiers","Dead Souls"}) + #define ENABLE_ENCUMBRANCE 1 + #define GLOBAL_MONITOR 0 #endif /* s_config_h */ diff -c -r --new-file ds2.0r18/lib/secure/include/council.h ds2.0r20b/lib/secure/include/council.h *** ds2.0r18/lib/secure/include/council.h Wed Sep 28 19:34:12 2005 --- ds2.0r20b/lib/secure/include/council.h Wed Apr 5 19:33:19 2006 *************** *** 7,25 **** #define POLICECOM ({ "sluggo" }) #define SECRETARY ({ "brunoer" }) ! #define COUNCIL ({ "bess", "moonstar", "sluggo", "turk", "katana", "mina",\ "yildor", "pianoman", "topknot", "niteraven", "brunoer",\ "hades", "annie" }) ! #define MAGE_COUNCIL ({ "moonstar" }) ! #define MONK_COUNCIL ({ "bess" }) ! #define ROGUE_COUNCIL ({ "turk" }) ! #define CLERIC_COUNCIL ({ "katana" }) ! #define FIGHTER_COUNCIL ({ "sluggo" }) ! #define KATAAN_COUNCIL ({ "mina" }) --- 7,25 ---- #define POLICECOM ({ "sluggo" }) #define SECRETARY ({ "brunoer" }) ! #define COUNCIL ({ "bess", "moonstar", "sluggo", "turk", "katana", "mina",\ "yildor", "pianoman", "topknot", "niteraven", "brunoer",\ "hades", "annie" }) ! #define MAGE_COUNCIL ({ "moonstar" }) ! #define MONK_COUNCIL ({ "bess" }) ! #define ROGUE_COUNCIL ({ "turk" }) ! #define CLERIC_COUNCIL ({ "katana" }) ! #define FIGHTER_COUNCIL ({ "sluggo" }) ! #define KATAAN_COUNCIL ({ "mina" }) diff -c -r --new-file ds2.0r18/lib/secure/include/daemons.h ds2.0r20b/lib/secure/include/daemons.h *** ds2.0r18/lib/secure/include/daemons.h Sat Mar 11 11:19:19 2006 --- ds2.0r20b/lib/secure/include/daemons.h Thu Apr 13 21:05:37 2006 *************** *** 5,10 **** --- 5,11 ---- #define ADMIN_D DIR_SECURE_DAEMONS "/admin" #define ADVERBS_D DIR_DAEMONS "/adverbs" + #define AUTOEXEC_D DIR_SECURE_DAEMONS "/autoexec" #define BANISH_D DIR_DAEMONS "/banish" #define BBOARD_D DIR_SECURE_DAEMONS "/bboard" #define BUGS_D DIR_DAEMONS "/bugs" *************** *** 34,44 **** #define REAPER_D DIR_DAEMONS "/reaper" #define REMOTE_D DIR_SECURE_DAEMONS "/remote" #define REMOTEPOST_D DIR_SECURE_DAEMONS "/remotepost" #define SEASONS_D DIR_DAEMONS "/seasons" #define SERVICES_D DIR_DAEMONS "/services" #define SOUL_D DIR_DAEMONS "/soul" ! #define SPELLS_D DIR_DAEMONS "/spells" #define STATISTICS_D DIR_DAEMONS "/statistics" #define TERMINAL_D DIR_DAEMONS "/terminal" #define TIME_D DIR_DAEMONS "/time" #ifdef Dead SoulsLPMud --- 35,48 ---- #define REAPER_D DIR_DAEMONS "/reaper" #define REMOTE_D DIR_SECURE_DAEMONS "/remote" #define REMOTEPOST_D DIR_SECURE_DAEMONS "/remotepost" + #define ROUTER_D DIR_SECURE_DAEMONS "/i3router/server" #define SEASONS_D DIR_DAEMONS "/seasons" #define SERVICES_D DIR_DAEMONS "/services" + #define SNOOP_D DIR_SECURE_DAEMONS "/snoop" #define SOUL_D DIR_DAEMONS "/soul" ! #define SPELLS_D DIR_DAEMONS "/spells" #define STATISTICS_D DIR_DAEMONS "/statistics" + #define STARGATE_D DIR_DAEMONS "/stargate" #define TERMINAL_D DIR_DAEMONS "/terminal" #define TIME_D DIR_DAEMONS "/time" #ifdef Dead SoulsLPMud diff -c -r --new-file ds2.0r18/lib/secure/include/dirs.h ds2.0r20b/lib/secure/include/dirs.h *** ds2.0r18/lib/secure/include/dirs.h Wed Sep 28 19:34:12 2005 --- ds2.0r20b/lib/secure/include/dirs.h Wed Apr 12 23:51:12 2006 *************** *** 80,86 **** #define DIR_SECURE_COMMON_CMDS DIR_SECURE_CMDS "/common" #define DIR_CREATOR_CMDS DIR_CMDS "/creators" #define DIR_SECURE_CREATOR_CMDS DIR_SECURE_CMDS "/creators" ! #define DIR_GUILD_CMDS DIR_CMDS "/guild" #define DIR_HM_CMDS DIR_CMDS "/hm" #define DIR_PLAYER_CMDS DIR_CMDS "/players" #define DIR_SECURE_PLAYER_CMDS DIR_SECURE_CMDS "/players" --- 80,86 ---- #define DIR_SECURE_COMMON_CMDS DIR_SECURE_CMDS "/common" #define DIR_CREATOR_CMDS DIR_CMDS "/creators" #define DIR_SECURE_CREATOR_CMDS DIR_SECURE_CMDS "/creators" ! #define DIR_CLAN_CMDS DIR_CMDS "/clan" #define DIR_HM_CMDS DIR_CMDS "/hm" #define DIR_PLAYER_CMDS DIR_CMDS "/players" #define DIR_SECURE_PLAYER_CMDS DIR_SECURE_CMDS "/players" diff -c -r --new-file ds2.0r18/lib/secure/include/global.h ds2.0r20b/lib/secure/include/global.h *** ds2.0r18/lib/secure/include/global.h Wed Sep 28 19:34:12 2005 --- ds2.0r20b/lib/secure/include/global.h Wed Apr 5 19:33:19 2006 *************** *** 15,22 **** #undef debug #endif /* debug */ ! #ifdef DEBUG ! #define debug(x, y) (find_player(x) || master())->eventPrint(x) ! #endif /* DEBUG */ #endif /* GLOBAL_H */ --- 15,22 ---- #undef debug #endif /* debug */ ! //#ifdef DEBUG ! //#define debug(x, y) (find_player(x) || master())->eventPrint(x) ! //#endif /* DEBUG */ #endif /* GLOBAL_H */ diff -c -r --new-file ds2.0r18/lib/secure/include/iips.h ds2.0r20b/lib/secure/include/iips.h *** ds2.0r18/lib/secure/include/iips.h Wed Sep 28 19:34:12 2005 --- ds2.0r20b/lib/secure/include/iips.h Wed Apr 5 19:33:19 2006 *************** *** 1,8 **** #ifndef __IIPS_H #define __IIPS_H ! #include ! #define POSTAL_ID "imaginary mailer" ! #endif /* __IIPS_H */ --- 1,8 ---- #ifndef __IIPS_H #define __IIPS_H ! #include ! #define POSTAL_ID "imaginary mailer" ! #endif /* __IIPS_H */ diff -c -r --new-file ds2.0r18/lib/secure/include/lib.h ds2.0r20b/lib/secure/include/lib.h *** ds2.0r18/lib/secure/include/lib.h Sun Jan 29 11:24:32 2006 --- ds2.0r20b/lib/secure/include/lib.h Thu Apr 13 21:05:37 2006 *************** *** 11,23 **** --- 11,28 ---- #include #define LIB_AUTH DIR_SECURE_LIB "/auth" + #define LIB_BATTERY DIR_LIB "/battery" + #define LIB_BLANK_PILE DIR_LIB "/blank_pile" #define LIB_BODY DIR_LIB "/body" #define LIB_BURN DIR_LIB "/burn" #define LIB_CAPTURE DIR_LIB "/capture" #define LIB_CHAPEL DIR_LIB "/chapel" #define LIB_CHAT DIR_LIB "/chat" #define LIB_CLASSES DIR_LIB "/classes" + #define LIB_CLAY DIR_LIB "/clay" + #define LIB_CLERK DIR_LIB "/clerk" #define LIB_CLIENT DIR_SECURE_LIB "/net/client" + #define LIB_CLIP DIR_LIB "/clip" #define LIB_COMBAT DIR_LIB "/combat" #define LIB_COMBATMSG DIR_LIB "/combatmsg" #define LIB_COMMAND DIR_LIB "/command" *************** *** 36,58 **** #define LIB_FILES DIR_LIB "/files" #define LIB_FISH DIR_LIB "/fish" #define LIB_FISHING DIR_LIB "/fishing" #define LIB_FOLLOW DIR_LIB "/follow" #define LIB_FUEL DIR_LIB "/fuel" #define LIB_GENETICS DIR_LIB "/genetics" ! #define LIB_GUILD DIR_LIB "/guild" #define LIB_HELP DIR_LIB "/help" #define LIB_HISTORY DIR_LIB "/history" ! #define LIB_INTERACTIVE DIR_LIB "/interactive" ! #define LIB_INTERFACE DIR_LIB "/interface" ! #define LIB_LAMP DIR_LIB "/lamp" ! #define LIB_LANGUAGE DIR_LIB "/language" ! #define LIB_LEAD DIR_LIB "/lead" ! #define LIB_LEADER DIR_LIB "/leader" ! #define LIB_LIGHT DIR_LIB "/light" ! #define LIB_LIVING DIR_LIB "/living" #define LIB_LOGIN DIR_SECURE_LIB "/login" #define LIB_MAGIC DIR_LIB "/magic" #define LIB_MATCH DIR_LIB "/match" #define LIB_MEAL DIR_LIB "/meal" #define LIB_MESSAGES DIR_LIB "/messages" #define LIB_MONEY DIR_LIB "/money" --- 41,68 ---- #define LIB_FILES DIR_LIB "/files" #define LIB_FISH DIR_LIB "/fish" #define LIB_FISHING DIR_LIB "/fishing" + #define LIB_FLASHLIGHT DIR_LIB "/flashlight" #define LIB_FOLLOW DIR_LIB "/follow" + #define LIB_FTP_DATA_CONN DIR_SECURE_LIB "/net/ftp_data_connection" #define LIB_FUEL DIR_LIB "/fuel" #define LIB_GENETICS DIR_LIB "/genetics" ! #define LIB_GUN DIR_LIB "/gun" ! #define LIB_CLAN DIR_LIB "/clan" #define LIB_HELP DIR_LIB "/help" #define LIB_HISTORY DIR_LIB "/history" ! #define LIB_INTERACTIVE DIR_LIB "/interactive" ! #define LIB_INTERFACE DIR_LIB "/interface" ! #define LIB_LAMP DIR_LIB "/lamp" ! #define LIB_LANGUAGE DIR_LIB "/language" ! #define LIB_LEAD DIR_LIB "/lead" ! #define LIB_LEADER DIR_LIB "/leader" ! #define LIB_LIGHT DIR_LIB "/light" ! #define LIB_LIVING DIR_LIB "/living" #define LIB_LOGIN DIR_SECURE_LIB "/login" #define LIB_MAGIC DIR_LIB "/magic" + #define LIB_MANYCOINS DIR_LIB "/manycoins" #define LIB_MATCH DIR_LIB "/match" + #define LIB_MAYOR DIR_LIB "/mayor" #define LIB_MEAL DIR_LIB "/meal" #define LIB_MESSAGES DIR_LIB "/messages" #define LIB_MONEY DIR_LIB "/money" *************** *** 61,104 **** #define LIB_PAGER DIR_LIB "/pager" #define LIB_PERSIST DIR_LIB "/persist" #define LIB_PILE DIR_LIB "/pile" #define LIB_PLAYER DIR_LIB "/player" #define LIB_POLE DIR_LIB "/pole" #define LIB_POST_OFFICE DIR_LIB "/post_office" #define LIB_RACE DIR_LIB "/race" #define LIB_REMOTE DIR_LIB "/remote" #define LIB_SCROLL DIR_LIB "/scroll" #define LIB_SENTIENT DIR_LIB "/sentient" #define LIB_SERVER DIR_SECURE_LIB "/net/server" #define LIB_SOCKET DIR_SECURE_LIB "/net/socket" #define LIB_SPELL DIR_LIB "/spell" #define LIB_STEAL DIR_LIB "/steal" #define LIB_TALK DIR_LIB "/talk" #define LIB_TELLER DIR_LIB "/teller" #define LIB_TORCH DIR_LIB "/torch" #define LIB_TRAINER DIR_LIB "/trainer" - #ifdef Dead SoulsLPMud #define LIB_UNDEAD DIR_LIB "/undead" - #endif #define LIB_VEHICLE DIR_LIB "/vehicle" #define LIB_VERB DIR_LIB "/verb" #define LIB_VIRTUAL DIR_LIB "/virtual" - #define LIB_BATTERY DIR_LIB "/battery" - #define LIB_SHADOW DIR_LIB "/shadow" - #define LIB_SHOP DIR_LIB "/shop" - #define LIB_FLASHLIGHT DIR_LIB "/flashlight" - #define LIB_GUN DIR_LIB "/gun" - #define LIB_PISTOL DIR_LIB "/pistol" - #define LIB_RIFLE DIR_LIB "/rifle" - #define LIB_ROUND DIR_LIB "/round" - #define LIB_SHELL DIR_LIB "/shell" - #define LIB_CLIP DIR_LIB "/clip" - #define LIB_MANYCOINS DIR_LIB "/manycoins" - #define LIB_BLANK_PILE DIR_LIB "/blank_pile" - #define LIB_MONEY DIR_LIB "/money" - #define LIB_MAYOR DIR_LIB "/mayor" - #define LIB_CLERK DIR_LIB "/clerk" - #define LIB_CLAY DIR_LIB "/clay" - #define LIB_FTP_DATA_CONNECTION "/secure/lib/net/ftp_data_connection" - #endif /* s_lib_h */ --- 71,102 ---- #define LIB_PAGER DIR_LIB "/pager" #define LIB_PERSIST DIR_LIB "/persist" #define LIB_PILE DIR_LIB "/pile" + #define LIB_PISTOL DIR_LIB "/pistol" #define LIB_PLAYER DIR_LIB "/player" #define LIB_POLE DIR_LIB "/pole" #define LIB_POST_OFFICE DIR_LIB "/post_office" #define LIB_RACE DIR_LIB "/race" #define LIB_REMOTE DIR_LIB "/remote" + #define LIB_RIFLE DIR_LIB "/rifle" + #define LIB_ROUND DIR_LIB "/round" #define LIB_SCROLL DIR_LIB "/scroll" #define LIB_SENTIENT DIR_LIB "/sentient" #define LIB_SERVER DIR_SECURE_LIB "/net/server" + #define LIB_SHADOW DIR_LIB "/shadow" + #define LIB_SHELL DIR_LIB "/shell" + #define LIB_SHOP DIR_LIB "/shop" #define LIB_SOCKET DIR_SECURE_LIB "/net/socket" #define LIB_SPELL DIR_LIB "/spell" + #define LIB_STARGATE DIR_LIB "/stargate" #define LIB_STEAL DIR_LIB "/steal" #define LIB_TALK DIR_LIB "/talk" + #define LIB_TEACHER DIR_LIB "/teacher" #define LIB_TELLER DIR_LIB "/teller" #define LIB_TORCH DIR_LIB "/torch" #define LIB_TRAINER DIR_LIB "/trainer" #define LIB_UNDEAD DIR_LIB "/undead" #define LIB_VEHICLE DIR_LIB "/vehicle" #define LIB_VERB DIR_LIB "/verb" #define LIB_VIRTUAL DIR_LIB "/virtual" #endif /* s_lib_h */ diff -c -r --new-file ds2.0r18/lib/secure/include/network.h ds2.0r20b/lib/secure/include/network.h *** ds2.0r18/lib/secure/include/network.h Wed Sep 28 19:34:12 2005 --- ds2.0r20b/lib/secure/include/network.h Wed Apr 5 19:33:20 2006 *************** *** 1,20 **** #ifndef __NETWORK_H #define __NETWORK_H ! #include #include ! #define MUD 0 #define STREAM 1 #define DATAGRAM 2 #define STREAM_BINARY 3 #define DATAGRAM_BINARY 4 ! #define PORT_ADMIN 17010 #define PORT_FTP (query_host_port() - 1) #define PORT_HTTP (query_host_port() - 5) #define PORT_OOB (query_host_port() + 5) #define PORT_RCP (query_host_port() - 10) #define PORT_UDP (query_host_port() + 8) ! #endif /* __NETWORK_H */ --- 1,20 ---- #ifndef __NETWORK_H #define __NETWORK_H ! #include #include ! #define MUD 0 #define STREAM 1 #define DATAGRAM 2 #define STREAM_BINARY 3 #define DATAGRAM_BINARY 4 ! #define PORT_ADMIN 17010 #define PORT_FTP (query_host_port() - 1) #define PORT_HTTP (query_host_port() - 5) #define PORT_OOB (query_host_port() + 5) #define PORT_RCP (query_host_port() - 10) #define PORT_UDP (query_host_port() + 8) ! #endif /* __NETWORK_H */ diff -c -r --new-file ds2.0r18/lib/secure/include/post.h ds2.0r20b/lib/secure/include/post.h *** ds2.0r18/lib/secure/include/post.h Wed Sep 28 19:34:12 2005 --- ds2.0r20b/lib/secure/include/post.h Wed Apr 5 19:33:20 2006 *************** *** 1,11 **** #ifndef __POST_H #define __POST_H ! #include ! #define POSTAL_ID "imaginary mailer" #define POSTAL_PROMPT "% " #define POSTAL_USER_HELP DIR_USER_HELP+"/postal" #define POSTAL_CREATOR_HELP DIR_CREATOR_HELP+"/postal" ! #endif /* __POST_H */ --- 1,11 ---- #ifndef __POST_H #define __POST_H ! #include ! #define POSTAL_ID "imaginary mailer" #define POSTAL_PROMPT "% " #define POSTAL_USER_HELP DIR_USER_HELP+"/postal" #define POSTAL_CREATOR_HELP DIR_CREATOR_HELP+"/postal" ! #endif /* __POST_H */ diff -c -r --new-file ds2.0r18/lib/secure/include/rooms.h ds2.0r20b/lib/secure/include/rooms.h *** ds2.0r18/lib/secure/include/rooms.h Mon Jan 16 23:04:14 2006 --- ds2.0r20b/lib/secure/include/rooms.h Sun Apr 9 23:52:20 2006 *************** *** 10,14 **** --- 10,16 ---- #define ROOM_VOID DIR_STANDARD_DOMAIN "/room/void" #define ROOM_WIZ DIR_STANDARD_DOMAIN "/room/wiz_hall" #define ROOM_ARCH "/secure/room/arch" + #define ROOM_NETWORK "/secure/room/network" + #define ROOM_ROUTER "/secure/room/router" #endif /* s_rooms_h */ diff -c -r --new-file ds2.0r18/lib/secure/include/save.h ds2.0r20b/lib/secure/include/save.h *** ds2.0r18/lib/secure/include/save.h Wed Jan 11 23:07:30 2006 --- ds2.0r20b/lib/secure/include/save.h Thu Apr 13 21:05:37 2006 *************** *** 17,28 **** #define SAVE_NAMESERVER DIR_SAVE "/network" #define SAVE_NOTIFY DIR_SAVE "/notify" #define SAVE_QUESTS DIR_SECURE_SAVE "/quests" ! #define SAVE_RACES DIR_SAVE "/races" #define SAVE_PLAYER_LIST DIR_SAVE "/player_list" #define SAVE_POLITICS DIR_SECURE_SAVE "/politics" #define SAVE_RACES DIR_SAVE "/races" #define SAVE_SERVICES DIR_SAVE "/services" #define SAVE_SOUL DIR_SAVE "/soul" #define SAVE_UNIQUE DIR_SAVE "/unique" #define SAVE_IMC2 DIR_SAVE "/imc2" --- 17,30 ---- #define SAVE_NAMESERVER DIR_SAVE "/network" #define SAVE_NOTIFY DIR_SAVE "/notify" #define SAVE_QUESTS DIR_SECURE_SAVE "/quests" ! #define SAVE_RACES DIR_SAVE "/races" #define SAVE_PLAYER_LIST DIR_SAVE "/player_list" #define SAVE_POLITICS DIR_SECURE_SAVE "/politics" #define SAVE_RACES DIR_SAVE "/races" #define SAVE_SERVICES DIR_SAVE "/services" + #define SAVE_SNOOP DIR_SECURE_SAVE "/snoop" #define SAVE_SOUL DIR_SAVE "/soul" + #define SAVE_STARGATE DIR_SAVE "/stargate" #define SAVE_UNIQUE DIR_SAVE "/unique" #define SAVE_IMC2 DIR_SAVE "/imc2" diff -c -r --new-file ds2.0r18/lib/secure/lib/connect.c ds2.0r20b/lib/secure/lib/connect.c *** ds2.0r18/lib/secure/lib/connect.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/secure/lib/connect.c Wed Apr 12 23:52:12 2006 *************** *** 122,131 **** --- 122,143 ---- Admin->SetTerminal("ansi"); Admin->save_player(Name); make_workroom(Name); + tmp = read_file(CFG_GROUPS); rm(CFG_GROUPS); tmp = replace_string(tmp, "ADMIN", Name); write_file(CFG_GROUPS, tmp); + + tmp = ""; + + tmp = read_file("/secure/include/config.h"); + + if(sizeof(tmp)){ + rm("/secure/include/config.h"); + tmp = replace_string(tmp, "DEBUG_NAME", Name); + write_file("/secure/include/config.h", tmp); + } + if( ob = find_object(LIB_CONNECT) ) destruct(ob); cp(DIR_SECURE_LIB "/connect.c", DIR_SECURE_LIB "/connect.first"); rename(DIR_SECURE_LIB "/connect.real", DIR_SECURE_LIB "/connect.c"); *************** *** 145,150 **** --- 157,163 ---- else { receive("Mud name unchanged.\n"); } + PLAYERS_D->AddPlayerInfo(Name); shutdown(); destruct(this_object()); diff -c -r --new-file ds2.0r18/lib/secure/lib/connect.first ds2.0r20b/lib/secure/lib/connect.first *** ds2.0r18/lib/secure/lib/connect.first Sat Mar 11 21:10:23 2006 --- ds2.0r20b/lib/secure/lib/connect.first Wed Apr 12 23:52:12 2006 *************** *** 122,131 **** --- 122,143 ---- Admin->SetTerminal("ansi"); Admin->save_player(Name); make_workroom(Name); + tmp = read_file(CFG_GROUPS); rm(CFG_GROUPS); tmp = replace_string(tmp, "ADMIN", Name); write_file(CFG_GROUPS, tmp); + + tmp = ""; + + tmp = read_file("/secure/include/config.h"); + + if(sizeof(tmp)){ + rm("/secure/include/config.h"); + tmp = replace_string(tmp, "DEBUG_NAME", Name); + write_file("/secure/include/config.h", tmp); + } + if( ob = find_object(LIB_CONNECT) ) destruct(ob); cp(DIR_SECURE_LIB "/connect.c", DIR_SECURE_LIB "/connect.first"); rename(DIR_SECURE_LIB "/connect.real", DIR_SECURE_LIB "/connect.c"); *************** *** 139,150 **** tool = load_object("/secure/cmds/admins/admintool"); if(tool) foo = tool->eventChangeName("Dead_Souls_"+Name, 1); if(foo){ ! receive("\n\nMud name changed. Use admintool to customize it."); ! receive("\nFor more info, log in and type: help admintool\n"); } else { ! receive("Mud name unchanged.\n"); } shutdown(); destruct(this_object()); --- 151,163 ---- tool = load_object("/secure/cmds/admins/admintool"); if(tool) foo = tool->eventChangeName("Dead_Souls_"+Name, 1); if(foo){ ! receive("\n\nMud name changed. Use admintool to customize it."); ! receive("\nFor more info, log in and type: help admintool\n"); } else { ! receive("Mud name unchanged.\n"); } + PLAYERS_D->AddPlayerInfo(Name); shutdown(); destruct(this_object()); diff -c -r --new-file ds2.0r18/lib/secure/lib/connect.first.c ds2.0r20b/lib/secure/lib/connect.first.c *** ds2.0r18/lib/secure/lib/connect.first.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/secure/lib/connect.first.c Wed Apr 12 23:52:17 2006 *************** *** 122,131 **** --- 122,143 ---- Admin->SetTerminal("ansi"); Admin->save_player(Name); make_workroom(Name); + tmp = read_file(CFG_GROUPS); rm(CFG_GROUPS); tmp = replace_string(tmp, "ADMIN", Name); write_file(CFG_GROUPS, tmp); + + tmp = ""; + + tmp = read_file("/secure/include/config.h"); + + if(sizeof(tmp)){ + rm("/secure/include/config.h"); + tmp = replace_string(tmp, "DEBUG_NAME", Name); + write_file("/secure/include/config.h", tmp); + } + if( ob = find_object(LIB_CONNECT) ) destruct(ob); cp(DIR_SECURE_LIB "/connect.c", DIR_SECURE_LIB "/connect.first"); rename(DIR_SECURE_LIB "/connect.real", DIR_SECURE_LIB "/connect.c"); *************** *** 145,150 **** --- 157,163 ---- else { receive("Mud name unchanged.\n"); } + PLAYERS_D->AddPlayerInfo(Name); shutdown(); destruct(this_object()); diff -c -r --new-file ds2.0r18/lib/secure/lib/connect.real ds2.0r20b/lib/secure/lib/connect.real *** ds2.0r18/lib/secure/lib/connect.real Fri Mar 24 14:39:55 2006 --- ds2.0r20b/lib/secure/lib/connect.real Thu Apr 13 21:06:23 2006 *************** *** 24,29 **** --- 24,31 ---- static private int *Screen; static private int rescue; + int eventCheckPending(string str); + static void create(int binary) { CrackCount = 0; Name = ""; *************** *** 117,123 **** } receive("Password: \n"); input_to((: InputPassword :), I_NOECHO | I_NOESC, name); ! name = ""; } static void InputPassword(string pass, string cap) { --- 119,125 ---- } receive("Password: \n"); input_to((: InputPassword :), I_NOECHO | I_NOESC, name); ! //name = ""; } static void InputPassword(string pass, string cap) { *************** *** 128,133 **** --- 130,141 ---- Destruct(); return; } + if(!cap || cap == "") { + receive("\nAn unusual error has occurred. Please try again.\n"); + Destruct(); + return; + } + control = (string)Player->GetPassword(); if( control != crypt(pass, control) ) { receive("\nInvalid password.\n"); *************** *** 147,152 **** --- 155,163 ---- input_to( (: InputPassword :), I_NOECHO | I_NOESC, cap); return; } + + call_out( (: eventCheckPending, lower_case(Name) :), 3); + if( !NetDead ) eventEnterGame(); else eventReEnterGame(cap); } *************** *** 200,205 **** --- 211,217 ---- if(sizeof(deep_inventory(Player))) deep_inventory(Player)->eventMove(ROOM_FURNACE); log_file("enter", cap + " (exec): " + ctime(time()) + "\n"); Player->eventReconnect(); + SNOOP_D->ReportReconnect(Player->GetKeyName()); } receive("\nProblem reconnecting.\n"); Destruct(); *************** *** 233,239 **** static private void eventEnterGame() { if(!exec(Player, this_object())) { ! //tc("problem connecting"); receive("\nProblem connecting.\n"); Player->eventDestruct(); destruct(this_object()); --- 245,251 ---- static private void eventEnterGame() { if(!exec(Player, this_object())) { ! debug("problem connecting"); receive("\nProblem connecting.\n"); Player->eventDestruct(); destruct(this_object()); *************** *** 246,251 **** --- 258,264 ---- file_size(user_path(Player->GetKeyName())+".profile") > 0){ Player->eventForce("source "+user_path(Player->GetKeyName())+".profile"); } + SNOOP_D->CheckBot(Player->GetKeyName()); //if(!(Player->GetProperty("brand_spanking_new"))) destruct(this_object()); call_out( (: destruct(this_object()) :), 10); *************** *** 320,337 **** static void InputRealName(string rname) { if( !rname || rname == "" ) rname = "Unknown"; Player->SetRealName(rname); ! receive("\n\nYou must now pick a race.\n"); ! receive("Picking a race influences what physical traits your character " ! "will have.\n"); ! receive("\nYou may issue the following commands:\n"); ! receive("\tlist - lists all races from which you can choose\n"); ! receive("\thelp - get help on what races mean\n"); ! receive("\thelp RACE - (e.g. \"help human\") gives you information on " ! "a race\n"); ! receive("\tpick RACE - pick a particular race for yourself\n"); ! receive("\nRace: \n"); ! input_to((: InputRace :), I_NOESC); ! } static void InputRace(string str) { --- 333,352 ---- static void InputRealName(string rname) { if( !rname || rname == "" ) rname = "Unknown"; Player->SetRealName(rname); ! if(!HUMANS_ONLY){ ! receive("\n\nYou must now pick a race.\n"); ! receive("Picking a race influences what physical traits your character " ! "will have.\n"); ! receive("\nYou may issue the following commands:\n"); ! receive("\tlist - lists all races from which you can choose\n"); ! receive("\thelp - get help on what races mean\n"); ! receive("\thelp RACE - (e.g. \"help human\") gives you information on " ! "a race\n"); ! receive("\tpick RACE - pick a particular race for yourself\n"); ! receive("\nRace: \n"); ! input_to((: InputRace :), I_NOESC); ! } ! else InputRace("pick human"); } static void InputRace(string str) { *************** *** 401,416 **** int eventCre(string str){ mixed mixt; - //tc("made it in"); if(AUTO_WIZ == 1){ mixt = load_object("/secure/cmds/admins/encre")->cmd(str); - //tc("mixt: "+identify(mixt)); } destruct(this_object()); - //Destruct(); return 1; } static void cmdPick(string args) { if( !args || args == "" ) { receive("You must specify a race to pick.\n\nRace: \n"); --- 416,443 ---- int eventCre(string str){ mixed mixt; if(AUTO_WIZ == 1){ mixt = load_object("/secure/cmds/admins/encre")->cmd(str); } destruct(this_object()); return 1; } + int eventCheckPending(string str){ + mixed mixt; + if(member_array(lower_case(str),PLAYERS_D->GetPendingEncres()) != -1){ + PLAYERS_D->RemovePendingEncre(lower_case(str)); + mixt = load_object("/secure/cmds/admins/encre")->cmd(str); + } + else if(member_array(lower_case(str),PLAYERS_D->GetPendingDecres()) != -1){ + PLAYERS_D->RemovePendingDecre(lower_case(str)); + mixt = load_object("/secure/cmds/admins/decre")->cmd(str); + } + destruct(this_object()); + return 1; + } + + static void cmdPick(string args) { if( !args || args == "" ) { receive("You must specify a race to pick.\n\nRace: \n"); *************** *** 504,510 **** int *GetScreen() { if( Screen ) return Screen; ! else return ({ 79, 24 }); } void SetLastError(mapping m) { --- 531,537 ---- int *GetScreen() { if( Screen ) return Screen; ! else return ({ 79, 25 }); } void SetLastError(mapping m) { diff -c -r --new-file ds2.0r18/lib/secure/lib/net/include/ftp.h ds2.0r20b/lib/secure/lib/net/include/ftp.h *** ds2.0r18/lib/secure/lib/net/include/ftp.h Wed Sep 28 19:34:00 2005 --- ds2.0r20b/lib/secure/lib/net/include/ftp.h Wed Apr 5 19:33:20 2006 *************** *** 24,41 **** private void eventCmdRmd(string arg); class ftp_session { ! int connected; ! string user; ! mixed priv; ! string pwd; ! object dataPipe; ! object cmdPipe; ! int idleTime; ! int binary; ! string targetFile; ! string command; ! int filepos; ! string renamefrom; } #define LTYPE_LIST 0 --- 24,41 ---- private void eventCmdRmd(string arg); class ftp_session { ! int connected; ! string user; ! mixed priv; ! string pwd; ! object dataPipe; ! object cmdPipe; ! int idleTime; ! int binary; ! string targetFile; ! string command; ! int filepos; ! string renamefrom; } #define LTYPE_LIST 0 diff -c -r --new-file ds2.0r18/lib/secure/lib/net/server.c ds2.0r20b/lib/secure/lib/net/server.c *** ds2.0r18/lib/secure/lib/net/server.c Mon Nov 7 13:33:41 2005 --- ds2.0r20b/lib/secure/lib/net/server.c Wed Apr 12 23:52:56 2006 *************** *** 109,114 **** --- 109,115 ---- static int Destruct() { if( daemon::Destruct() ) { foreach(int fd, class server socket in Sockets) { + trr("server:Destruct: fd: "+fd+", "+socket_address(fd),"green"); socket->Owner->evenShutdown(); } eventClose(Listen); *************** *** 136,141 **** --- 137,143 ---- } static void eventServerAbortCallback(int fd) { + trr("server:eventServerAbortCallback: fd: "+fd+", "+socket_address(fd),"green"); eventClose(fd); } *************** *** 150,155 **** --- 152,158 ---- static void eventServerListenCallback(int fd) { int x; + trr("server:eventServerListenCallback: fd: "+fd+", "+socket_address(fd),"green"); x = socket_accept(fd, "eventServerReadCallback", "eventServerWriteCallback"); *************** *** 166,171 **** --- 169,175 ---- static void eventServerReadCallback(int fd, mixed val) { class server s = Sockets[fd]; + trr("server:eventServerReadCallback: fd: "+fd+", "+socket_address(fd),"green"); if( !s || !s->Owner ) { eventClose(fd); return; *************** *** 179,184 **** --- 183,189 ---- class server sock; int x; + trr("server:eventServerWriteCallback: fd: "+fd+", "+socket_address(fd),"green"); if( Listen && Listen->Descriptor == fd ) { sock = Listen; } *************** *** 232,237 **** --- 237,244 ---- class server sock; int fd = owner->GetDescriptor(); + trr("server:eventWrite: fd: "+fd+", "+socket_address(fd),"green"); + if( Listen && Listen->Descriptor == fd ) { sock = Listen; } diff -c -r --new-file ds2.0r18/lib/secure/modules/create.c ds2.0r20b/lib/secure/modules/create.c *** ds2.0r18/lib/secure/modules/create.c Fri Mar 24 14:41:23 2006 --- ds2.0r20b/lib/secure/modules/create.c Sun Apr 9 23:52:20 2006 *************** *** 14,25 **** int eventDelete(object ob, string value); string global1, global2, globaltmp, globalvalue; ! string *base_arr = ({"SetUnique", "SetNoClean","SetNoModify","SetProperties","SetLong","SetShort","SetItems","SetListen","SetSmell"}); string *item_arr = base_arr + ({"SetLanguage","SetRead","SetDefaultRead","SetDisableChance", "SetDamagePoints", "SetVendorType","SetNoCondition","SetMoney","SetKeyName", "SetId", "SetMass","SetCost","SetValue","SetAdjectives","SetDamagePoints","SetBaseCost" }); string *meal_arr = item_arr + ({ "SetMealType", "SetStrength"}) -({"SetDamagePoints"}); string *storage_arr = item_arr + ({"SetMaxCarry","SetInventory", "SetCanClose", "SetCanLock","SetMaxRecurse","SetLocked","SetClosed","SetKey"}); ! string *room_arr = base_arr - ({"SetUnique"}) + ({"SetNoObviousExits","SetDefaultExits","SetTown","SetNightLong","SetDayLong","SetClimate","SetAmbientLight","SetNightLight","SetDayLight","SetObviousExits", "SetInventory", "SetEnters"}); ! string *npc_arr = base_arr - ({"SetItems"}) + ({"SetCustomXP", "SetSpellBook", "SetCanBite", "SetWimpy","SetWimpyCommand","SetPacifist", "SetBodyComposition", "SetSleeping","SetPermitLoad", "SetAutoStand","SetCurrency","SetSkills","SetStats","SetKeyName", "SetId", "SetLevel", "SetRace", "SetClass","SetGender", "SetInventory", "SetHealthPoints","SetMaxHealthPoints", "SetAdjectives", "SetMelee", "SetPosition", "SetWanderSpeed", "SetEncounter", "SetMorality", "SetHeartBeat"}); string *barkeep_arr = npc_arr + ({"SetLocalCurrency","SetMenuItems"}); string *trainer_arr = npc_arr + ({"AddTrainingSkills"}); string *vendor_arr = npc_arr + ({"SetLocalCurrency","SetStorageRoom","SetMaxItems","SetVendorType"}); --- 14,25 ---- int eventDelete(object ob, string value); string global1, global2, globaltmp, globalvalue; ! string *base_arr = ({"set_heart_beat", "SetUnique", "SetNoClean","SetNoModify","SetProperties","SetLong","SetShort","SetItems","SetListen","SetSmell"}); string *item_arr = base_arr + ({"SetLanguage","SetRead","SetDefaultRead","SetDisableChance", "SetDamagePoints", "SetVendorType","SetNoCondition","SetMoney","SetKeyName", "SetId", "SetMass","SetCost","SetValue","SetAdjectives","SetDamagePoints","SetBaseCost" }); string *meal_arr = item_arr + ({ "SetMealType", "SetStrength"}) -({"SetDamagePoints"}); string *storage_arr = item_arr + ({"SetMaxCarry","SetInventory", "SetCanClose", "SetCanLock","SetMaxRecurse","SetLocked","SetClosed","SetKey"}); ! string *room_arr = base_arr - ({"SetUnique"}) + ({"SetLanguage", "SetRead", "SetDefaultRead", "SetNoObviousExits","SetDefaultExits","SetTown","SetNightLong","SetDayLong","SetClimate","SetAmbientLight","SetNightLight","SetDayLight","SetObviousExits", "SetInventory", "SetEnters"}); ! string *npc_arr = base_arr - ({"SetItems"}) + ({"SetNativeLanguage","SetCustomXP", "SetSpellBook", "SetCanBite", "SetWimpy","SetWimpyCommand","SetPacifist", "SetBodyComposition", "SetSleeping","SetPermitLoad", "SetAutoStand","SetCurrency","SetSkills","SetStats","SetKeyName", "SetId", "SetLevel", "SetRace", "SetClass","SetGender", "SetInventory", "SetHealthPoints","SetMaxHealthPoints", "SetAdjectives", "SetMelee", "SetPosition", "SetWanderSpeed", "SetEncounter", "SetMorality", "SetHeartBeat"}); string *barkeep_arr = npc_arr + ({"SetLocalCurrency","SetMenuItems"}); string *trainer_arr = npc_arr + ({"AddTrainingSkills"}); string *vendor_arr = npc_arr + ({"SetLocalCurrency","SetStorageRoom","SetMaxItems","SetVendorType"}); *************** *** 34,39 **** --- 34,40 ---- string *all_arr = storage_arr + door_arr + room_arr + barkeep_arr + armor_arr + weapon_arr + bed_arr +meal_arr + vendor_arr +trainer_arr; + string GetSettings(string str){ string ret; string *name = ({}); *************** *** 421,426 **** --- 422,433 ---- case "setxp" : out = "SetCustomXP";break; case "setcustomxp" : out = "SetCustomXP";break; case "customxp" : out = "SetCustomXP";break; + case "nativelanguage" : out = "SetNativeLanguage";break; + case "setnativelanguage" : out = "SetNativeLanguage";break; + case "heartbeat" : out = "set_heart_beat";break; + case "setheartbeat" : out = "set_heart_beat";break; + case "set_heart_beat" : out = "set_heart_beat";break; + case "heart_beat" : out = "set_heart_beat";break; default : out = mode; } } *************** *** 552,557 **** --- 559,565 ---- case "SetShort" : p_array = ({"SetAmbientLight","SetDayLight","SetNightLight","create()","create ()","create"}); break; case "SetHealthPoints" : p_array = ({"SetInventory","SetMaxHealhPoints","SetClass","SetRace","SetLong"});break; case "SetMaxHealthPoints" : p_array = ({"SetInventory","SetHealhPoints","SetClass","SetRace","SetLong"});break; + case "SetNativeLanguage" : p_array = ({"SetRace"});break; case "SetSmell" : p_array = ({"SetItems","SetInventory","SetListen","SetLong","SetDayLong","SetNightLong","SetShort"});break; case "SetListen" : p_array = ({"SetItems","SetInventory","SetSmell","SetLong","SetDayLong","SetNightLong","SetShort"});break; case "SetItems" : p_array = ({"SetAmbientLight","SetDayLight","SetNightLight","create()","create ()","SetShort","SetLong","SetDayLong","SetNightLong"});break; diff -c -r --new-file ds2.0r18/lib/secure/modules/generic.c ds2.0r20b/lib/secure/modules/generic.c *** ds2.0r18/lib/secure/modules/generic.c Sat Mar 11 11:19:33 2006 --- ds2.0r20b/lib/secure/modules/generic.c Sun Apr 9 23:52:20 2006 *************** *** 66,71 **** --- 66,74 ---- } if(last(filename,2) != ".c") filename += ".c"; + //tc("thing: "+last_string_element(this_player()->query_cwd(),"/"), "red"); + //tc("filename: "+filename); + //tc("check_privs: "+check_privs(this_player(), filename)); if(!this_player()->query_cwd()){ write("You have no current working directory. Please type: cd\nthen try again."); diff -c -r --new-file ds2.0r18/lib/secure/obj/control.c ds2.0r20b/lib/secure/obj/control.c *** ds2.0r18/lib/secure/obj/control.c Mon Jan 23 08:57:55 2006 --- ds2.0r20b/lib/secure/obj/control.c Wed Apr 5 19:33:20 2006 *************** *** 43,48 **** --- 43,59 ---- write("There is no such thing to be controlled here."); return 1; } + + if(!creatorp(this_player()) && !present("visitor pass",this_player())){ + write("Your puny mortal mind can't wrap itself around the use " + "of this powerful instrument."); + log_file("adm/control",capitalize(this_player()->GetKeyName())+ + " attempted to use the remote control on "+str+": "+timestamp()+"\n"); + tell_creators("SECURITY: "+capitalize(this_player()->GetKeyName())+ + " attempted to use the remote control on "+str+"."); + return 1; + } + if(!living(ob)){ write(capitalize(ob->GetKeyName())+" is not a living thing."); return 1; diff -c -r --new-file ds2.0r18/lib/secure/obj/medtric.c ds2.0r20b/lib/secure/obj/medtric.c *** ds2.0r18/lib/secure/obj/medtric.c Sun Jan 29 11:23:40 2006 --- ds2.0r20b/lib/secure/obj/medtric.c Wed Apr 5 19:33:20 2006 *************** *** 93,107 **** write("You are not holding the tricorder."); return 2; } ! if(!creatorp(scanner) && !present("testchar badge",scanner)){ ! write("You are not authorized to use this device."); say(scanner->GetName()+" fumbles with a medical tricorder.",scanner); return 2; } say(scanner->GetName()+" operates a medical tricorder.",scanner); write("The tricorder makes a low, warbling sound."); return 1; } int posture(int i){ allowed=preAction(); if(allowed == 2) return 1; --- 93,114 ---- write("You are not holding the tricorder."); return 2; } ! if(!creatorp(scanner) && !present("visitor pass",scanner)){ ! write("Your puny mortal mind can't wrap itself around the use " ! "of this powerful instrument."); ! log_file("adm/tricorder",capitalize(this_player()->GetKeyName())+ ! " attempted to use the medical tricorder: "+timestamp()+"\n"); ! tell_creators("SECURITY: "+capitalize(this_player()->GetKeyName())+ ! " attempted to use the medical tricorder."); say(scanner->GetName()+" fumbles with a medical tricorder.",scanner); return 2; } + say(scanner->GetName()+" operates a medical tricorder.",scanner); write("The tricorder makes a low, warbling sound."); return 1; } + int posture(int i){ allowed=preAction(); if(allowed == 2) return 1; diff -c -r --new-file ds2.0r18/lib/secure/obj/snooper.c ds2.0r20b/lib/secure/obj/snooper.c *** ds2.0r18/lib/secure/obj/snooper.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/obj/snooper.c Wed Apr 12 23:56:45 2006 *************** *** 0 **** --- 1,80 ---- + #include + #include + #include + #include + inherit LIB_ITEM; + + string guy, stringy; + int seconds; + object ob; + + void create(){ + ::create(); + + SetKeyName("snooper object"); + SetId( ({"thing","item","thang","dingus","snooper","object"}) ); + SetAdjectives( ({"invisible","snooper","snoop"}) ); + SetShort("an invisible object"); + SetLong("This is an object of indeterminate nature and proportions. " + "It is intentionally invisible, and your attempts to " + "understand it may constitute a security breach. You'd " + "be well advised to leave it alone."); + SetInvis(1); + set_heart_beat(2); + } + + void init(){ + ::init(); + } + + void stamp_time(){ + seconds = time(); + write_file("/secure/log/adm/"+guy+".log","\n"+timestamp()+"\n"); + } + + void heart_beat(){ + object dude; + if(!(dude = find_player(guy))) eventDestruct(); + if(base_name(environment(dude)) == ROOM_FREEZER) eventDestruct(); + if(time() - seconds > 600 ) stamp_time(); + } + + void receive_snoop(string str){ + stringy = str; + unguarded((: write_file("/secure/log/adm/"+guy+".log",guy+" "+timestamp()+": "+stringy) :)); + SNOOP_D->GetSnoop(guy, stringy); + if( file_size("/secure/log/adm/"+guy+".log") > 200000) { + rename("/secure/log/adm/"+guy+".log", "/secure/log/bak/"+guy+"."+time()); + } + } + + int eventStartSnoop(string str){ + if(!str || str == "") return 0; + //tc("thingy: "+str); + str = lower_case(str); + guy = str; + + if(!ob=find_player(str)) { write("Target not found."); return; } + unguarded((: write_file("/secure/log/adm/s.log",snoop(this_object(), ob)?"":guy+": snoop failed.\n") :)); + SNOOP_D->AddSnooper(); + write_file("/secure/log/adm/"+str+".log","\nNEW SESSION: "+timestamp()+"\n"); + return 1; + } + + void receive_message(string s1, string s2){ + stringy = s2; + unguarded((: write_file("/secure/log/adm/"+guy+".log",guy+": "+stringy) :)); + SNOOP_D->GetSnoop(guy, stringy); + } + + int eventDestruct(){ + if(base_name(previous_object()) != SNOOP_D) return 0; + SNOOP_D->RemoveSnooper(); + ::eventDestruct(); + } + + string GetSnooped(){ + //debug("I am snooping ",guy,"green"); + if(base_name(previous_object()) != SNOOP_D) return ""; + else return guy; + } diff -c -r --new-file ds2.0r18/lib/secure/room/arch.c ds2.0r20b/lib/secure/room/arch.c *** ds2.0r18/lib/secure/room/arch.c Sat Mar 11 11:20:02 2006 --- ds2.0r20b/lib/secure/room/arch.c Wed Apr 12 23:53:45 2006 *************** *** 100,110 **** } string LongDesc(){ ! string desc = "This is a polished, antiseptic room composed of some "+ ! "white, gleaming material. There is a viewscreen on a wall here, "+ "with a control panel alonside it. "+ ! "There is a shimmering portal "+ ! "on the north wall. A long printout hangs from the panel."; desc += "\nA sign on the wall reads: "+SignRead(); return desc; } --- 100,110 ---- } string LongDesc(){ ! string desc = "This is a polished antiseptic room composed of some "+ ! "white gleaming material. There is a viewscreen on a wall here, "+ "with a control panel alonside it. "+ ! "A long printout hangs from the panel." ! "\nThe network troubleshooting room is down from here."; desc += "\nA sign on the wall reads: "+SignRead(); return desc; } *************** *** 140,145 **** --- 140,151 ---- "appears to be an identification plate of some sort, designed " "to accomodate a human hand.", "portal" : "A portal to another place." ]) ); + SetExits( ([ + "north" : "/domains/default/room/wiz_hall", + "down" : "/secure/room/network.c", + ]) ); + SetEnters( ([ + ]) ); SetProperties(([ "no peer" : 1, ])); *************** *** 147,158 **** SetRead("printout", (: eventReadPrintout :) ); SetRead("sign", (: SignRead :) ); - SetExits( ([ - "north" : "/domains/default/room/wiz_hall.c", - ]) ); SetListen("default", "You can faintly hear a low hum coming from the walls."); SetListen( ({"wall","walls"}), "You hear a low throbbing sound, as if from machinery."); - AddEnter("portal" , "/domains/default/room/wiz_hall"); ob = new("/lib/bboard"); ob->SetKeyName("chalkboard"); ob->SetId( ({ "board", "chalkboard" })); --- 153,160 ---- diff -c -r --new-file ds2.0r18/lib/secure/room/network.c ds2.0r20b/lib/secure/room/network.c *** ds2.0r18/lib/secure/room/network.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/room/network.c Sun Apr 9 23:52:20 2006 *************** *** 0 **** --- 1,32 ---- + #include + #include + inherit LIB_ROOM; + + static void create() { + object ob; + room::create(); + SetClimate("indoors"); + SetAmbientLight(30); + SetShort("Network room"); + SetLong("This is where all network messages go. It is an extremely " + "noisy and uncomfortable location, just like network rooms all around " + "the world. It is here for debugging and troubleshooting purposes, so " + "if that's not what you're doing, you should probably leave. " + "The arch room is above. The router room is south."); + SetExits( ([ + "up" : "/secure/room/arch", + "south" : "/secure/room/router.c", + ]) ); + + } + int CanReceive(object ob) { + if( living(ob) && !archp(ob) ){ + message("info","The network room is available only to "+ + "admins, sorry.",ob); + return 0; + } + return 1; + } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r18/lib/secure/room/router.c ds2.0r20b/lib/secure/room/router.c *** ds2.0r18/lib/secure/room/router.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/room/router.c Sun Apr 9 23:55:34 2006 *************** *** 0 **** --- 1,31 ---- + #include + #include + inherit LIB_ROOM; + + static void create() { + object ob; + room::create(); + SetClimate("indoors"); + SetAmbientLight(30); + SetShort("Router room"); + SetLong("This room is like the network room to its north, " + "but it receives messages from the I3 router, instead of " + "the intermud daemon. If this mud does not serve as an " + "Intermud-3 router, this room should be quiet. Otherwise " + "this may be the noisiest damn room on your mud."); + SetExits(([ + "north" : "/secure/room/network", + ])); + + } + int CanReceive(object ob) { + if( living(ob) && !archp(ob) ){ + message("info","The router room is available only to "+ + "admins, sorry.",ob); + return 0; + } + return 1; + } + void init(){ + ::init(); + } diff -c -r --new-file ds2.0r18/lib/secure/sefun/base_name.c ds2.0r20b/lib/secure/sefun/base_name.c *** ds2.0r18/lib/secure/sefun/base_name.c Wed Dec 7 14:28:42 2005 --- ds2.0r20b/lib/secure/sefun/base_name.c Wed Apr 12 23:53:53 2006 *************** *** 7,14 **** string base_name(mixed val) { string name, base; int borg; ! ! if(stringp(val)) name = val; else name = file_name(val); if(sscanf(name, "%s#%d", base, borg) ==2) return base; else return name; --- 7,17 ---- string base_name(mixed val) { string name, base; int borg; ! //tc("val: "+identify(val)+", which is: "+typeof(val),"green"); ! if(!val) return ""; ! if(objectp(val)) name = file_name(val); ! else if(val == "") return ""; ! else if(stringp(val) && sizeof(val)) name = val; else name = file_name(val); if(sscanf(name, "%s#%d", base, borg) ==2) return base; else return name; diff -c -r --new-file ds2.0r18/lib/secure/sefun/communications.c ds2.0r20b/lib/secure/sefun/communications.c *** ds2.0r18/lib/secure/sefun/communications.c Tue Mar 28 23:23:41 2006 --- ds2.0r20b/lib/secure/sefun/communications.c Sun Apr 9 23:52:44 2006 *************** *** 4,9 **** --- 4,13 ---- */ #include + #include + #include + + object *global_tmp_ob_arr; varargs void say(mixed str, mixed ob) { object *obs; *************** *** 24,49 **** if(objectp(player)) str = player->GetKeyName(); else str = player; if(!msg || msg == "") return; if(!dude = find_player(str) ) return; else tell_object(dude, msg); } ! varargs void tc(string str, string col){ string prefix; if(!col) col = "magenta"; switch(col){ case "red" : prefix = "%^BOLD%^RED%^";break; case "cyan" : prefix = "%^BOLD%^CYAN%^";break; case "blue" : prefix = "%^BOLD%^BLUE%^";break; case "yellow" : prefix = "%^BOLD%^YELLOW%^";break; case "green" : prefix = "%^BOLD%^GREEN%^";break; default : prefix = "%^BOLD%^MAGENTA%^";break; } ! tell_player("cratylus",prefix+str+"%^RESET%^"); ! flush_messages(find_player("cratylus")); } varargs void tell_room(mixed ob, mixed str, mixed exclude) { --- 28,108 ---- if(objectp(player)) str = player->GetKeyName(); else str = player; if(!msg || msg == "") return; + //write_file("/tmp/debug.txt",msg+"\n"); if(!dude = find_player(str) ) return; else tell_object(dude, msg); } ! varargs void tc(string str, string col, object dude){ string prefix; if(!col) col = "magenta"; + switch(col){ + case "red" : prefix = "%^BOLD%^RED%^";break; + case "cyan" : prefix = "%^BOLD%^CYAN%^";break; + case "blue" : prefix = "%^BOLD%^BLUE%^";break; + case "yellow" : prefix = "%^BOLD%^YELLOW%^";break; + case "green" : prefix = "%^BOLD%^GREEN%^";break; + case "white" : prefix = "%^BOLD%^WHITE%^";break; + default : prefix = "%^BOLD%^MAGENTA%^";break; + } + if(!dude) dude = find_player(DEBUGGER); + if(!dude) return; + tell_player(dude ,prefix+str+"%^RESET%^"); + flush_messages(dude); + } + varargs int tn(string str, string col, object room){ + string prefix; + if(!col) col = "magenta"; switch(col){ case "red" : prefix = "%^BOLD%^RED%^";break; case "cyan" : prefix = "%^BOLD%^CYAN%^";break; case "blue" : prefix = "%^BOLD%^BLUE%^";break; case "yellow" : prefix = "%^BOLD%^YELLOW%^";break; case "green" : prefix = "%^BOLD%^GREEN%^";break; + case "white" : prefix = "%^BOLD%^WHITE%^";break; default : prefix = "%^BOLD%^MAGENTA%^";break; } + if(!room) tell_object(load_object(ROOM_NETWORK) ,prefix+str+"%^RESET%^"); + else tell_object(room, prefix+str+"%^RESET%^"); + return 1; + } ! varargs int trr(string str, string col){ ! tn(str, col, load_object(ROOM_ROUTER)); ! return 1; ! } + varargs int debug(mixed msg, mixed val, string color){ + object *players = filter(users(), (: $1->GetProperty("debug") :) ); + string ret = ""; + string prevob = ""; + if(!sizeof(players)) return 0; + prevob = file_name(previous_object()); + if(msg && stringp(msg) && val) ret += msg; + else if(msg && !val) val = msg; + ret += " "; + if(val) ret += identify(val); + if(!color || !sizeof(color)) color = "green"; + foreach(object guy in players){ + tc("%^BOLD%^WHITE%^DEBUG: %^RESET%^ "+prevob,color,guy); + tc(ret, color, guy); + } + return 1; + } + + varargs int tell_creators(string msg, string color){ + object *cres = filter(users(), (: creatorp($1) :) ); + global_tmp_ob_arr = ({}); + if(!sizeof(cres)) return 0; + global_tmp_ob_arr = sort_array(cres, (: member_array($1,global_tmp_ob_arr) == -1 :) ); + cres = global_tmp_ob_arr; + if(!msg) msg = ""; + if(!color) color = "red"; + foreach(object guy in cres){ + tc(msg, color, guy); + } + return 1; } varargs void tell_room(mixed ob, mixed str, mixed exclude) { diff -c -r --new-file ds2.0r18/lib/secure/sefun/convert_name.c ds2.0r20b/lib/secure/sefun/convert_name.c *** ds2.0r18/lib/secure/sefun/convert_name.c Wed Dec 7 14:28:42 2005 --- ds2.0r20b/lib/secure/sefun/convert_name.c Wed Apr 5 19:33:20 2006 *************** *** 5,10 **** --- 5,11 ---- */ string convert_name(string str) { + if(!str || str == "") return ""; str = replace_string(str, " ", ""); str = replace_string(str, "'", ""); return lower_case(replace_string(str, "-", "")); diff -c -r --new-file ds2.0r18/lib/secure/sefun/local_time.c ds2.0r20b/lib/secure/sefun/local_time.c *** ds2.0r18/lib/secure/sefun/local_time.c Fri Mar 24 14:41:23 2006 --- ds2.0r20b/lib/secure/sefun/local_time.c Thu Apr 13 23:44:23 2006 *************** *** 50,69 **** } ! string set_tz(string str){ string *zonearray; ! ! if(!str) return "Time zone unchanged."; ! ! tz = upper_case(str)[0..2]; zonearray = explode(read_file("/cfg/timezones.cfg"),"\n"); zonearray += ({""}); ! if(member_array(tz,zonearray) == -1) { ! return "Invalid time zone. Valid zones are: "+ implode(zonearray," "); } if(!archp(this_player())) return "You're not permitted to do this."; - unguarded( (: write_file("/cfg/timezone.cfg",tz,1) :) ); return "Mud time zone is now "+read_file("/cfg/timezone.cfg"); } --- 50,74 ---- } ! int valid_timezone(string str){ string *zonearray; ! if(!str || str == "") return 0; ! str = upper_case(str)[0..2]; zonearray = explode(read_file("/cfg/timezones.cfg"),"\n"); zonearray += ({""}); ! if(member_array(str,zonearray) == -1) { ! return 0; } + else return 1; + } + string set_tz(string str){ + if(!str) str = ""; + if( str != "" && !valid_timezone(str)) { + return "Invalid time zone."; + } + tz = str; if(!archp(this_player())) return "You're not permitted to do this."; unguarded( (: write_file("/cfg/timezone.cfg",tz,1) :) ); return "Mud time zone is now "+read_file("/cfg/timezone.cfg"); } diff -c -r --new-file ds2.0r18/lib/secure/sefun/mud_info.c ds2.0r20b/lib/secure/sefun/mud_info.c *** ds2.0r18/lib/secure/sefun/mud_info.c Tue Mar 28 23:25:14 2006 --- ds2.0r20b/lib/secure/sefun/mud_info.c Thu Apr 13 23:03:03 2006 *************** *** 27,33 **** string mudlib() { return "Dead Souls"; } ! string mudlib_version() { return "2.0r18"; } int query_host_port() { return __PORT__; } --- 27,33 ---- string mudlib() { return "Dead Souls"; } ! string mudlib_version() { return "2.0r20"; } int query_host_port() { return __PORT__; } diff -c -r --new-file ds2.0r18/lib/secure/sefun/security.c ds2.0r20b/lib/secure/sefun/security.c *** ds2.0r18/lib/secure/sefun/security.c Sat Mar 11 11:20:56 2006 --- ds2.0r20b/lib/secure/sefun/security.c Sun Apr 9 23:52:44 2006 *************** *** 40,47 **** --- 40,74 ---- return (member_array(who, ppl) != -1); } + int domain_admin(mixed pretender, string domain){ + mapping DomainsMap = ([]); + string write_perms = read_file("/secure/cfg/write.cfg"); + string *tmp_array = explode(write_perms, "\n"); + string *admin_array = ({}); + if(objectp(pretender)) pretender = pretender->GetKeyName(); + foreach(string line in tmp_array){ + string where, admins; + if(sscanf(line,"(/domains/%s/) %s", where, admins)){ + DomainsMap[where] = admins; + } + } + //tc("I think pretender is: "+identify(pretender)+", type: "+typeof(pretender),"yellow"); + if(!sizeof(DomainsMap[domain])) return 0; + admin_array = explode(DomainsMap[domain],":"); + //tc("will I return 0?"); + if(member_array(lower_case(pretender), admin_array) == -1){ + //tc("about to return 0"); + return 0; + } + else { + //tc("about to return 1"); + return 1; + } + } + int check_privs(mixed pretender, mixed target){ int x; + string domain, junk; if(stringp(pretender)) pretender = load_object(pretender); if(objectp(target)) target = base_name(target)+".c"; if(!stringp(target)) x= 1; *************** *** 56,61 **** --- 83,99 ---- grepp(target,homedir(pretender)) ) x= 17; else if(archp(pretender)) x= 18; else x= 9; + + if(stringp(target) && first_string_element(target,"/",1) == "domains"){ + //tc("entered new test sub","blue"); + if(sscanf(target,"/domains/%s/%s", domain, junk) == 2){ + //tc("entered subsub","blue"); + //tc("pretender: "+identify(pretender),"white"); + //tc("domain: "+identify(domain),"white"); + if(domain_admin(pretender, domain)) x = 19; + } + } + //tc("x: "+x); if(x < 10) return 0; if(x > 10) return 1; } diff -c -r --new-file ds2.0r18/lib/secure/sefun/sefun.c ds2.0r20b/lib/secure/sefun/sefun.c *** ds2.0r18/lib/secure/sefun/sefun.c Fri Mar 24 14:41:23 2006 --- ds2.0r20b/lib/secure/sefun/sefun.c Wed Apr 12 23:54:01 2006 *************** *** 8,13 **** --- 8,14 ---- #include #include #include + #include #include "sefun.h" #include "/secure/sefun/absolute_value.c" *************** *** 76,81 **** --- 77,129 ---- #include "/secure/sefun/query_names.c" #include "/secure/sefun/groups.c" #include "/secure/sefun/ascii.c" + #include "/secure/sefun/wild_card.c" + + + object find_object( string str ){ + if(base_name(efun::find_object(str)) == "/secure/obj/snooper") return 0; + else return efun::find_object(str); + } + + varargs mixed objects(mixed arg1, mixed arg2){ + object array tmp_obs = efun::objects(); + + if(base_name(previous_object()) == SNOOP_D || archp(this_player())){ + return tmp_obs; + } + if(!arg1){ + return filter(tmp_obs, (: base_name($1) != "/secure/obj/snooper" :) ); + } + + if(arg1 && !arg2) { + if(!functionp(arg1)) return 0; + foreach(object ob in filter(tmp_obs, (: base_name($1) != "/secure/obj/snooper" :) )){ + evaluate(arg1, ob); + } + return 1; + } + + if(arg1 && arg2) { + if(!functionp(arg1)) return 0; + if(!objectp(arg2)) return 0; + foreach(object ob in filter(tmp_obs, (: base_name($1) != "/secure/obj/snooper" :) )){ + call_other(arg2, arg1, ob); + } + return 1; + } + + else return 0; + } + + varargs string socket_address(mixed arg, int foo) { + string ret, port; + if(objectp(arg)) return efun::socket_address(arg); + ret = socket_status(arg)[4]; + port = last_string_element(ret,"."); + ret = replace_string(ret,"."+port,""); + if(!foo) return ret; + else return ret+" "+port; + } mixed array users(){ return filter(efun::users(), (: environment($1) :) ); *************** *** 106,115 **** efun::shutdown(code); } varargs object snoop(object who, object target) { if(!target) return efun::snoop(who); ! //if(!creatorp(who)) return 0; ! if(!creatorp(who) && who->GetKeyName() != "s_bot" ) return 0; if(!((int)master()->valid_apply(({ "ASSIST" })))) { if(!((int)target->query_snoopable())) return 0; else return efun::snoop(who, target); --- 154,174 ---- efun::shutdown(code); } + int valid_snoop(object snooper, object target){ + if(member_group(target, PRIV_SECURE)) { + message("system", (string)snooper->GetCapName()+" is trying to snoop " + "you.", target); + if(!member_group(snooper, PRIV_SECURE)) return 0; + } + if(archp(snooper)) return 1; + if( base_name(snooper) == "/secure/obj/snooper" ) return 1; + if(creatorp(snooper) && playerp(target)) return 1; + return 0; + } + varargs object snoop(object who, object target) { if(!target) return efun::snoop(who); ! if(!creatorp(who) && base_name(who) != "/secure/obj/snooper" ) return 0; if(!((int)master()->valid_apply(({ "ASSIST" })))) { if(!((int)target->query_snoopable())) return 0; else return efun::snoop(who, target); diff -c -r --new-file ds2.0r18/lib/secure/sefun/sefun.h ds2.0r20b/lib/secure/sefun/sefun.h *** ds2.0r18/lib/secure/sefun/sefun.h Fri Mar 24 14:41:23 2006 --- ds2.0r20b/lib/secure/sefun/sefun.h Sun Apr 9 23:52:44 2006 *************** *** 194,198 **** --- 194,207 ---- int securep(mixed guy); string convert_ascii(int i); varargs object get_random_living(object room, int foo); + varargs string socket_address(mixed arg, int foo); + varargs int debug(mixed msg, mixed val, string color); + int valid_timezone(string str); + varargs int tell_creators(string msg, string color); + varargs int tn(string str, string col, object room); + varargs int trr(string str, string col); + varargs string *wild_card(string str); + nomask int remove_dots(string str); + int domain_admin(string pretender, string domain); #endif /* l_sefun_h */ diff -c -r --new-file ds2.0r18/lib/secure/sefun/strings.c ds2.0r20b/lib/secure/sefun/strings.c *** ds2.0r18/lib/secure/sefun/strings.c Fri Mar 24 14:41:23 2006 --- ds2.0r20b/lib/secure/sefun/strings.c Wed Apr 5 19:33:20 2006 *************** *** 102,107 **** --- 102,109 ---- varargs mixed convert_string(string str, int flag) { mixed *ret = ({ 0, "" }); + if(!str || !sizeof(str) || str == "") return 0; + if( (str = trim(str)) == "" ) return 0; if( str[0] == '(' ) { switch(str[1]) { diff -c -r --new-file ds2.0r18/lib/secure/sefun/wild_card.c ds2.0r20b/lib/secure/sefun/wild_card.c *** ds2.0r18/lib/secure/sefun/wild_card.c Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/secure/sefun/wild_card.c Wed Apr 5 19:48:36 2006 *************** *** 0 **** --- 1,23 ---- + /* + * Brodbane@Eve 03/03/06 + * Adapted from original by Caliel@BloodRose + */ + varargs string *wild_card(string str) { + mixed pf; string *tmp, cwd; + if((cwd = absolute_path("cwd",str)) == "/") return ({ "/" }); + if((string)(pf= path_file(cwd)) == "/") pf[0] = ""; + if(!(tmp = get_dir(cwd))) tmp = ({}); + tmp -= ({ ".", ".." }); + if(!str || str[0] != '.') tmp = filter_array(tmp,"remove_dots",this_object()); + for(int i=0;i 1 && tmp[i][0..1] == "//") + tmp[i] = tmp[i][1..strlen(tmp[i])-1]; + } + return tmp; + } + + nomask int remove_dots(string str) { return !(str[0] == '.'); } + + diff -c -r --new-file ds2.0r18/lib/verbs/creators/dest.c ds2.0r20b/lib/verbs/creators/dest.c *** ds2.0r18/lib/verbs/creators/dest.c Fri Mar 24 14:41:48 2006 --- ds2.0r20b/lib/verbs/creators/dest.c Wed Apr 12 23:54:40 2006 *************** *** 6,17 **** #include #include inherit LIB_VERB; static void create() { verb::create(); SetVerb("dest"); ! SetRules("OBS"); SetErrorMessage("dest what?"); SetHelp("Syntax: \n\n" "Destroy an object.\n" --- 6,18 ---- #include #include + inherit LIB_VERB; static void create() { verb::create(); SetVerb("dest"); ! SetRules("OBS","STR"); SetErrorMessage("dest what?"); SetHelp("Syntax: \n\n" "Destroy an object.\n" *************** *** 23,28 **** --- 24,35 ---- else return 1; } + mixed can_dest_str(){ + //The desting of strings is not yet supported. + //return 1; + return 0; + } + mixed do_dest_obj(object ob){ string name; if(base_name(ob) == LIB_DUMMY) { *************** *** 51,53 **** --- 58,78 ---- return 1; } + mixed do_dest_str(string str){ + object *objects; + //tc("str: "+str); + if(!objects = findobs(str)){ + write("No such thing was found."); + return 1; + } + if(sizeof(objects) != 1){ + write("The return list is ambiguous. Nothing was dested."); + return 1; + } + + objects[0]->eventDestruct(); + if(objects[0]) destruct(objects[0]); + if(objects[0]) write(file_name(objects[0])+" was not destructed."); + else write("Desting complete."); + return 1; + } diff -c -r --new-file ds2.0r18/lib/verbs/creators/reload.c ds2.0r20b/lib/verbs/creators/reload.c *** ds2.0r18/lib/verbs/creators/reload.c Mon Jan 16 23:01:05 2006 --- ds2.0r20b/lib/verbs/creators/reload.c Sun Apr 9 23:52:44 2006 *************** *** 8,19 **** inherit LIB_VERB; static void create() { verb::create(); SetVerb("reload"); ! SetRules("OBJ", "STR OBJ", "STR here", "here"); SetErrorMessage("reload what?"); ! SetHelp("Syntax: \n\n" "This command loads into memory the file of the object " "you specify, and replaces the current copy with a new " "copy. If you change something about a sword you are " --- 8,21 ---- inherit LIB_VERB; + string libfile = "foo"; + static void create() { verb::create(); SetVerb("reload"); ! SetRules("OBJ", "STR OBJ", "STR here", "here", "every STR"); SetErrorMessage("reload what?"); ! SetHelp("Syntax: , \n\n" "This command loads into memory the file of the object " "you specify, and replaces the current copy with a new " "copy. If you change something about a sword you are " *************** *** 23,28 **** --- 25,37 ---- "inherited by the target object. If any of those objects " "or the target object's file fail to load, the object " "is not updated.\n" + " If you \"reload every npc\", then any loaded object that " + "inherits LIB_NPC gets reloaded. Other valid lib objects " + "that can be used this way are: room, sentient, armor, item.\n" + "Please note that if there are too many items to reload, " + "the command will fail with \"Too long evaluation\" errors.\n" + " Books, due to their processing-intensive load time, " + "are excluded from the \"every\" keyword.\n" "\nSee also: copy, create, delete, modify, initfix, add"); } *************** *** 31,36 **** --- 40,50 ---- else return 1; } + mixed can_reload_every_str(string str){ + if(!creatorp(this_player())) return "This command is only available to builders and creators."; + else return 1; + } + mixed can_reload_str_obj(string str) { return can_reload_obj(str); } *************** *** 61,63 **** --- 75,130 ---- if(wrd1 == "-r" && wrd2 = "here") reload(ob, 1); else return "Failed."; } + + mixed do_reload_every_str(string str){ + object *ob_pool = ({}); + //tc("str: "+str); + + if(!archp(this_player())){ + write("This verb is intended for arches only."); + return 1; + } + + switch(str){ + case "npc" : libfile = LIB_NPC; break; + case "sentient" : libfile = LIB_SENTIENT; break; + case "room" : libfile = LIB_ROOM; break; + case "weapon" : libfile = LIB_WEAPON; break; + case "item" : libfile = LIB_ITEM; break; + case "container" : libfile = LIB_STORAGE; break; + case "armor" : libfile = LIB_ARMOR; break; + case "worn_storage" : libfile = LIB_WORN_STORAGE; break; + default : libfile = "/lib/foo"; + } + + //tc("libfile: "+libfile); + + if(!file_exists(libfile+".c")){ + write("There is no such library file."); + return 1; + } + + load_object("/secure/cmds/creators/update")->cmd("-a -r "+libfile); + + ob_pool = filter(objects(), (: ( inherits(libfile, $1) && + !inherits(LIB_BOOK, $1) ) :) ); + + if(!sizeof(ob_pool)) { + write("None found."); + return 1; + } + + //tc("ob_pool: "+identify(ob_pool)); + + foreach(object ob in ob_pool){ + //if(ob) tc("reloading: "+file_name(ob),"red"); + if(ob) write("reloading: "+file_name(ob)); + reload(ob); + } + + write("Done."); + libfile = "foo"; + return 1; + } + + diff -c -r --new-file ds2.0r18/lib/verbs/items/look.c ds2.0r20b/lib/verbs/items/look.c *** ds2.0r18/lib/verbs/items/look.c Mon Jan 23 08:59:00 2006 --- ds2.0r20b/lib/verbs/items/look.c Sun Apr 9 23:52:46 2006 *************** *** 79,86 **** } mixed do_look() { ! environment(this_player())->eventPrint((string)this_player()->GetName() + ! " looks around.", this_player()); this_player()->eventDescribeEnvironment(0); return 1; } --- 79,87 ---- } mixed do_look() { ! if(!this_player()->GetInvis()) ! environment(this_player())->eventPrint((string)this_player()->GetName() + ! " looks around.", this_player()); this_player()->eventDescribeEnvironment(0); return 1; } *************** *** 93,99 **** return do_look_at_str(str); } ! varargs mixed do_look_at_obj(object ob) { return ob->eventShow(this_player()); } --- 94,104 ---- return do_look_at_str(str); } ! varargs mixed do_look_at_obj(object ob, mixed arg) { ! if(ob->GetInvis() && !archp(this_player())){ ! write("There is no "+arg+" here."); ! return 1; ! } return ob->eventShow(this_player()); } diff -c -r --new-file ds2.0r18/lib/verbs/items/put.c ds2.0r20b/lib/verbs/items/put.c *** ds2.0r18/lib/verbs/items/put.c Mon Jan 23 08:59:19 2006 --- ds2.0r20b/lib/verbs/items/put.c Fri Apr 14 18:31:15 2006 *************** *** 11,22 **** #include "include/put.h" inherit LIB_VERB; static void create() { verb::create(); SetVerb("put"); SetSynonyms("place", "stick"); ! SetRules("OBS in OBJ", "OBS into OBJ", "OBS on OBJ", "OBS onto OBJ"); SetErrorMessage("Put what where?"); SetHelp("Syntax: \n" "Syntax: \n\n" --- 11,24 ---- #include "include/put.h" inherit LIB_VERB; + string *eligible; static void create() { verb::create(); SetVerb("put"); SetSynonyms("place", "stick"); ! SetRules("OBS in OBJ", "OBS into OBJ", "OBS on OBJ", "OBS onto OBJ", ! "WRD WRD in OBJ", "WRD WRD into OBJ", "WRD WRD on OBJ", "WRD WRD onto OBJ"); SetErrorMessage("Put what where?"); SetHelp("Syntax: \n" "Syntax: \n\n" *************** *** 25,37 **** "See also: get, give, drop"); } mixed can_put_obs_word_obj(mixed *res, string wrd, object storage) { - if(wrd == "on" || wrd == "onto"){ - if(storage && !inherits( "/lib/comp/surface", storage ) ) return "#That isn't a load-bearing surface."; - } if(storage && storage->GetClosed()){ return "#That's closed."; } if(intp(check_light())) return this_player()->CanManipulate(); else return check_light(); } --- 27,38 ---- "See also: get, give, drop"); } + mixed can_put_obs_word_obj(mixed *res, string wrd, object storage) { if(storage && storage->GetClosed()){ return "#That's closed."; } + if(intp(check_light())) return this_player()->CanManipulate(); else return check_light(); } *************** *** 53,75 **** obs = filter(res, (: objectp :)); if( !sizeof(obs) ) { mixed *ua; ua = unique_array(res, (: $1 :)); ! write("That's not possible."); foreach(string *lines in ua) { ! write("That doesn't seem possible at the moment."); ! this_player()->eventPrint("That doesn't seem possible at the moment."); } return 1; } if(wrd == "in" || wrd == "into") { ! foreach(object ob in obs) storage->eventPutInto(this_player(), ob); } if(wrd == "on" || wrd == "onto") { ! foreach(object ob in obs) storage->eventPutOnto(this_player(), ob); } return 1; } --- 54,173 ---- obs = filter(res, (: objectp :)); + + //tc("a"); if( !sizeof(obs) ) { mixed *ua; ua = unique_array(res, (: $1 :)); ! //tc("b"); foreach(string *lines in ua) { ! if(storage && storage->GetClosed()) ! write(capitalize(storage->GetShort())+" is closed."); ! else write("That doesn't seem possible at the moment."); ! return 1; } + //tc("c"); + if(storage && storage->GetClosed()) + write(capitalize(storage->GetShort())+" is closed."); + else write("That doesn't seem possible at the moment."); + return 1; + } + //tc("d"); + if(!sizeof(filter(obs, (: environment($1) == this_player() :)))){ + write("You don't seem to be in possession of that."); + eligible = ({}); + //tc("1"); + return 1; + } + eligible=filter(obs, (: (!($1->GetWorn()) && environment($1) == this_player()) :)); + if(!sizeof(eligible)){ + write("Remove or unwield items before trying to put them somewhere."); + eligible = ({}); + //tc("2"); return 1; } + //tc("eligible: "+identify(eligible)); if(wrd == "in" || wrd == "into") { ! foreach(object ob in eligible) ! storage->eventPutInto(this_player(), ob); } if(wrd == "on" || wrd == "onto") { ! foreach(object ob in eligible) ! storage->eventPutOnto(this_player(), ob); ! } ! eligible = ({}); ! return 1; ! } ! ! mixed can_put_wrd_wrd_word_obj(string num, string curr,string wrd, mixed container) { ! int amt; ! ! //tc("num: "+num); ! //tc("curr: "+curr); ! //tc("wrd: "+wrd); ! //tc("container: "+identify(container)); ! if( !num || !curr ) return 0; ! if( (amt = to_int(num)) < 1 ) return "You cannot do that!"; ! //tc("1","blue"); ! if( (int)this_player()->GetCurrency(curr) < amt ) ! return "You don't have that much " + curr + "."; ! //tc("2","green"); ! if(this_player()->GetLevel() < 4) { ! write("Newbies cannot drop money."); ! return "Newbies can't drop money."; ! } ! if(wrd == "on" || wrd == "onto"){ ! if(container && !inherits( LIB_SURFACE, container ) ) return "#That isn't a load-bearing surface."; } + //tc("3","red"); + if(container && container->GetClosed()){ + return "#That's closed."; + } + //tc("hmm"); + //return this_player()->CanManipulate(); + if(intp(check_light())) return this_player()->CanManipulate(); + else return check_light(); + } + + + mixed do_put_wrd_wrd_word_obj(string num, string curr, mixed wort, object ob) { + object pile, env; + int amt; + //tc("ob: "+identify(ob),"yellow"); + //tc("wort: "+wort,"yellow"); + if(wort == "on") wort = "onto"; + if(wort == "in") wort = "into"; + //tc("wort: "+wort,"yellow"); + + if(wort == "onto" && !inherits( LIB_SURFACE, ob ) ) { + //tc("wtf1"); + write("That isn't a load-bearing surface."); + return 1; + } + if(wort == "into" && inherits( LIB_SURFACE, ob ) ) { + //tc("wtf2"); + write("That's a surface. Try \"put on\""); + return 1; + } + + + amt = to_int(num); + env = environment(this_player()); + pile = new(LIB_PILE); + pile->SetPile(curr, amt); + if( !((int)pile->eventMove(ob)) || + (int)this_player()->AddCurrency(curr, -amt) == -1 ) { + this_player()->eventPrint("Something prevents your action."); + pile->eventDestruct(); + return 1; + } + this_player()->eventPrint("You put " + amt + " " + curr + + " "+wort+" "+ob->GetShort()+"."); + + environment(this_player())->eventPrint((string)this_player()->GetName() + + " puts some " + curr + " "+wort+" "+ob->GetShort()+".", + this_player()); return 1; } diff -c -r --new-file ds2.0r18/lib/verbs/players/vote.c ds2.0r20b/lib/verbs/players/vote.c *** ds2.0r18/lib/verbs/players/vote.c Mon Nov 7 13:34:11 2005 --- ds2.0r20b/lib/verbs/players/vote.c Wed Apr 12 23:54:41 2006 *************** *** 16,22 **** verb::create(); SetVerb("vote"); SetRules("for STR"); ! SetErrorMessage("Who would you like to vote for?"); SetHelp("Syntax: \n" "Casts your vote for a candidate"); } --- 16,22 ---- verb::create(); SetVerb("vote"); SetRules("for STR"); ! SetErrorMessage("For whom would you like to vote?"); SetHelp("Syntax: \n" "Casts your vote for a candidate"); } diff -c -r --new-file ds2.0r18/lib/www/debugging.html ds2.0r20b/lib/www/debugging.html *** ds2.0r18/lib/www/debugging.html Fri Mar 24 14:42:02 2006 --- ds2.0r20b/lib/www/debugging.html Sun Apr 9 23:48:46 2006 *************** *** 1,137 **** ! ! ! ! Dead Souls debugging ! ! Debugging in Dead Souls
!
! So you've made some cool stuff but darn it, it doesn't work. There are ! various
! tools available in the Dead Souls lib to hunt down the source of the ! problem:
!
!
! elog
!
If the file is somewhere in your home directory, just type: elog 

This will provide you a listing of the last few lines of your personal
error log. Warning lines tell you about code that works but should
be fixed in some way. Lines that don't contain the word "Warning" are
error lines: they indicate something about your code that prevents
it from working. For example:

!
> update sample_room
!
---
*Error in loading object '/realms/cratylus/area/room/sample_room'
Object: /secure/cmds/creators/update at line 148

'<function>' at /secure/save/creators/c/cratylus (<function>) at /:0
'cmdAll' at /secure/save/creators/c/cratylus (/lib/command.c) at line 84
'cmd' at /secure/cmds/creators/update at line 109
'eventUpdate' at /secure/cmds/creators/update at line 148
'CATCH' at /secure/cmds/creators/update at line 148
Trace written to /log/catch
/realms/cratylus/area/room/sample_room: Error in update
*Error in loading object '/realms/cratylus/area/room/sample_room'
!
!


This output lets you know something is wrong, but
isn't very specific as to exactly what. If you look at your error
log, you probably will see something more detailed and helpful:


!
> elog
!
/log/errors/cratylus:

/realms/cratylus/area/room/sample_room.c line 10: Undefined variable 'Sample'
/realms/cratylus/area/room/sample_room.c line 10: parse error
!
!


Now you can see that the error is my syntax on
line 10. I would then use ed to examine the code, and specifically lines 9
through 11. It turns out that I forgot to put quotes around the room name,
so the parser tried to use it as a variable, which, of course, it couldn't.

If the file in question is in /secure, you'd type elog secure , or if
it's in /cmds, elog cmds , and so on.


dbxwhere & dbxframe

Two helpful debugging commands are dbxframe and dbxwhere. Let's
take a look at my broken sample_room.c file. We'll start with dbxwhere,
which lists for us the chain of events that led to the error. The
indivudual steps are called frames.

> dbxwhere
*Error in loading object '/realms/cratylus/area/room/sample_room'
Object: /secure/cmds/creators/update at line 148

#0: '<function>' at /secure/save/creators/c/cratylus (<function>) at /:0
#1: 'cmdAll' at /secure/save/creators/c/cratylus (/lib/command.c) at line 84
#2: 'cmd' at /secure/cmds/creators/update at line 109
#3: 'eventUpdate' at /secure/cmds/creators/update at line 148
#4: 'CATCH' at /secure/cmds/creators/update at line 148
!
! The output is similar to the update error we saw above, but in ! ennumerating the steps, dbxwhere
! lets us use dbxframe to get ! tighter detail on a given error frame:
!
! > dbxframe 4
! ------
!     ! /secure/cmds/creators/update.c:148 - CATCH(0)
!     ! ----------------------------------------------------------------
!         ! if( args == base_name(this_object()) ) {
!             ! this_player()->eventPrint("Cannot reload update after destruct.\n"
!               ! "It will be reloaded at next reference.");
!             ! return 0;
!         ! }
!     =>  ! tmp = catch(call_other(args, "???"));
!         ! if( !tmp ) {
!             ! if(identify(flags ^ U_AUTOMATED) ==
!     ! "8")this_player()->eventPrint(args + ": Ok");
!             ! return 1;
!         ! } else this_player()->eventPrint(args + ": Error in update\n" + tmp);
!         ! return 0;
!
!
!     We're now looking at the error context for error ! frame 4. The output of the command shows
! us part of the file that was performing the evaluation when the error ! occurred, and even
! points out the offending line using a text arrow: =>
!
!     In this particular case, the information is not that ! helpful. We are being told that
! the error occurred while we were using the update command, and it ! failed at the line
! where update does its thing. Duh, we knew that. The elog command was much more helpful.
!
!     Where this kind of tracing comes in handy is when ! you enounter a runtime error
! when you're not updating a file. For example, if I tried to enter that ! room, rather than
! update it, I'd get a big pukey error message and not know why. If you ! run into an
! unexpected error, dbxwhere ! will help you pinpoint it if elog ! doesn't provide useful information,
! and dbxframe will help detail the source of the problem.

!
Tail
!
!     This is a version of the unix tail command. It ! displays the last few lines of a file.
! This command is important for examining crucial log files:
!
! tail /log/catch
tail /log/runtime
!
tail /log/player_errors


!
Dead Souls Homepage
!

! ! --- 1,256 ---- ! ! Dead Souls debugging ! ! Debugging ! in Dead Souls
!
! So you've ! made some cool stuff but darn it, it doesn't work. There are ! various
! tools ! available in the Dead Souls lib to hunt down the source of the ! problem:
!
!
! elog
!
If the file is somewhere in your home directory, just type: elog 

This will provide you a listing of the last few lines of your personal
error log. Warning lines tell you about code that works but should
be fixed in some way. Lines that don't contain the word "Warning" are
error lines: they indicate something about your code that prevents
it from working. For example:

!
> update ! sample_room
!
---
*Error in loading object '/realms/cratylus/area/room/sample_room'
Object: /secure/cmds/creators/update at line 148

'<function>' at /secure/save/creators/c/cratylus (<function>) at /:0
'cmdAll' at /secure/save/creators/c/cratylus (/lib/command.c) at line 84
'cmd' at /secure/cmds/creators/update at line 109
'eventUpdate' at /secure/cmds/creators/update at line 148
'CATCH' at /secure/cmds/creators/update at line 148
Trace written to /log/catch
/realms/cratylus/area/room/sample_room: Error in update
*Error in loading object '/realms/cratylus/area/room/sample_room'
!
!


This output lets you know something is wrong, but
isn't very specific as to exactly what. If you look at your error
log, you probably will see something more detailed and helpful:


!
> elog
!
/log/errors/cratylus:

/realms/cratylus/area/room/sample_room.c line 10: Undefined variable 'Sample'
/realms/cratylus/area/room/sample_room.c line 10: parse error
!
!


Now you can see that the error is my syntax on
line 10. I would then use ed to examine the code, and specifically lines 9
through 11. It turns out that I forgot to put quotes around the room name,
so the parser tried to use it as a variable, which, of course, it couldn't.

If the file in question is in /secure, you'd type elog secure , or if
it's in /cmds, elog cmds , and so on.


dbxwhere & dbxframe

Two helpful debugging commands are dbxframe and dbxwhere. Let's
take a look at my broken sample_room.c file. We'll start with dbxwhere,
which lists for us the chain of events that led to the error. The
indivudual steps are called frames.

> dbxwhere
*Error in loading object '/realms/cratylus/area/room/sample_room'
Object: /secure/cmds/creators/update at line 148

#0: '<function>' at /secure/save/creators/c/cratylus (<function>) at /:0
#1: 'cmdAll' at /secure/save/creators/c/cratylus (/lib/command.c) at line 84
#2: 'cmd' at /secure/cmds/creators/update at line 109
#3: 'eventUpdate' at /secure/cmds/creators/update at line 148
#4: 'CATCH' at /secure/cmds/creators/update at line 148
!
! The output is ! similar to the update error we saw above, but in ! ennumerating the steps, dbxwhere
! lets us use dbxframe to get ! tighter detail on a given error frame:
!
! > dbxframe ! 4
! ------
!     ! /secure/cmds/creators/update.c:148 - CATCH(0)
!     ! ----------------------------------------------------------------
!         ! if( args == base_name(this_object()) ) {
!             ! this_player()->eventPrint("Cannot reload update after destruct.\n"
!               ! "It will be reloaded at next reference.");
!             ! return 0;
!         ! }
!     ! =>  ! tmp = catch(call_other(args, "???"));
!         ! if( !tmp ) {
!             ! if(identify(flags ^ U_AUTOMATED) ==
!     ! "8")this_player()->eventPrint(args + ": Ok");
!             ! return 1;
!         ! } else this_player()->eventPrint(args + ": Error in update\n" + tmp);
!         ! return 0;
!
!
!     ! We're now looking at the error context for error ! frame 4. The output of the command shows
! us part of ! the file that was performing the evaluation when the error ! occurred, and even
! points out ! the offending line using a text arrow: =>
!
!     ! In this particular case, the information is not that ! helpful. We are being told that
! the error ! occurred while we were using the update command, and it ! failed at the line
! where update ! does its thing. Duh, we knew that. The elog command was much ! more helpful.
!
!     ! Where this kind of tracing comes in handy is when ! you enounter a runtime error
! when you're ! not updating a file. For example, if I tried to enter that ! room, rather than
! update it, ! I'd get a big pukey error message and not know why. If you ! run into an
! unexpected ! error, dbxwhere ! will help you pinpoint it if elog ! doesn't provide useful information,
! and dbxframe will help detail the source of the problem.

!
! tell_player(), ! debug()

!
!     Sometimes it's hard to fix code if you don't know ! what it's doing. In
! the above example, you might want to know what the variable "args" is, ! if
! your code is behaving unexpectedly. You could find out by adding a line ! like:
!
! tell_player("cratylus", "args is: ! "+identify(args));
!
! or:
!
!
tell_player("cratylus", ! "%^BLUE%^args ! is: "+identify(args)+"%^RESET%^");

!
!     You could also use:
!
! debug("args is: ", args);
!
! or:
!
!
debug("args is: ", args, ! "blue");

!
!     ...which has the advantage of being shorter to type ! and you'll get
! the message more promptly. To be able to receive debug messages,
! you need to enable your debugging mode by typing:
!
! debug on
!
!     debug() is available in 2.0r20 and above.
!

!
tail
!
!     ! This is a version of the unix tail command. It ! displays the last few lines of a file.
! This command ! is important for examining crucial log files:
!
! tail ! /log/catch
tail /log/runtime
!
tail /log/player_errors


!
bk ! & restore
!
!
These commands ! aren't so much for debugging as they ! are for safe coding. Before you
! edit a file, ! it is a very good idea to back it up first. The bk command lets you
! quickly and ! conveniently back up a file before you edit it. When I ! typed:
!
! bk ! sample_room
!
! A file with a ! unique identifying number was created in my bak/ ! directory. If I
! were to type ! it again, then sample_room.c would get copied again to ! bak/, with
! a new unique ! number added to the name.
!
!     ! The number is basically the number of seconds ! elapsed since January 1, 1970.
! Adding this ! number, we can keep track of which backed up version of a ! file
! is most ! recent by looking at the name.
!
!     ! Suppose I edited a file called sample_npc.c. I use ! bk to back it up, make some changes,
! then use bk ! again, make some more changes, but now it won't update. I ! don't
! feel like ! debugging, I just need this file working again, so I want to ! restore from
! backup. The ! sequence of commands would look something like this:
!
! ed ! sample_npc.c
! bk ! sample_npc
! ed ! sample_npc.c
! update ! sample_npc.c
! <error ! occurs here>
! restore ! sample_npc
!
!     ! The reason identifying numbers are used is that you ! can also choose to
! restore the ! second-to-last backup version of a file, and other previous
! versions.
!     ! The very last backup version is effectively version ! 0, so it's not
! necessary to ! specify a number. If I wanted to restore the version I ! backed
! up before ! that one, I would type something like this:
!
! restore ! sample_npc 1
!
!     ! And if I wanted the version before that one, I'd ! specify 2 instead of 1,
! and so on.
!
!     ! Please note that this is an intentionally simple ! system. There are
! no menus, no ! version branches, or diff tracking. The reason for this is
! that it is ! not a versioning ! system. It is a backup ! system. It is a convenient
! tool to back ! out of screwups, not a development tool to test file ! versions.
!
!
!
Dead Souls Homepage
!

! \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/www/ds-admin-faq.html ds2.0r20b/lib/www/ds-admin-faq.html *** ds2.0r18/lib/www/ds-admin-faq.html Fri Mar 24 14:34:51 2006 --- ds2.0r20b/lib/www/ds-admin-faq.html Sun Apr 9 23:48:46 2006 *************** *** 1,243 **** ! ! ! ! Dead Souls Admin FAQ ! !
Dead Souls Admin FAQ, v2.4

Written by Cratylus @ Frontiers, October 2005
Updated March 2006

Note: commands are displayed in boldface, like this: ls -a

What's this FAQ about?


The point of this document is to orient a new admin in
Dead Souls 2. Starting a MUD with a lib that is completely new to
you can be confusing and discouraging. Hopefully this FAQ will
make the experience less difficult.


How do I start?

Start by reading the Dead Souls FAQ for some background
on where this lib came from and what you can do with it.


What's the QCS?

Please see the QCS example page for an explanation of this
important Dead Souls system.


Is there a MUD somewhere running Dead Souls I can log into?

As a convenience to the curious, I have set up a "demo" mud
at dead-souls.net, port 6666. To connect, either click on
this link with your browser, or open a terminal window
(or for windows users, Start -> Run ) and
type: telnet
dead-souls.net 6666

When you log in, the system will read your playerfile for
a few seconds and then it will turn you into a creator. This
is so that you can examine code, try out the QCS, etc.

Please note that in the regular, non-demo version of the
mud, people are NOT automatically given creator status.

On the regular non-demo version of the mud, Only
the admin (basically, the first person to log on to the new mud)
gets automatic creatorship.

After logging in, you will be transported
to your workroom. Some useful commands:

look
look at me
look at chest
open chest
look in chest
get tricorder from chest
read index in handbook
read chapter 1 in handbook
who
stat
wiz
create new npc generic
look at board
read 1 on board
home


I like Dead Souls and I want to use it, but I don't want to run a mud.

Being a mud admin is very different from being just a coder
or builder, and many people just don't feel like dealing with
the hassle of running a mud.
There are a few Dead Souls muds out there that could
use help from you. Telnet to the Dead Souls development mud
and type: mudlist -m dead to see a list of Dead Souls muds
that might be hiring.
You can also just code on the Dead Souls development
mud. You're welcome to create as you please, and if your
building gets to the point where you'd like it included in
the lib, let me know and I'll inspect it for approval.
Please note that anything you code on the Dead Souls
development is automatically eligible for inclusion in the
standard Dead Souls mudlib distribution, so if you want
to prevent your code from being used that way, don't code
on my mud.


I want to invite my friends to help me code. How do I
promote them to creator status?

As admin, you have access to the admintool
command. This opens a menu-driven admin system you
can use to manage some basic aspects of your new MUD.

Everything on admintool can be done with
commands, system calls, or file editing, but until
you get the hang of all that stuff, admintool
is a convenient shortcut.
In this example, you would type: admintool ,
then select option 3, then option l (that's a lowercase "L").

The oldfashioned way, if the new creator
were named dude, would be: encre dude

I know. But people like menus, so I made it.


What about intermud? How do I talk on that?

The intermud3 (or i3) network is available
to you, and you are probably already connected to it. Type
mudlist to see a list of other muds on the network.

By default, the "Dead Souls intermud channel" is
enabled for creators. Type: ds blah blah
and other Dead Souls muds on the i3 network will see
your message like this:

You@YourMud <ds> blah blah

To enable intergossip and intercre, read
/doc/README for instructions.

Please note that intercre is where you ask coding
and technical questions only. Random chatting is not
tolerated on that channel. Newbie questions that are
Dead Souls specific or that obviously have answers in
Dead Souls documentation will meet a hostile reception on
intercre.

Conversely, intergossip is mostly chat. Please
be warned that discussions on intergossip are usually
offensive, argumentative, and generally aggressive.
This hostility is especially sharp when you
are identified as a "newbie". You will almost certainly
be mocked and insulted no matter what you say, but
especially if your first messages betray you as
ignorant of intergossip standards and traditions. I
strongly recommend you lurk on this channel for a few
days before saying anything.

Really, I recommend you avoid the intergossip channel entirely.


I talk on intermud but nobody replies. What's up with that?

I3 uses a hub topology. All muds communicating on intermud
connect to the router to do so. If that router is down all
i3 communication stops, until it comes back up. To check
network status, ping Frontiers or Dead Souls. If the
ping command gets no answer, i3 is probably down, or
your connection to it has been interrupted. Your mud will
be aware of this and retry to connect to i3 every
fifteen minutes or so.

There's also the possibility that nobody who wants to
chat is listening.


How did you know my mud started up?

The same way your mud knows that i3 is up or
down. A while ago I noticed that i3 can be very
unreliable, and sometimes when it goes down and
comes back up, people's muds don't refresh their
connection, and they can be off intermud for days
without realizing it.

I implemented a "keepalive" system which
uses the intermud "auth" packets as pings. Every
fifteen minutes or so, you mud tries to ping Frontiers
and Dead Souls. If it gets a reply from at least one,
then it's happy. If neither reply, then your mud
alerts the Arch room that intermud is down, and it
will reload the intermud daemon every 15 minutes
in an attempt to reconnect. Once i3 is back up and
you are reconnected, you go back to pinging.

This means that Frontiers and Dead Souls
get a bunch of pings all the time. When a mud we've
never heard of before pings us, we get a message
about it, and so we know a new mud is online.

If this makes you feel like Big Brother
is watching you, you can probably just delete
the file /daemon/services/auth.c and then update
the file /daemon/services.c without causing harm
to your mud.


What's this about a manual on Frontiers?

It's no longer relevant. All the docs
we were making available on Frontiers are now included
in Dead Souls, starting from version 1.9r9.

In your workroom is a chest. Open the
chest and the new Dead Souls Creators Manual is
inside. The text files are in /doc/manual .


How do I add limbs to a race?

Edit /secure/cfg/races/<race> and make the changes
you want. Then use admintool to remove the race from the
races daemon, then add re-add the race.


How do I make my friend an admin?

Use the groups menu in admintool, and select
"Modify a group". Select the ASSIST or SECURE group,
and enter the names of all the members it should have. If
I wanted to make xyzzy an assistant admin, I would
make him a creator, then I would edit the
ASSIST group and make the contents look like this:

cratylus:xyzzy

Xyzzy then needs to log out and log back in.


I don't like how the who command output looks! How can I change it?

Believe it or not, I actually get questions like this. I also
get stuff like "my workroom is broken! fix it!"

If there is something broken about the lib itself, such as
an insta-death bug or a command that crashes the mud, I am
happy and eager to hear about it, so I can implement the fix
in the next lib release.
However, if the problem you're having is that the lib,
by design, behaves in a way not to your liking, this isn't something
I'm likely to "fix" for you. For example, if you want a "who"
command with a cooler look, that's up to you to make. You're
the one coding a mud, so you need to take it upon yourself to
understand the code and modify it to suit your tastes.
Similarly, "orcs are too strong!" or "advancing levels
should increase your eyesight" are issues you need to deal
with on your own, using the coding skills learned from reading the
Creators Manual.


Can you please make the FAQ easier to read? It's too long and complicated.

I'm a lib coder, not a web designer. Cut me slack. Or, edit it
for me and show me how it's done.


Most of the file headers have only Descartes's name on them. Did
you really develop this lib or did he?

Both. The lib he released in 1997 was his, and so almost every
file on it had his name. I've been working on it since, but
I am very lazy about headers. I work on lots of files at the
same time, and authorship attribution tends to rank very low
on my priority list. Therefore, even though a great majority
of the files in the lib have been either heavily modified or
created by me, my name is on very few.

I haven't bothered to go back and revise headers either,
because, honestly, what a pain in the butt that would be. I'm
satisfied knowing there's little doubt who has made the many
changes on the lib.


How can I change the colors of the channel messages?

The colors are specified in /secure/daemon/chat.c


How do I know what other muds use Dead Souls?


Go to the arch room. Type: arch

Then type
: read screen

This shows a list of muds that used Dead Souls and
joined intermud at some point. To see a list that
also includes obvious test muds, type: read printout

See the creator's FAQ for more intermud command info.


I was hanging out in the Arch room and the loudspeaker went off. WTF?

Your mud receives all sorts of network requests from the
intermud network, such are remote who (asking who is logged on),
remote finger (info on users), locate (trying to find a user
somewhere on i3), etc. Whenever your mud receives such a request,
it is announced in the Arch room. Note that these are normal,
and do not represent an attempt to undermine your security.


I want to test the intermud channel but I don't want to spam the ds line.

Type: call me->AddChannel("ds_test")
Then type: ds_test test

The ds_test channel is specifically for communication
testing so that ds can remain spam free.


The web server and FTP server don't work

To enable them at mud boot time, uncomment the "inet" line in
/secure/cfg/preload.cfg

To enable it temporarily, type: update /secure/daemon/inet

These servers do not use the standard ports. The internet standard
http port is 80 and for ftp it is 21. Your mud ftp and web servers
do not use these.
Instead, the network port for your web server is 5 less
than your mud's port, and the ftp port is 1 less.
This means that if your mud is reached by telnetting
to port 6666, your ftp server will be at 6665 and your web server
will be at 6661.

Please note that the web and ftp server are not supported. They work,
but whatever security risk they pose is entirely on you.


I tried to log in to the FTP server but I can't!

Make sure you use your mud name and mud password, not the
username and password of the computer you are on.


I can't do anything with FTP. It just hangs there.

FTP is a funny sort of protocol. If you don't have a direct
connection to an FTP server (for example, you are behind a
firewall), you have to use PASV (or passive) mode. Unfortunately,
at this time, PASV is not implemented in the mud FTP server.


The web server gives me a 404 but I know the directory is there.

Like the FTP server, the web server is a very simple program.
It does not do directory listings at all. If you request
a directory, and it can't find an "index.html" file, it
just errors out.

It will also barf if a file you try to serve is
unusually large.

Let me make this point one final, excruciatingly clear time:
If you need a webserver, use apache. The mud www server is available
as a convenience, not as a production-quality standards-compliant
intarweb server.


I'm using an external FTP server, but the files I transfer
become read only!

You need to make sure that the FTP server you use
runs as the same user as the mud driver does, otherwise
you'll have permissions conflicts.


I moved a command from one directory to another. How do I get the new location recognized?

First, run update on the command in question.
then:
If it's not a verb: update /daemon/command
If it's a verb: update /daemon/verbs


The mudtime is all wrong!

The mudtime command tells you what time it is in the game, not what time
it is in the real world.


The time of day is all wrong!

If you used admintool to change your timezone and the time of day is still
wrong, you may be using an OS with timekeeping that Dead Souls doesn't
understand. If this is so, figure out how many hours off you are, and
enter that value into the EXTRA_TIME_OFFSET parameter in /secure/include/config.h


What happened to the roommaker and thingmaker?

They produced code that was often incompatible with QCS. They are no
longer supported.


I keep getting 'Connection to address server (localhost 9999) refused.'

This is a harmless error. Dead Souls uses a program called addr_server to
try to resolve hostnames. However, hostname resolution is not important
to running the mud, so it's not automatically configured. If you run
addr_server with a specific port as an argument, and edit mudos.cfg to
point to that port for the addr_server, then reboot the mud, then you
will probably have hostname resolution in your mud.

However, not all OS'es handle name resolution the same, so this may not
work, even if you do everything exactly right. Either way, it doesn't
affect the mud.


Can I charge players a fee for playing on my mud?

NO.

Dead Souls uses MudOS, and MudOS has a license that specifically
and strictly forbids its use in a commercial way. I don't care how
you use the lib, but if you use it with MudOS, you need to comply
with MudOS licensing. If you were to port Dead Souls to some other
driver that allows commercial use, then you'd be all set.

Can people donate money to me for the mud?

Yes.

So long as there is no quid-pro-quo, or anything
about the transaction that is legally regarded as "commercial",
receiving money from people for the purpose of running the
mud is ok. However, I am not a lawyer, so read the MudOS
license yourself.

You should not try to bend the rules. For
example, public television channels often give trinkets to
donors as a token of their appreciation. If someone donates
money to you for your mud and they get a "thank you gift",
this is a quid-pro-quo, or "something for something", and
it's not right.

This is a MudOS thing, not a Dead Souls thing.
If you can't abide by MudOS licensing, just port Dead
Souls to some driver that lets you do commercial stuff.
Then please tell me how you did it, so I can pass on the
leetness to others.


I found a bug. For real. Can you please fix it?

Email me: <put my name here>@users.sourceforge.net

Please include a detailed description of the bug, and the exact
error text and commands that produced it. A log file or
screencap would be helpful.


Where would I edit to change how long someone can be idle before they get disconnected?

1) Modify IDLE_TIMEOUT in /secure/include/config.h
Don't do this with a Windows editor.

2) update /secure/daemon/master

3) update -r /lib/player

Instead of the updates you can reboot the mud.


How do I permit all users who log in to become creators automatically?

1) Set AUTO_WIZ
in /secure/include/config.h to 1
Don't do this with a Windows editor.

2) update /secure/daemon/master

3) update /secure/lib/connect

Instead of the updates you can reboot the mud.


How do I limit the use of intermud channels?

1) Set RESTRICTED_INTERMUD in /secure/include/config.h to 1
Don't do this with a Windows editor.

2) Add the players who are allowd to use intermud channels to
the intermud group using admintool.

3) update /secure/daemon/master

4) update /daemon/services/*

5) update /daemon/services

6) update /daemon/intermud

7) update /secure/daemon/chat

Instead of these updates, you could just reboot the mud.


How do I get off intermud completely?

1) Set DISABLE_INTERMUD in /secure/include/config.h to 1
Don't do this with a Windows editor.

2) update /secure/daemon/master

3) update /daemon/intermud


How do I change the start room for the mud?

1) change ROOM_START in /secure/include/rooms.h
Don't do this with a Windows editor.

2) reboot the mud


I don't like having newbies get special treatment.

1) Set MAX_NEWBIE_LEVEL in /secure/include/config.h to 0
Don't do this with a Windows editor.

2) reboot the mud


I made a change to /lib/player.c and updated it, but I'm
not seeing a difference in my character.


If an object (you) is loaded into memory, it contains
the features and functions of its file and inherited files
at the time it was loaded.

Changing those files and updating them doesn't do
anything to an object that is already loaded using the
old code.

In a case like this, what you want to do is
recursively update the file of the object in question,
then reload the object.

Let's say you modified /lib/npc.c so that
npc's sit down by default. Say you want the fighter in
your test room to possess this new functionality.

If you type: reload -r fighter

then the fighter's file is recursively updated,
the current version of the fighter is whisked away, and
a new version of the fighter is created, incorporating
the new auto-sit feature.

If the change in question is to lib/player.c
or some other file inherited by you, you would
type:

update -r /lib/creator

But you are still using that same old body as
before, so you'll need to quit and log back in to
get a new body using the new code.


How do I change the items new players receive?

Look in /lib/player.c for the function that gives
new players jeans and a t-shirt. Modify this
function to suit you. Make absolutely sure that
the objects you put there actually clone
correctly.

Remember to bk /lib/player before editing this file,
because if you screw it, then log off without
restoring a working copy, you will be sad.


Hey, there's no <foo> class! What's up with that?

True, there is no samurai class, and in fact, as of
this writing there is no cleric, acrobat, frombotzer,
or basketweaver.

The reason for this is that the Dead Souls
mudlib distribution isn't intended to be 100% ready for
players to show up and start doing quests.

What quests there are, what races, classes,
areas, objects, rooms, and NPC's you find in the
distribution are examples. If you open your mud
to players and what you've got is the Orcslayer and
newbie mansion quests, you might as well just close down.
In fact, please do.

Dead Souls is a starting point for a mud.
I have no way of knowing if you're going to have
mermen in an aquatic-theme mud. I have no clue
whether your space aliens will have 8 tentacles or
16 (they like base2, dontcha know).

So, no, there's no <foo>, because the
responsibility for making the mud in your creative
vision is yours, not mine. My job is to give you
a lib with enough working examples and enough
documentation so that you can code your own
basketweaving bugblatter beasts.



Where can I get a Dead Souls mud hosted?

That's a heck of a good question. There are many mud hosting services
out there. I hear good things about Kyndig, but that isn't specific
to Dead Souls. A good host will have a high level of service, shell
and file transfer access, etc, for which you obviously will need
to pay money.

There is at least one free mud hosting service I'm
aware of, and that's FrostMud. It's basically a guy and a Linux
server with room on it for muds. If you beg adequately, he might
let you put your mud on his server for free. I tested it and
Dead Souls installed and ran there without any problems. However,
he doesn't support anything, you're on your own, and bandwidth is
on a "you'll get it when it's there" basis.

There's no such thing as a free lunch. If you want
a reliably solid, well supported, feature-rich platform for your
mud, quit being a cheapskate and cough up the $20/mo. That's
like, what, one espresso every couple of days.

If you have a DSL or cable modem, and your computer is
up all the time, you can just use that, too. Your IP may be
dynamic, making it tough for people to find you, but there are
dynamic-dns services out there that help keep your ip
tied to a specific name.

If you're really hard up you can email me and beg for
me to host you for free, but expect me to be hostile about it,
and you'll get no fancy schmutz like a web page or shell access.
And if your mud gets on my nerves (being inactive for a long
time is enough to do that) I'll just wipe it. Possibly without
even warning you. It's not that I'm a jerk or I like being mean.
I just don't have a lot of time for nonsense.


Your LIB_MXLPLX system is all screwy. I changed it and it works. Wanna see?

Hell yes. I'm not just in this for my health. I want
more people coding in LPC so I can look at the fresh ideas and
new perspectives of other people (read: swipe code).

Send me an invitation to your mud by email or <ds>. I'd
love to look at your work.

If it is code you are willing to donate to Dead Souls, I
will gladly accept its submission, also by email. There's no
guarantee it will make it into any future release, but it just might.

Please be aware that by doing so, you release your normal
copyright to the code and license it GPL, allowing me to publish it and
preventing you from revoking my right to distribute it.

You also represent that you *have* copyright to do this
in the first place, and hold me harmless in any subsequent
dispute between you and any other third party.

If you want to email me code but wish to retain normal
copyright, please state so clearly in the body of your email. I
will honor that request
(and it's the law so I don't really
have a choice). Just be aware I will not put code into Dead
Souls that anyone has non-GPL'ed copyright to.

Also, I don't want to hear from anyone about my
use of legal terms of art. I know damn well it's more complicated
than I make it sound. My phrasing is sufficient to make
the legal practical transaction of ideas possible here.


How are files organized in Dead Souls?

cd / and ls to view the top level directory. The
list may be largely meaningless to you, so let's review it here:

cfg/

General configuration files for timezone and such.

cmds/

Main location of commands that don't require special access
privileges. Commands are different from verbs in that they tend
not to manipulate your environment, but rather deal with
the player's relationship to the system and/or files.


daemon/

Daemons are files that provide access to data files in an
organized way. For example, adding an occupational class
(like, say, assassin) to the game needs to be done in a
precise way in order for it not to break things. By sending
the data to the daemon first, you can be sure that the
new system configuration is entered properly. Daemons also
provide a means to access data, like "how much is silver
worth compared to gold", that is uniform across the mud, and
prevents accidental overwrites of data files by multiple
editors.


doc/

General documentation.


domains/

This is where MUD game areas go when they are complete
and ready for general play by the public. Once here, only
admins have write access to the files.


ftp/

The base for the MUD ftpd. Using the ftpd is probably dangerous
in terms of your system security, and I discourage it, but if
you are determined to have mud ftp access for your creators,
this is one way. See /secure/lib/net for the actual server. It
may or may not work. I won't support it.


include/

Include files provide a set of constants for your files. For
example, if you include <damage_types.h>, you can specify in
the code for your chainmail that it protects against
the damage type "BLADE" at a certain level.


lib/

This is the heart of the Dead Souls lib. This is the location
of the files that your objects, be they swords, shoes, or
handguns, will use as their configuration base.


log/

Log files.


news/

Announcements are made here. For example, in /news/creator
you can post a notice that you have added a teleportation
spell, and when your creators log on, they will see the message.


obj/

Contains some important templates, especially some for the QCS.

open/

Legacy directory. Kept for compatibility. Historically this
directory has served as a place where creators can put code
for others to freely modify.


realms/

This is where creator home directories are.


save/

Files that describe properties of the MUD's systems live
here. The number of limbs that a bat has, for example,
is in races.o. In classes.o you'll find the skill ranges
for fighters. Do not edit these files. They must be
modified by daemons only, or you risk corrupting them.


secure/

This directory will be described in a separate section below.


shadows/

Shadows are a controversial feature of LPC. This directory
is designed for shadow objects, but they should be very
rarely, if ever used. Basically shadow objects are objects
that attach themselves to another object, intercepting
function calls. For obvious reasons this is a security
risk, so unless you really really know what you're doing,
avoid them.


spells/

Pretty self explanatory. The spells daemon looks for spells here.


tmp/

A directory anyone can write to. Generally for swapping
data between objects, systems, or people.


verbs/

Another controversial topic. Verbs are a kind of command. For
example, go and sit and open are verbs. Specifically, verbs
are commands that interact with the user's environment. The
idea is that throw my first red rock at the green goblin
should work, and should work the same everywhere on the
MUD. Verbs are a source of debate among some people, because
to folks accustomed to add_action commands, verbs seem
excessively complex.

www/

Like the ftp directory, but for the MUD webserver.


Ok now let's take a quick look at the /secure directory: ls /secure
As you can see, /secure seems to have many of the same directories
that the root filesystem has.
The reason a /secure directory is needed is that
there are files that should not be readable by everyone, and
there are files that must be writable only by a few. The MUD security
system uses the /secure directory as a means to control access to
such files.
For example, the average creator has no business
accessing the player data files of other creators or players. Therefore
/secure/save/creators and /secure/save/players is offlimits to them.

A directory without a counterpart in / is /secure/sefun. This
is where simulated external functions reside.


What are sefuns and efuns?

First let me explain that the driver has built-in
functions that are available to the mud. For example,
type eval return find_player("cratylus") , but replace my name
with yours. Your player object pointer will be found and returned
to you (more or less. strictly speaking it's more complicated).
The driver provides this function. Because it is "external"
to the mudlib, that is, it's in the driver and not the lib,
it is called an external function, or more commonly, "efun". The
idea is that certain actions you ask the mud to perform are
so common that they are made available MUD-wide.

Efuns are ridiculously useful and powerful, and because
they are in the driver as compiled code, very fast. A near-complete
set of efun documentation is available in /doc/efun.

However, the driver does not contain every possible
MUD-wide function you might want. For example, there is a
tell_object() efun, which lets you send a message to an object
such as a player. The syntax is something like this:

tell_object(find_player("cratylus"),"Hi.");

Which doesn't look like much, but believe me, this
kind of stuff adds up. I wanted to make this simpler, so I
used what is called a sefun, or a simulated efun. It is
a function that is available lib-wide, but it isn't in
the driver. Instead it is provided by the lib itself (the
master daemon, specifically). By adding the appropriate code
in /secure/sefun/ I have now made available a tell_player() sefun,
which works like this:

tell_player("cratylus","Hi.")

This simplification of code will become more obviously
useful to you as you get more coding under your belt. Most
sefuns are documented in /doc/sefun.



Whew! Ok now I know where stuff is. What's next?

You probably want to examine how objects are written.
Type goto /domains/town/room/road and wander around town
a bit. If you want to see the code for something, for example,
the beggar, about beggar should do it, provided the beggar is
in the room.

To see the filenames of the objects around you,
type scan here, or scan me to scan your own inventory.

If you've never coded before, this is the hard part.
To understand what you're looking at when you run commands like
more /domains/town/weap/orcslayer.c you need to get comfortable
with LPC.
The brute force way of doing this is copying stuff
and then changing the descriptions, thus making new stuff.
This will work, but you'll waste time looking for examples of
exactly what you want to do..and you may not find them.
Instead, learning LPC will let you create whatever
you want, without relying on templates.

This means that now you must read the LPC Basic
manual, then the LPC Intermediate manual. As admin, your
creators will expect you to know what's in there.

On your person or in the chest in your workroom is
the Creators Manual. Read both the Players Handbook and
the Creators Manual from cover to cover.


Oh, man, you're kidding! Those are, like, books! Can't I
just start making stuff?

Well...ok. But you need to go through the docs
soon, ok? In the meantime, read the QCS chapters in the
Creators Manual to get you quick-started in the creation
process. Remember you need to be holding your Creator
Staff in order to access the QCS commands.

Other useful tools in your chest are a remote
control and a medical tricorder.


Everything is su-u-u-u-p-e-e-r-r-r s-s-l-o-o-o-o-w-w-w

First, make sure you are using the latest available version of
Dead Souls (check here or here). Older versions of Dead Souls
are known to have nasty memory leaks.

Next, see if you have runaway objects. An object can be coded
to do really unpleasant stuff like replicate itself over and
over until it brings the mud to its knees. Find out how many
objects are loaded by typing: eval return sizeof(objects())

If the count is in the thousands, and only a few people are
logged on, you may have a runaway. Most often this involves
NPC's doing stuff you didn't expect. Reset all loaded rooms
with the following command:

resetall

perhaps followed by a:

flushobs

If the lag clears up, you found the culprit. If not, see if
the callouts list is clogged with the command: callouts

If all else fails, reboot the mud and ask for help on the ds line.

Please note that the rage virus (especially if unleashed
in the menagerie) is notorious for redlining the mud. Having
hundreds of NPC's all engaging in simultaneous combat
while infecting each other with a rapidly spreading hostility
virus can be expected to impact overall performance. So please try
to avoid the rage virus unless you are specifically stress testing
your system.


Dude! One of my creators just kicked me off my own mud!

One of the virtues of LPC is that it is flexible and powerful.
One of the drawbacks of LPC is that it is flexible and powerful.

It is not possible to make an LPC mud that is
immune to abuse from creators. You just can't. The MudOS
function set is just too complex and sophisticated to eliminate
every possibility of abuse.

You will therefore *always* be vulnerable to things
like people coding objects that crash the mud on purpose (I
won't detail how that can be done, but anyone with intermediate
LPC skill can do it, and utter newbies can even do it with
a stupid enough mistake), finding a way to dest admins, or
continually updating recursively the /lib filesystem. A
jackass will always find a way to expose you to her jackassery.

This means that you need to know who is coding on your
mud and what they are doing. Your job as an admin is to
immediately deal with coders who pose a discipline problem.
If they fool you once, shame on them. If they fool you
twice..the..they...they shouldn't fool you twice is what I'm
saying.

This does not mean that Dead Souls is somehow
impossible to secure. You can easily prevent unauthorized
access to lib data. See the next section for how this works.

What you can't prevent is some dude off the internet
you just met and made a creator from wreaking havoc on your
mud and creating a nuisance of himself. You have to know who
these people are and you have to have a level of trust and
confidence in them, otherwise you need to use the decre
command.


Is Dead Souls secure?

The short answer is no, nothing I know of is "secure" in the
sense that you don't need to continually pay attention to it. If the
question is "Is Dead Souls particularly unsafe to run?" then the
answer is no. Just like any other Internet program you use, Dead Souls
is not an obvious security risk, so long as it is not used carelessly.
And, obviously, games of any kind, including Dead Souls, should never
be installed on any mission-critical, national security, public
safety, or health care server.

Dead Souls security involves two separate spheres:

1) The binary executable and the system that runs it.

2) The mudlib and the code that you use and create.

The first sphere is probably most important. Presumably
you plan to run a mud on a computer that does other things too,
and you want to keep those things separate from your mud. The
most important thing to do is to avoid running Dead Souls as a
privileged user. In the case of Windows, this means that the
program should not be run by Administrator or anyone in the
Administrator group.
For unix users, this means that the driver should not run
under uid 0 (root).

The reason for this precaution is that if some genius
hacker manages to exploit some unknown weakness in the program,
it is better that the process they hack doesn't have full admin
privileges to the box.
This caution has little to do with Dead Souls specifically.
It is a warning I'd give to anyone planning to run any kind of network
server. You should take your own security seriously, and
if you do not understand your own security situation, you need to take
a step back and ask yourself if running a mud at all is a good idea.

Sphere 2 is lib security. In older muds, file and directory
privileges were handled by attributes on the files. If a file's
user id (UID) matched a user's UID, then that user had full access
to it. Such systems often had complex systems that evaluated
effective UID (EUID) based on the file's attributes, its parent
directory, the user's ID, possibly group id, etc. This is an
entirely valid security model, but because of its complexity,
it tended to be exploited easily and often. If you don't
stay 100% on top of such a system (just like any OS), there's
no way to be sure you won't rooted.

With stack security, privilege management is much, much
easier. A file's privilege is based solely on its location. If
a user doesn't have read access to /foo/bar/ then she can't read
or modify /foo/bar/file.c. If someone with privs to that location
copies the file to somewhere else, then the privs of that new location
are in force on the file.
The "stack" part of stack security comes from the mud
evaluating the privileges of all the objects involved in the
access request. If you're unprivileged and you manage to get a
privileged object to make the access request for you, the access
will fail, because you are unprivileged, and you are still part
of the function call stack (i.e., the list of instructions that
form a chain between the command and the intended event).

Granular (more detailed) modification of user privileges
can be done by changing files in /secure/cfg to grant
users and groups specific privileges.


I sent you my code a week ago. Is it in or out?

How long it takes me to review code submissions has nothing
to do with what I think of you, your skills, or your
code. It takes me a long time because Dead Souls isn't
actually my job, and is not a physical member of my
family, so it has to wait its turn sometimes, for my attention.
Sometimes I will get to someone else's code sooner even
though I received yours first. What can I say. Sometimes
I feel like dealing with a particular thing at a particular
time.


Did you finish the bfd() sefun modification I asked you for last night?

I'm on the ds line a lot, and generally accommodate people's
requests right away if I have time. This makes it seem
sometimes like I can turn orders around in minutes or
hours, like a short-order cook.
This is an illusion. I do this sometimes
for requests that strike my fancy or that are so simple
they are not inconvenient, or maybe because I happen to
be bored at that moment. But my sometimes doing this
doesn't mean folks should expect some sort of prompt
turnaround on special requests.
In general, I am not sitting at my desk waiting
for code orders. I'm doing something else. If I get to
your request right away, then good for you. If I don't,
then I'll get to it when I get to it.


The queeg daemon is a horrendous mess. It's inefficient and frankly offensive.

I'm not an especially gifted programmer. In fact, I view
myself rather as a Pakled from the Star Trek series. I
look for things that make the code go. I look for things
that make the code strong. Sometimes, because I am not
a trained or professional programmer, things are done
in a way that shock the conscience of more sophisticated
practitioners.
If you find such code (and I do hope it is rare),
bringing to my attention that it has been implemented in a
wretched way doesn't help me. I know that. I wrote it. If
you want to help, send me an email with the fixed code.

You implemented my code but didn't give me credit.

Whoops. Send me an email telling me where I goofed and I'll fix it.


Intermud mail doesn't work

No it doesn't. It's actually a pretty complicated system to
implement, so get used to just local mud mail for now. It
is definitely planned for the future, though.


The admintool menus let you pick options that aren't visible

I can't decide whether this is a feature or a bug. I'm
leaning toward "laziness" as the cause.


What does locking the mud do, exactly?

When the mud is locked, only members of the authorized
groups are permitted to log in. By default, these
groups are SECURE, ASSIST, ELDER, and TEST. Anyone
who is not a member of these groups, whether they are
a creator or a player, is prevented from logging in.


The race help output is inadequate for role-playing. How do I change it?

By default, help human will output various characteristics
of the human race, as known to the race daemon. If you
want instead to provide your own help data on the history and
lore of humans, simply create a file called /doc/help/races/human
and put your information in it. That information will then
be what is displayed when requesting help on that race.


I need to know what features to expect in the next release so I don't
waste time duplicating effort

To find out what the next release will definitely
have, telnet to dead-souls.net 6666. If you don't
already have a character there, your new one will be
made a creator. You can then type:

more /doc/RELEASE_NOTES

to see what the development mud has. That is
what you can definitely expect to see in the next release.
Note that this will differ from the /doc/RELEASE_NOTES
on your mud, because as new stuff is added to the
devel mud, it gets documented in that mud's RELEASE_NOTES.
To find out what I'm working on, or what
I'm planning to work on, log into
dead-souls.net 6666
and type:

finger cratylus

You will see my .plan file, which is basically
the to-do list I work off of. Some of it is written
with the expectation that I'm the only one who needs to
understand it, so it may not all make sense to you.
Anything with an asterisk (*) in front of
it is being currently worked on.


You need a development roadmap and task tracking

No, I don't. If I had developers and teams and
such things, then I'd use all the fancy project
management stuff available on Sourceforge.
But I don't want to manage developers,
I want to lib code. If you want to help develop
the lib, then that's really great. Follow the instructions
from the previous question and look at my plan file
for something that looks interesting and that
doesn't have an asterisk. Tell me you'd like
to take that project, and I'll mark it as yours.
That's it. Send it to me when yer done.
If I get tired of waiting I'll tell you
I'm going to do it myself, like I was planning
all along, and you'll be relieved of that expectation.
Setting up some kind of sophisticated
collaboration tool to get 3 pieces of code from
2 people, and me having to be on people's backs
for results and stuff...this is not what I
signed up for and I'm not doing it.


How do I update a sefun without rebooting the mud?

To have your new nit_pick() sefun take effect in the
running mud, you might do something like this:

update /secure/sefun/nit_pick.c

update /secure/sefun/sefun.c


I had a really great idea that revolutionizes ds and you
refuse to include it. I am forking ds development and
making my dream come true.

Ok then, have fun. All I ask is that you give your
project a name that isn't going to confuse people
as to which lib is which. Confusing your user base
isn't a good way to get started on such an enterprise.
Send us a post card once in a while.


What do the version numbers mean?

2.0r16 means "Major version 2, minor version 0, release number 16".
Releases happen pretty frequently, to add functionality and fix bugs
from the previous release. When the basic functionality of a minor
version is as bug free as reasonably possible, a new minor version
change happens.
Major version number changes are very rare and represent a
vast difference from the old major version. Versions 1 and 2 of
Dead Souls are so different as to be largely incompatible with each
other's code.
As of this writing, the goal of releasing version 2.1 looms.
The significance of this milestone is that Dead Souls 2.1 is
intended to be the fulfillment of the promise that there was in
version 1.1. After the release of Dead Souls 2.1, the focus of
development will be in adding major systems and functionality
that 1.1 was hoped to have, but never did.

- ! Cratylus

! Dead Souls Homepage
! ! --- 1,13 ---- ! ! Dead Souls Admin FAQ ! !
Dead Souls Admin FAQ, v2.6

Written by Cratylus @ Frontiers, October 2005
Updated April 2006

Note: commands are displayed in boldface, like this: ls -a

What's this FAQ about?


The point of this document is to orient a new admin in
Dead Souls 2. Starting a MUD with a lib that is completely new to
you can be confusing and discouraging. Hopefully this FAQ will
make the experience less difficult.


How do I start?

Start by reading the Dead Souls FAQ for some background
on where this lib came from and what you can do with it.


Is there a MUD somewhere running Dead Souls I can log into?

As a convenience to the curious, I have set up a "demo" mud
at rugose.com, port 6666. To connect, either click on
this link with your browser, or open a terminal window
(or for windows users, Start -> Run ) and
type: telnet
rugose.com 6666

When you log in, the system will read your playerfile for
a few seconds and then it will turn you into a creator. This
is so that you can examine code, try out the QCS, etc.

Please note that in the regular, non-demo version of the
mud, people are NOT automatically given creator status.

On the regular non-demo version of the mud, Only
the admin (basically, the first person to log on to the new mud)
gets automatic creatorship.

After logging in, you will be transported
to your workroom. Some useful commands:

look
look at me
look at chest
open chest
look in chest
get tricorder from chest
read index in handbook
read chapter 1 in handbook
who
stat
wiz
create new npc generic
look at board
read 1 on board
home


I like Dead Souls and I want to use it, but I don't want to run a mud.

Being a mud admin is very different from being just a coder
or builder, and many people just don't feel like dealing with
the hassle of running a mud.
There are a few Dead Souls muds out there that could
use help from you. Telnet to the Dead Souls development mud
and type: mudlist -m dead to see a list of Dead Souls muds
that might be hiring.
You can also just code on the Dead Souls development
mud. You're welcome to create as you please, and if your
building gets to the point where you'd like it included in
the lib, let me know and I'll inspect it for approval.
Please note that anything you code on the Dead Souls
development is automatically eligible for inclusion in the
standard Dead Souls mudlib distribution, so if you want
to prevent your code from being used that way, don't code
on my mud.


I want to invite my friends to help me code. How do I
promote them to creator status?

As admin, you have access to the admintool
command. This opens a menu-driven admin system you
can use to manage some basic aspects of your new MUD.

Everything on admintool can be done with
commands, system calls, or file editing, but until
you get the hang of all that stuff, admintool
is a convenient shortcut.
In this example, you would type: admintool ,
then select option 3, then option l (that's a lowercase "L").

The oldfashioned way, if the new creator
were named dude, would be: encre dude

I know. But people like menus, so I made it.


What about intermud? How do I talk on that?

The intermud3 (or i3) network is available
to you, and you are probably already connected to it. Type
mudlist to see a list of other muds on the network.

By default, the "Dead Souls intermud channel" is
enabled for creators. Type: ds blah blah
and other Dead Souls muds on the i3 network will see
your message like this:

You@YourMud <ds> blah blah

To enable intergossip and intercre, read
/doc/README for instructions.

Please note that intercre is where you ask coding
and technical questions only. Random chatting is not
tolerated on that channel. Newbie questions that are
Dead Souls specific or that obviously have answers in
Dead Souls documentation will meet a hostile reception on
intercre.

Conversely, intergossip is mostly chat. Please
be warned that discussions on intergossip are usually
offensive, argumentative, and generally aggressive.
This hostility is especially sharp when you
are identified as a "newbie". You will almost certainly
be mocked and insulted no matter what you say, but
especially if your first messages betray you as
ignorant of intergossip standards and traditions. I
strongly recommend you lurk on this channel for a few
days before saying anything.

Really, I recommend you avoid the intergossip channel entirely.


I talk on intermud but nobody replies. What's up with that?

I3 uses a hub topology. All muds communicating on intermud
connect to the router to do so. If that router is down all
i3 communication stops, until it comes back up. To check
network status, ping Frontiers or Dead Souls. If the
ping command gets no answer, i3 is probably down, or
your connection to it has been interrupted. Your mud will
be aware of this and retry to connect to i3 every
fifteen minutes or so.

There's also the possibility that nobody who wants to
chat is listening.

It's also possible that the Dead Souls I3 router has
changed address or port. Visit this page to get the
latest conenction info:

Dead Souls I3 Router Page



How did you know my mud started up?

The same way your mud knows that i3 is up or
down. A while ago I noticed that i3 can be very
unreliable, and sometimes when it goes down and
comes back up, people's muds don't refresh their
connection, and they can be off intermud for days
without realizing it.

I implemented a "keepalive" system which
uses the intermud "auth" packets as pings. Every
fifteen minutes or so, you mud tries to ping Frontiers
and Dead Souls. If it gets a reply from at least one,
then it's happy. If neither reply, then your mud
alerts the Arch room that intermud is down, and it
will reload the intermud daemon every 15 minutes
in an attempt to reconnect. Once i3 is back up and
you are reconnected, you go back to pinging.

This means that Frontiers and Dead Souls
get a bunch of pings all the time. When a mud we've
never heard of before pings us, we get a message
about it, and so we know a new mud is online.

If this makes you feel like Big Brother
is watching you, you can probably just delete
the file /daemon/services/auth.c and then update
the file /daemon/services.c without causing harm
to your mud.


I heard there's an I3 router included in Dead Souls.

Please see the router page for details.


What's this about a manual on Frontiers?

It's no longer relevant. All the docs
we were making available on Frontiers are now included
in Dead Souls, starting from version 1.9r9.

In your workroom is a chest. Open the
chest and the new Dead Souls Creators Manual is
inside. The text files are in /doc/manual .


How do I add limbs to a race?

Edit /secure/cfg/races/<race> and make the changes
you want. Then use admintool to remove the race from the
races daemon, then add re-add the race.


How do I add a race?

Copy a race in
/secure/cfg/races/ and edit it.
For example:

cp
/secure/cfg/races/bear /secure/cfg/races/wampa

Edit the wampa file to reflect what you think a
wampa is like. If you want new players to be able
to select wampa as their race, make sure the file
has this line in it:

PLAYER_RACE 1

Make especially sure to change the lines RACE and
LANGUAGE. When you're done editing, type:

addrace wampa



How do I make my friend an admin?

Use the groups menu in admintool, and select
"Modify a group". Select the ASSIST or SECURE group,
and enter the names of all the members it should have. If
I wanted to make xyzzy an assistant admin, I would
make him a creator, then I would edit the
ASSIST group and make the contents look like this:

cratylus:xyzzy

Xyzzy then needs to log out and log back in.


I don't like how the who command output looks! How can I change it?

Believe it or not, I actually get questions like this. I also
get stuff like "my workroom is broken! fix it!"

If there is something broken about the lib itself, such as
an insta-death bug or a command that crashes the mud, I am
happy and eager to hear about it, so I can implement the fix
in the next lib release.
However, if the problem you're having is that the lib,
by design, behaves in a way not to your liking, this isn't something
I'm likely to "fix" for you. For example, if you want a "who"
command with a cooler look, that's up to you to make. You're
the one coding a mud, so you need to take it upon yourself to
understand the code and modify it to suit your tastes.
Similarly, "orcs are too strong!" or "advancing levels
should increase your eyesight" are issues you need to deal
with on your own, using the coding skills learned from reading the
Creators Manual.


Can you please make the FAQ easier to read? It's too long and complicated.

I'm a lib coder, not a web designer. Cut me slack. Or, edit it
for me and show me how it's done.


Most of the file headers have only Descartes's name on them. Did
you really develop this lib or did he?

Both. The lib he released in 1997 was his, and so almost every
file on it had his name. I've been working on it since, but
I am very lazy about headers. I work on lots of files at the
same time, and authorship attribution tends to rank very low
on my priority list. Therefore, even though a great majority
of the files in the lib have been either heavily modified or
created by me, my name is on very few.

I haven't bothered to go back and revise headers either,
because, honestly, what a pain in the butt that would be. I'm
satisfied knowing there's little doubt who has made the many
changes on the lib.


How can I change the colors of the channel messages?

The colors are specified in /secure/daemon/chat.c


How do I know what other muds use Dead Souls?


Go to the arch room. Type: arch

Then type
: read screen

This shows a list of muds that used Dead Souls and
joined intermud at some point. To see a list that
also includes obvious test muds, type: read printout

See the creator's FAQ for more intermud command info.


I was hanging out in the Arch room and the loudspeaker went off. WTF?

Your mud receives all sorts of network requests from the
intermud network, such are remote who (asking who is logged on),
remote finger (info on users), locate (trying to find a user
somewhere on i3), etc. Whenever your mud receives such a request,
it is announced in the Arch room. Note that these are normal,
and do not represent an attempt to undermine your security.


I want to test the intermud channel but I don't want to spam the ds line.

Type: call me->AddChannel("ds_test")
Then type: ds_test test

The ds_test channel is specifically for communication
testing so that ds can remain spam free.


What's this "Network room"?

There is a room below the Arch room called the network room.
It is intended to facilitate troubleshooting of network
and intermud problems. Unless you're intimately familiar
with Dead Souls network code, I suggest avoiding this
room, as it is very messy and very noisy.


The web server and FTP server don't work

To enable them at mud boot time, uncomment the "inet" line in
/secure/cfg/preload.cfg

To enable it temporarily, type: update /secure/daemon/inet

These servers do not use the standard ports. The internet standard
http port is 80 and for ftp it is 21. Your mud ftp and web servers
do not use these.
Instead, the network port for your web server is 5 less
than your mud's port, and the ftp port is 1 less.
This means that if your mud is reached by telnetting
to port 6666, your ftp server will be at 6665 and your web server
will be at 6661.

Please note that the web and ftp server are not supported. They work,
but whatever security risk they pose is entirely on you.


I tried to log in to the FTP server but I can't!

Make sure you use your mud name and mud password, not the
username and password of the computer you are on.


I can't do anything with FTP. It just hangs there.

FTP is a funny sort of protocol. If you don't have a direct
connection to an FTP server (for example, you are behind a
firewall), you have to use PASV (or passive) mode. Unfortunately,
at this time, PASV is not implemented in the mud FTP server.


The web server gives me a 404 but I know the directory is there.

Like the FTP server, the web server is a very simple program.
It does not do directory listings at all. If you request
a directory, and it can't find an "index.html" file, it
just errors out.

It will also barf if a file you try to serve is
unusually large.

Let me make this point one final, excruciatingly clear time:
If you need a webserver, use apache. The mud www server is available
as a convenience, not as a production-quality standards-compliant
intarweb server.


I'm using an external FTP server, but the files I transfer
become read only!

You need to make sure that the FTP server you use
runs as the same user as the mud driver does, otherwise
you'll have permissions conflicts.


I moved a command from one directory to another. How do I get the new location recognized?

First, run update on the command in question.
then:
If it's not a verb: update /daemon/command
If it's a verb: update /daemon/verbs


The mudtime is all wrong!

The mudtime command tells you what time it is in the game, not what time
it is in the real world.


The time of day is all wrong!

If you used admintool to change your timezone and the time of day is still
wrong, you may be using an OS with timekeeping that Dead Souls doesn't
understand. If this is so, figure out how many hours off you are, and
enter that value into the EXTRA_TIME_OFFSET parameter in /secure/include/config.h

Also make sure to change your timezone during daylight saving
changes. For example, EDT to EST, and vice versa.


What happened to the roommaker and thingmaker?

They produced code that was often incompatible with QCS. They are no
longer supported.


I keep getting 'Connection to address server (localhost 9999) refused.'

This is a harmless error. Dead Souls uses a program called addr_server to
try to resolve hostnames. However, hostname resolution is not important
to running the mud, so it's not automatically configured. If you run
addr_server with a specific port as an argument, and edit mudos.cfg to
point to that port for the addr_server, then reboot the mud, then you
will probably have hostname resolution in your mud.

However, not all OS'es handle name resolution the same, so this may not
work, even if you do everything exactly right. Either way, it doesn't
affect the mud.


Can I charge players a fee for playing on my mud?

NO.

Dead Souls uses MudOS, and MudOS has a license that specifically
and strictly forbids its use in a commercial way. I don't care how
you use the lib, but if you use it with MudOS, you need to comply
with MudOS licensing. If you were to port Dead Souls to some other
driver that allows commercial use, then you'd be all set.

Can people donate money to me for the mud?

Yes.

So long as there is no quid-pro-quo, or anything
about the transaction that is legally regarded as "commercial",
receiving money from people for the purpose of running the
mud is ok. However, I am not a lawyer, so read the MudOS
license yourself.

You should not try to bend the rules. For
example, public television channels often give trinkets to
donors as a token of their appreciation. If someone donates
money to you for your mud and they get a "thank you gift",
this is a quid-pro-quo, or "something for something", and
it's not right.

This is a MudOS thing, not a Dead Souls thing.
If you can't abide by MudOS licensing, just port Dead
Souls to some driver that lets you do commercial stuff.
Then please tell me how you did it, so I can pass on the
leetness to others.


I found a bug. For real. Can you please fix it?

Email me: <put my name here>@users.sourceforge.net

Please include a detailed description of the bug, and the exact
error text and commands that produced it. A log file or
screencap would be helpful.


Where would I edit to change how long someone can be idle before they get disconnected?

1) Modify IDLE_TIMEOUT in /secure/include/config.h
Don't do this with a Windows editor.

2) update /secure/daemon/master

3) update -r /lib/player

Instead of the updates you can reboot the mud.


How do I permit all users who log in to become creators automatically?

1) Set AUTO_WIZ
in /secure/include/config.h to 1
Don't do this with a Windows editor.

2) update /secure/daemon/master

3) update /secure/lib/connect

Instead of the updates you can reboot the mud.


How do I limit the use of intermud channels?

1) Set RESTRICTED_INTERMUD in /secure/include/config.h to 1
Don't do this with a Windows editor.

2) Add the players who are allowd to use intermud channels to
the intermud group using admintool.

3) update /secure/daemon/master

4) update /daemon/services/*

5) update /daemon/services

6) update /daemon/intermud

7) update /secure/daemon/chat

Instead of these updates, you could just reboot the mud.


How do I get off intermud completely?

1) Set DISABLE_INTERMUD in /secure/include/config.h to 1
Don't do this with a Windows editor.

2) update /secure/daemon/master

3) update /daemon/intermud


How do I change the start room for the mud?

1) change ROOM_START in /secure/include/rooms.h
Don't do this with a Windows editor.

2) reboot the mud


I don't like having newbies get special treatment.

1) Set MAX_NEWBIE_LEVEL in /secure/include/config.h to 0
Don't do this with a Windows editor.

2) reboot the mud


I don't want players to be able to pick non-human races.

1) Set HUMANS_ONLY in
/secure/include/config.h to 1
Don't do this with a Windows editor.

2) reboot the mud

* Note that this will not affect players who are
already non-human.


I want everyone to speak the same language.

1) Set ENGLISH_ONLY in /secure/include/config.h to 1
Don't do this with a Windows editor.

2) reboot the mud

* Note that this may not affect players who already
are not native English speakers. To change them,
type:

call players_name_here->SetNativeLanguage("English")



I made a change to /lib/player.c and updated it, but I'm
not seeing a difference in my character.


If an object (you) is loaded into memory, it contains
the features and functions of its file and inherited files
at the time it was loaded.

Changing those files and updating them doesn't do
anything to an object that is already loaded using the
old code.

In a case like this, what you want to do is
recursively update the file of the object in question,
then reload the object.

Let's say you modified /lib/npc.c so that
npc's sit down by default. Say you want the fighter in
your test room to possess this new functionality.

If you type: reload -r fighter

then the fighter's file is recursively updated,
the current version of the fighter is whisked away, and
a new version of the fighter is created, incorporating
the new auto-sit feature.

If the change in question is to lib/player.c
or some other file inherited by you, you would
type:

update -r /lib/creator

But you are still using that same old body as
before, so you'll need to quit and log back in to
get a new body using the new code.


How do I change the items new players receive?

Look in /lib/player.c for the function that gives
new players jeans and a t-shirt. Modify this
function to suit you. Make absolutely sure that
the objects you put there actually clone
correctly.

Remember to bk /lib/player before editing this file,
because if you screw it, then log off without
restoring a working copy, you will be sad.


Hey, there's no <foo> class! What's up with that?

True, there is no samurai class, and in fact, as of
this writing there is no cleric, acrobat, frombotzer,
or basketweaver.

The reason for this is that the Dead Souls
mudlib distribution isn't intended to be 100% ready for
players to show up and start doing quests.

What quests there are, what races, classes,
areas, objects, rooms, and NPC's you find in the
distribution are examples. If you open your mud
to players and what you've got is the Orcslayer and
newbie mansion quests, you might as well just close down.
In fact, please do.

Dead Souls is a starting point for a mud.
I have no way of knowing if you're going to have
mermen in an aquatic-theme mud. I have no clue
whether your space aliens will have 8 tentacles or
16 (they like base2, dontcha know).

So, no, there's no <foo>, because the
responsibility for making the mud in your creative
vision is yours, not mine. My job is to give you
a lib with enough working examples and enough
documentation so that you can code your own
basketweaving bugblatter beasts.



Where can I get a Dead Souls mud hosted?

That's a heck of a good question. There are many mud hosting services
out there. I hear good things about Kyndig, but that isn't specific
to Dead Souls. A good host will have a high level of service, shell
and file transfer access, etc, for which you obviously will need
to pay money.

There is at least one free mud hosting service I'm
aware of, and that's FrostMud. It's basically a guy and a Linux
server with room on it for muds. If you beg adequately, he might
let you put your mud on his server for free. I tested it and
Dead Souls installed and ran there without any problems. However,
he doesn't support anything, you're on your own, and bandwidth is
on a "you'll get it when it's there" basis.

There's no such thing as a free lunch. If you want
a reliably solid, well supported, feature-rich platform for your
mud, quit being a cheapskate and cough up the $20/mo. That's
like, what, one espresso every couple of days.

If you have a DSL or cable modem, and your computer is
up all the time, you can just use that, too. Your IP may be
dynamic, making it tough for people to find you, but there are
dynamic-dns services out there that help keep your ip
tied to a specific name.

If you're really hard up you can email me and beg for
me to host you for free, but expect me to be hostile about it,
and you'll get no fancy schmutz like a web page or shell access.
And if your mud gets on my nerves (being inactive for a long
time is enough to do that) I'll just wipe it. Possibly without
even warning you. It's not that I'm a jerk or I like being mean.
I just don't have a lot of time for nonsense.


Your LIB_MXLPLX system is all screwy. I changed it and it works. Wanna see?

Hell yes. I'm not just in this for my health. I want
more people coding in LPC so I can look at the fresh ideas and
new perspectives of other people (read: swipe code).

Send me an invitation to your mud by email or <ds>. I'd
love to look at your work.

If it is code you are willing to donate to Dead Souls, I
will gladly accept its submission, also by email. There's no
guarantee it will make it into any future release, but it just might.

Please be aware that by doing so, you release your normal
copyright to the code and license it GPL, allowing me to publish it and
preventing you from revoking my right to distribute it.

You also represent that you *have* copyright to do this
in the first place, and hold me harmless in any subsequent
dispute between you and any other third party.

If you want to email me code but wish to retain normal
copyright, please state so clearly in the body of your email. I
will honor that request
(and it's the law so I don't really
have a choice). Just be aware I will not put code into Dead
Souls that anyone has non-GPL'ed copyright to.

Also, I don't want to hear from anyone about my
use of legal terms of art. I know damn well it's more complicated
than I make it sound. My phrasing is sufficient to make
the legal practical transaction of ideas possible here.


How are files organized in Dead Souls?

cd / and ls to view the top level directory. The
list may be largely meaningless to you, so let's review it here:

cfg/

General configuration files for timezone and such.

cmds/

Main location of commands that don't require special access
privileges. Commands are different from verbs in that they tend
not to manipulate your environment, but rather deal with
the player's relationship to the system and/or files.


daemon/

Daemons are files that provide access to data files in an
organized way. For example, adding an occupational class
(like, say, assassin) to the game needs to be done in a
precise way in order for it not to break things. By sending
the data to the daemon first, you can be sure that the
new system configuration is entered properly. Daemons also
provide a means to access data, like "how much is silver
worth compared to gold", that is uniform across the mud, and
prevents accidental overwrites of data files by multiple
editors.


doc/

General documentation.


domains/

This is where MUD game areas go when they are complete
and ready for general play by the public. Once here, only
admins have write access to the files.


ftp/

The base for the MUD ftpd. Using the ftpd is probably dangerous
in terms of your system security, and I discourage it, but if
you are determined to have mud ftp access for your creators,
this is one way. See /secure/lib/net for the actual server. It
may or may not work. I won't support it.


include/

Include files provide a set of constants for your files. For
example, if you include <damage_types.h>, you can specify in
the code for your chainmail that it protects against
the damage type "BLADE" at a certain level.


lib/

This is the heart of the Dead Souls lib. This is the location
of the files that your objects, be they swords, shoes, or
handguns, will use as their configuration base.


log/

Log files.


news/

Announcements are made here. For example, in /news/creator
you can post a notice that you have added a teleportation
spell, and when your creators log on, they will see the message.


obj/

Contains some important templates, especially some for the QCS.

open/

Legacy directory. Kept for compatibility. Historically this
directory has served as a place where creators can put code
for others to freely modify.


realms/

This is where creator home directories are.


save/

Files that describe properties of the MUD's systems live
here. The number of limbs that a bat has, for example,
is in races.o. In classes.o you'll find the skill ranges
for fighters. Do not edit these files. They must be
modified by daemons only, or you risk corrupting them.


secure/

This directory will be described in a separate section below.


shadows/

Shadows are a controversial feature of LPC. This directory
is designed for shadow objects, but they should be very
rarely, if ever used. Basically shadow objects are objects
that attach themselves to another object, intercepting
function calls. For obvious reasons this is a security
risk, so unless you really really know what you're doing,
avoid them.


spells/

Pretty self explanatory. The spells daemon looks for spells here.


tmp/

A directory anyone can write to. Generally for swapping
data between objects, systems, or people.


verbs/

Another controversial topic. Verbs are a kind of command. For
example, go and sit and open are verbs. Specifically, verbs
are commands that interact with the user's environment. The
idea is that throw my first red rock at the green goblin
should work, and should work the same everywhere on the
MUD. Verbs are a source of debate among some people, because
to folks accustomed to add_action commands, verbs seem
excessively complex.

www/

Like the ftp directory, but for the MUD webserver.


Ok now let's take a quick look at the /secure directory: ls /secure
As you can see, /secure seems to have many of the same directories
that the root filesystem has.
The reason a /secure directory is needed is that
there are files that should not be readable by everyone, and
there are files that must be writable only by a few. The MUD security
system uses the /secure directory as a means to control access to
such files.
For example, the average creator has no business
accessing the player data files of other creators or players. Therefore
/secure/save/creators and /secure/save/players is offlimits to them.

A directory without a counterpart in / is /secure/sefun. This
is where simulated external functions reside.


What are sefuns and efuns?

First let me explain that the driver has built-in
functions that are available to the mud. For example,
type eval return find_player("cratylus") , but replace my name
with yours. Your player object pointer will be found and returned
to you (more or less. strictly speaking it's more complicated).
The driver provides this function. Because it is "external"
to the mudlib, that is, it's in the driver and not the lib,
it is called an external function, or more commonly, "efun". The
idea is that certain actions you ask the mud to perform are
so common that they are made available MUD-wide.

Efuns are ridiculously useful and powerful, and because
they are in the driver as compiled code, very fast. A near-complete
set of efun documentation is available in /doc/efun.

However, the driver does not contain every possible
MUD-wide function you might want. For example, there is a
tell_object() efun, which lets you send a message to an object
such as a player. The syntax is something like this:

tell_object(find_player("cratylus"),"Hi.");

Which doesn't look like much, but believe me, this
kind of stuff adds up. I wanted to make this simpler, so I
used what is called a sefun, or a simulated efun. It is
a function that is available lib-wide, but it isn't in
the driver. Instead it is provided by the lib itself (the
master daemon, specifically). By adding the appropriate code
in /secure/sefun/ I have now made available a tell_player() sefun,
which works like this:

tell_player("cratylus","Hi.")

This simplification of code will become more obviously
useful to you as you get more coding under your belt. Most
sefuns are documented in /doc/sefun.



Whew! Ok now I know where stuff is. What's next?

You probably want to examine how objects are written.
Type goto /domains/town/room/road and wander around town
a bit. If you want to see the code for something, for example,
the beggar, about beggar should do it, provided the beggar is
in the room.

To see the filenames of the objects around you,
type scan here, or scan me to scan your own inventory.

If you've never coded before, this is the hard part.
To understand what you're looking at when you run commands like
more /domains/town/weap/orcslayer.c you need to get comfortable
with LPC.
The brute force way of doing this is copying stuff
and then changing the descriptions, thus making new stuff.
This will work, but you'll waste time looking for examples of
exactly what you want to do..and you may not find them.
Instead, learning LPC will let you create whatever
you want, without relying on templates.

This means that now you must read the LPC Basic
manual, then the LPC Intermediate manual. As admin, your
creators will expect you to know what's in there.

On your person or in the chest in your workroom is
the Creators Manual. Read both the Players Handbook and
the Creators Manual from cover to cover.


Oh, man, you're kidding! Those are, like, books! Can't I
just start making stuff?

Well...ok. But you need to go through the docs
soon, ok? In the meantime, read the QCS chapters in the
Creators Manual to get you quick-started in the creation
process. Remember you need to be holding your Creator
Staff in order to access the QCS commands.

Other useful tools in your chest are a remote
control and a medical tricorder.


Everything is su-u-u-u-p-e-e-r-r-r s-s-l-o-o-o-o-w-w-w

First, make sure you are using the latest available version of
Dead Souls (check here or here). Older versions of Dead Souls
are known to have nasty memory leaks.

Next, see if you have runaway objects. An object can be coded
to do really unpleasant stuff like replicate itself over and
over until it brings the mud to its knees. Find out how many
objects are loaded by typing: eval return sizeof(objects())

If the count is in the thousands, and only a few people are
logged on, you may have a runaway. Most often this involves
NPC's doing stuff you didn't expect. Reset all loaded rooms
with the following command:

resetall

perhaps followed by a:

flushobs

If the lag clears up, you found the culprit. If not, see if
the callouts list is clogged with the command: callouts

If all else fails, reboot the mud and ask for help on the ds line.

Please note that the rage virus (especially if unleashed
in the menagerie) is notorious for redlining the mud. Having
hundreds of NPC's all engaging in simultaneous combat
while infecting each other with a rapidly spreading hostility
virus can be expected to impact overall performance. So please try
to avoid the rage virus unless you are specifically stress testing
your system.


Dude! One of my creators just kicked me off my own mud!

One of the virtues of LPC is that it is flexible and powerful.
One of the drawbacks of LPC is that it is flexible and powerful.

It is not possible to make an LPC mud that is
immune to abuse from creators. You just can't. The MudOS
function set is just too complex and sophisticated to eliminate
every possibility of abuse.

You will therefore *always* be vulnerable to things
like people coding objects that crash the mud on purpose (I
won't detail how that can be done, but anyone with intermediate
LPC skill can do it, and utter newbies can even do it with
a stupid enough mistake), finding a way to dest admins, or
continually updating recursively the /lib filesystem. A
jackass will always find a way to expose you to her jackassery.

This means that you need to know who is coding on your
mud and what they are doing. Your job as an admin is to
immediately deal with coders who pose a discipline problem.
If they fool you once, shame on them. If they fool you
twice..the..they...they shouldn't fool you twice is what I'm
saying.

This does not mean that Dead Souls is somehow
impossible to secure. You can easily prevent unauthorized
access to lib data. See the next section for how this works.

What you can't prevent is some dude off the internet
you just met and made a creator from wreaking havoc on your
mud and creating a nuisance of himself. You have to know who
these people are and you have to have a level of trust and
confidence in them, otherwise you need to use the decre
command.


Is Dead Souls secure?

The short answer is no, nothing I know of is "secure" in the
sense that you don't need to continually pay attention to it. If the
question is "Is Dead Souls particularly unsafe to run?" then the
answer is no. Just like any other Internet program you use, Dead Souls
is not an obvious security risk, so long as it is not used carelessly.
And, obviously, games of any kind, including Dead Souls, should never
be installed on any mission-critical, national security, public
safety, or health care server.

Dead Souls security involves two separate spheres:

1) The binary executable and the system that runs it.

2) The mudlib and the code that you use and create.

The first sphere is probably most important. Presumably
you plan to run a mud on a computer that does other things too,
and you want to keep those things separate from your mud. The
most important thing to do is to avoid running Dead Souls as a
privileged user. In the case of Windows, this means that the
program should not be run by Administrator or anyone in the
Administrator group.
For unix users, this means that the driver should not run
under uid 0 (root).

The reason for this precaution is that if some genius
hacker manages to exploit some unknown weakness in the program,
it is better that the process they hack doesn't have full admin
privileges to the box.
This caution has little to do with Dead Souls specifically.
It is a warning I'd give to anyone planning to run any kind of network
server. You should take your own security seriously, and
if you do not understand your own security situation, you need to take
a step back and ask yourself if running a mud at all is a good idea.

Sphere 2 is lib security. In older muds, file and directory
privileges were handled by attributes on the files. If a file's
user id (UID) matched a user's UID, then that user had full access
to it. Such systems often had complex systems that evaluated
effective UID (EUID) based on the file's attributes, its parent
directory, the user's ID, possibly group id, etc. This is an
entirely valid security model, but because of its complexity,
it tended to be exploited easily and often. If you don't
stay 100% on top of such a system (just like any OS), there's
no way to be sure you won't rooted.

With stack security, privilege management is much, much
easier. A file's privilege is based solely on its location. If
a user doesn't have read access to /foo/bar/ then she can't read
or modify /foo/bar/file.c. If someone with privs to that location
copies the file to somewhere else, then the privs of that new location
are in force on the file.
The "stack" part of stack security comes from the mud
evaluating the privileges of all the objects involved in the
access request. If you're unprivileged and you manage to get a
privileged object to make the access request for you, the access
will fail, because you are unprivileged, and you are still part
of the function call stack (i.e., the list of instructions that
form a chain between the command and the intended event).

Granular (more detailed) modification of user privileges
can be done by changing files in /secure/cfg to grant
users and groups specific privileges.


I sent you my code a week ago. Is it in or out?

How long it takes me to review code submissions has nothing
to do with what I think of you, your skills, or your
code. It takes me a long time because Dead Souls isn't
actually my job, and is not a physical member of my
family, so it has to wait its turn sometimes, for my attention.
Sometimes I will get to someone else's code sooner even
though I received yours first. What can I say. Sometimes
I feel like dealing with a particular thing at a particular
time.


Did you finish the bfd() sefun modification I asked you for last night?

I'm on the ds line a lot, and generally accommodate people's
requests right away if I have time. This makes it seem
sometimes like I can turn orders around in minutes or
hours, like a short-order cook.
This is an illusion. I do this sometimes
for requests that strike my fancy or that are so simple
they are not inconvenient, or maybe because I happen to
be bored at that moment. But my sometimes doing this
doesn't mean folks should expect some sort of prompt
turnaround on special requests.
In general, I am not sitting at my desk waiting
for code orders. I'm doing something else. If I get to
your request right away, then good for you. If I don't,
then I'll get to it when I get to it.


The queeg daemon is a horrendous mess. It's inefficient and frankly offensive.

I'm not an especially gifted programmer. In fact, I view
myself rather as a Pakled from the Star Trek series. I
look for things that make the code go. I look for things
that make the code strong. Sometimes, because I am not
a trained or professional programmer, things are done
in a way that shock the conscience of more sophisticated
practitioners.
If you find such code (and I do hope it is rare),
bringing to my attention that it has been implemented in a
wretched way doesn't help me. I know that. I wrote it. If
you want to help, send me an email with the fixed code.

You implemented my code but didn't give me credit.

Whoops. Send me an email telling me where I goofed and I'll fix it.


Intermud mail doesn't work

No it doesn't. It's actually a pretty complicated system to
implement, so get used to just local mud mail for now. It
is definitely planned for the future, though.


The admintool menus let you pick options that aren't visible

I can't decide whether this is a feature or a bug. I'm
leaning toward "laziness" as the cause.


What does locking the mud do, exactly?

When the mud is locked, only members of the authorized
groups are permitted to log in. By default, these
groups are SECURE, ASSIST, ELDER, and TEST. Anyone
who is not a member of these groups, whether they are
a creator or a player, is prevented from logging in.


The race help output is inadequate for role-playing. How do I change it?

By default, help human will output various characteristics
of the human race, as known to the race daemon. If you
want instead to provide your own help data on the history and
lore of humans, simply create a file called /doc/help/races/human
and put your information in it. That information will then
be what is displayed when requesting help on that race.


I need to know what features to expect in the next release so I don't
waste time duplicating effort

Visit http://dead-souls.net/RELEASE_NOTES for information on
the latest releases and what they contain. The topmost
version is usually not yet available for download, and
is listed so that folks know what's coming in the
next release. If this is so the version name will have
"(unreleased)" next to it.



You need a development roadmap and task tracking

No, I don't. If I had developers and teams and
such things, then I'd use all the fancy project
management stuff available on Sourceforge.
But I don't want to manage developers,
I want to lib code. If you want to help develop
the lib, then that's really great. Follow the instructions
from the previous question and look at my plan file
for something that looks interesting and that
doesn't have an asterisk. Tell me you'd like
to take that project, and I'll mark it as yours.
That's it. Send it to me when yer done.
If I get tired of waiting I'll tell you
I'm going to do it myself, like I was planning
all along, and you'll be relieved of that expectation.
Setting up some kind of sophisticated
collaboration tool to get 3 pieces of code from
2 people, and me having to be on people's backs
for results and stuff...this is not what I
signed up for and I'm not doing it.


How do I update a sefun without rebooting the mud?

To have your new nit_pick() sefun take effect in the
running mud, you might do something like this:

update /secure/sefun/nit_pick.c

update /secure/sefun/sefun.c


My new sefun updates but I can't seem to use it.

Make sure the sefun is prototyped in /secure/sefun/sefun.h

If the sefun is in a new file you created, make sure
that /secure/sefun/sefun.c inherits that file.


What's the point of the apostrophe-stripping for args in lib/command.c?

It's a cheap workaround for a parser problem. The full fix
is forthcoming.


How does one achieve 'high mortal' or 'ambassador' positions?

Those are legacy positions from Pre v1 Dead Souls. They are
basically groups, managed by an arch with admintool, which
can be granted privileges not normally enjoyed by mortals.
In the current implementation of Dead Souls, those
positions are vestigial. You can implement them on your
own mud however you please.


I would like XYZ and PDQ to happen every time the mud boots

The most common way to have this happen is to add
your daemon (and typically that's what you'll
want to start at boot) to /secure/cfg/preload.cfg .
This will ensure that it gets loaded
before the mud accepts any connections. It has the
added advantage of being included in the list of daemons
that the mud periodically checks and restarts if they
have died.

If it isn't a daemon, but rather some
specific function you want to happen at boot, simply
add the relevant code to /secure/daemon/autoexec.c


I can't login! I keep getting: "It seems some work is being
done right now, try later."

This is very bad. What this means is that some
files that are needed in order to load your player
object cannot be loaded. It can be any of a very large
number of files, which is the problem. Usually this
happens if you've been, for example, messing around
with player.c, then broke it, and rebooted the mud. Now
since player.c can't be loaded, you're locked out.
It could be any of the files loaded by your
player object, or other daemon files needed by your
login. The only way to narrow down the possible list of
files you corrupted is by examining the output of the
console (the window where you type the command line
to start the mud) and reviewing log/runtime and
log/catch for clues.
Once you've found the culprit, either fix it,
or replace it with the original version from the
Dead Souls distribution package.


I had a really great idea that revolutionizes ds and you
refuse to include it. I am forking ds development and
making my dream come true.

Ok then, have fun. All I ask is that you give your
project a name that isn't going to confuse people
as to which lib is which. Confusing your user base
isn't a good way to get started on such an enterprise.
Send us a post card once in a while.


What do the version numbers mean?

2.0r16 means "Major version 2, minor version 0, release number 16".
Releases happen pretty frequently, to add functionality and fix bugs
from the previous release. When the basic functionality of a minor
version is as bug free as reasonably possible, a new minor version
change happens.
Major version number changes are very rare and represent a
vast difference from the old major version. Versions 1 and 2 of
Dead Souls are so different as to be largely incompatible with each
other's code.
As of this writing, the goal of releasing version 2.1 looms.
The significance of this milestone is that Dead Souls 2.1 is
intended to be the fulfillment of the promise that there was in
version 1.1. After the release of Dead Souls 2.1, the focus of
development will be in adding major systems and functionality
that 1.1 was hoped to have, but never did.

- ! Cratylus

! Dead Souls Homepage
! \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/www/ds-creator-faq.html ds2.0r20b/lib/www/ds-creator-faq.html *** ds2.0r18/lib/www/ds-creator-faq.html Fri Mar 24 14:42:02 2006 --- ds2.0r20b/lib/www/ds-creator-faq.html Sun Apr 9 23:48:47 2006 *************** *** 1,296 **** ! ! ! ! Dead Souls Creator FAQ ! !
Dead Souls Creator FAQ, v2.3

Written by Cratylus @ Frontiers, March 2006

Note: commands are displayed in boldface, like this: ls -a

What's this FAQ about?


There are common issues and questions that crop
up for most new creators. This document is intended to
ease or at least shorten what can be a steep learning
curve.


!
!
Section 1: Getting Started


My question isn't on here. Where can I get an answer?

There are four main ways to get specific answers:

1) Ask your mud's administrator, or other creators on
your mud by using the cre channel, like this:

cre does the flux capacitor use verbs or add_actions?

To know what local channels are available on your
mud, type: lines


2) Your mud is probably on the intermud3 network. If
your administrator has not restricted intermud channels,
you should be able to ask questions on the Dead Souls
intermud channel, with a command like this:

ds hi! can someone tell me what room Leo lives in?

3) If intermud is down, or nobody is answering, or
you have a bug to report, you can also try emailing
me, the author of this doc, at: <my name here>@users.sourceforge.com


4) If intermud is down, you can also log into the
Dead Souls demo/development mud at dead-souls.net 6666
This mud automatically promotes users to
creator status, allowing guests to get a feel for
what developing on Dead Souls is like, and to provide
examples of current and not-yet-released lib code.
You can try to log into that mud and see if anyone
is available to answer your question.


Important note about asking on <ds>:

Part of the reason this FAQ was written is that
people who ask questions on the ds channel often do not
realize that same question has been asked many times
before. If you ask something like "how do I read the
channel messages I missed?" without first bothering to
read this doc and others, you just might get a response
that's less friendly than you might have expected.
People on the channel really want to help you,
but if it seems like you're not willing to put in the
time to try to help yourself, they might choose to
ignore you until you gather some clues on your own.

Something else to remember is that we are not
on your mud and we don't see what you see. "Why won't
my workroom update" lacks enough information to let
anyone try to help, but "when i try to update my
workroom I get <error message>" might.

Similarly, some things don't have an answer
that is suited to ds. "could someone help me
understand the score.c file?" or "how do quests work?"
have answers that are long, complex, and are
already covered in the documentation available
to you.

Some stuff just doesn't have an answer
that can be explained to you unless you already
have the experience you'd need to know the answer.
for example:

- How do I make a stargate that has a dial for
going to different places?

- How do I make it so a player can be on different
planes of existence, and what they see when they
look around depends on what plane they're on?

- How do I add limbs so people can wear stuff
like kneepads on the knee only?

These three questions illustrate things that are
totally doable, but whose explanation is so
complex and full of judgment calls that there
is no way of satisfying the question without
making you magically understand intermediate-level
LPC coding.
That doesn't mean they're bad ideas, or
even that hard to implement. It's just that
the questions can't be answered until you read
and understand the Creator's Manual, and by that
time, you'll know the answer on your own.

Make sure you've read the docs, then ask
the question in a way that makes it clear you aren't
just a lazy person who wants other people to do her
work, but rather a hardworking builder who has
tried to fix something and needs a specific answer
to a specific question that isn't already in the
FAQ's or the docs.

Critiques are welcome, but they should
be constructive. "This combat system is slow and
stupid" is unhelpful and might be taken as a
hostile statement. Instead you could phrase it
in a way such as: "Combat is slower than I
expected. Why? I used to play on LeetFooMud and it
took less than a minute to kill Tiamat." It's still
a bit clueless, but it's a fair question that can
be answered on its own terms without starting
a flamestorm.


The ds channel is too spammy. It's distracting me.

Enable or disable a channel by typing just its name. Like:

ds


All I did was change one thing in a file, and now it won't update. Help!

You should make it a habit to make backup copies of files
before editing them. That way, if you screw up the code, you can
just copy the backup to the original filename.

A convenient way to do this is the bk command. See
the debugging page for an example of its use.

If you are using Windows, you need to be aware of the
linefeed problem. unix text files and DOS text files have different
formatting. If you edit files in Notepad, then try to update them,
you may find that the file no longer updates, no matter what
you do. The difference is usually invisible to you, so you can't
tell why a file that looks exactly the same as before now won't
work.

Dead Souls expects unix-formatted text, and if you feed it
something else, the results aren't likely to be to your
satisfaction. Make sure you use an editor that respects unix
text. In Windows 2000, WordPad seems to do a reasonable job of not
completely screwing things. It does, however, add carriage
returns to your lines, so when you look at them in ed, you'll
see a bunch of "^M"'s all over the place.

If you still have trouble, take a look at the debugging page.


The mud editor is confusing the heck out of me. It's too hard to use.

Check out the MUD Editor tutorial. It should ease the pain a little.



When I log in, everything is screwed up, and I can't do anything!

This happens sometimes when you log out while carrying an object
with broken code. If for example, you are wearing a vest, and then you
edit the code for it, but it doesn't work anymore, then you log out,
what happens is the next time you log in the mud will try to restore an
item in your inventory that throws an error, and your login
gets stuck halfway.

If you find that when you log in things are all screwed up for
you, use the rescue login feature. For me, this means I would
login as cratylus_rescue instead of cratylus. My inventory
will get wiped before my playerfile is loaded, and I'll
be able to log in with no problems.


Ok, I'm a creator now. What am I supposed to do?

Ask your admin.

If you're like most other creators, you have
a creative vision you want to implement and share with others.
you want to create dragons, or spaceships, perhaps dragons
in spaceships. This makes you a "builder".

As a builder, your job is to learn how your mud
works so you can get your neat ideas turned into a
virtual reality. As you might have guessed, nobody is
going to jack into your brain and upload coding ability
into you. You need to learn how to move around, how
the creation system works, and yes, you'll need at least
some passing acquaintance with the stuff your mud is
made of: files written in the LPC language format.

The good news is that it's nowhere near as hard
to learn as C++. LPC is very powerful, but it doesn't
require you to be a master to get simple things done.

Your first steps as a new creator probably should
go something like this:

1) Talk to your admin. Understand what is expected of
you, and what the rules of your mud are.

2) Go to your workroom by typing: home. Read the helpful
notes that are posted there for you.

3) Read the Player's Handbook, cover to cover. It isn't
long, and you will need every bit of information in there.
This is not a suggestion. You need to read the handbook.

4) Open the chest in your workroom, and play around
with the tools and toys in there. Having read the
handbook will help you deal with any issues you have
handling these items.

5) Type wiz to go to the Creator's Hall, and if there
are any posts on the board, read them. To read the
first post: read 1. To read the second, read 2, and so on.
If you decide to write on the board,
remamber that to exit "writing" or "input" mode,
you need to enter a dot on a line all by itself,
like this:

.

6) Once you get a feel for how to move around,
what playing here is like, and how to do stuff, you
can start exploring your creator powers. To get
a grasp of the very basics of navigating through
files and directories, type:

more /doc/BASICS

Yes, you must include capital letters. Dead
Souls distinguishes between upper and lower case
letters in filenames.

To get a feel for what Dead Souls LPC code looks like,
wander about town and use the about command to read
code that compose the objects there. For example:

goto /domains/town/room/road

about here

about beggar

Or move around in your own home
directory and check out the defaults and templates
there:

cd /realms/<yourname>/area/npc

more fighter.c

To bring a copy of that fighter to life:

clone fighter

To make him dance:

force fighter to dance

To kill him:

zap fighter

To get rid of his corpse:

dest corpse

7) Once you're done having fun with your godlike
powers, it's time to start learning how to make
fun stuff of your own.

For a quick start in building, you
can start reading the Creator's Manual at
chapter 31, which is where the QCS section begins:

read chapter 31 in manual

read chapter 32 in manual

and so on.

That's fine to start with, but eventually
you'll need to read the whole Creator's Manual.
If you don't, 90% of the questions you ask about
code could be fairly answered with: "read the manual."


This is weird...where is the online builder? How does
new stuff get compiled?

Dead Souls can be very strange to people used
to non-LPC muds. This is because many other kinds of
muds use a system where the mud is written in C++,
and to make changes, you need to add C++ code to the
source, recompile it, then reboot the mud.
In that kind of system, building is done with
tools where you fill in blanks and code is generated
for you. I presume that some C++ expertise is
required for doing anything unusual or fancy.

If you come from this kind of environment,
you may be in for a little disorientation. On a Dead
Souls mud, there is no need for compiling code. You
don't need to reboot the mud for new stuff to
be available.

You can add your new Orc God of War to the
game (after you code him, of course) with two
simple commands:

update /realms/<you>/area/npc/grimmash.c

clone
/realms/<you>/area/npc/grimmash.c

You're now face to face with him. This makes
Dead Souls, like most LPC muds, very flexible in
what can be done, and very stable in terms of
needing few reboots. Reboots typically are
necessary only when someone breaks important
code, or to implement major mud-wide changes.

So, just write your code, and update it.
It's that simple. There are two main ways to do
this. The easiest way is with the QCS, or quick
creation system. With the QCS, you don't even need
to look at code. You just issue a few commands,
and your new whatever is there. Check out an example
of the QCS here.


To learn the QCS, read the Creator's
Manual starting on chapter 31.

The other way to create on-line is
with the ed command. The ed editor is a powerful
and flexible way of editing files. Some people
find it difficult at first, and you might even
be able to avoid it for a while if you mostly
just use QCS. However, you'll eventually need to
know a little about ed. For a tutorial, go here.

For more detailed documentation,
type: help ed


I explored around in /domains/Ylsrim and <XYZ> is broken

Ylsrim is kept in the distribution as a kind of
sentimental artifact. It's the demo area that the
original Dead Souls shipped with, and although
it's mostly been fixed up to work with Dead SOuls 2,
things can behave unexpectedly.


I explored around in /domains/town and <XYZ> is broken

Please send me an email and let me know, so I
can fix it. Also let me know if something in /domains/default
is hosed up.

!
!
Section 2: Code

What's the QCS?

Please see the QCS example page for an explanation of this
important Dead Souls system.



SetUnique doesn't work.

SetUnique() is probably doing something you
don't expect. When an item is loaded into memory, and
it has an inventory, it first checks each of those items
for whether it's supposed to be unique.
If it is supposed to be unique, then we look
through the list of loaded objects to see if there is
one of these items already cloned. If there is, then
we don't clone a new one.
What this means is that if I kidnap Leo the
archwizard and hold him in my workroom, another one will
not appear in the basement until my Leo is dested.

Note, however, that this does NOT mean that the
mud will never have two Leos. I can clone however many
Leos I want. But as long as one or more cloned Leos
exist, the basement will not make another. That's
what SetUnique means.

Now, if the behavior you're seeing is different
from what I described, maybe SetUnique is broken,
and you should email me with what you're seeing.


I made a magic wand that disappears after 10 minutes.
But if a player logs out and log back in, they have
another 10 minutes! How do I fix this?

What's happening is that you are keeping
track of how old the wand is, perhaps with a
variable named Age. But if the player quits and
logs back in, then the wand gets cloned again, resetting
all its values, including Age, to the original.

The way to make the Age variable survive
logouts is with AddSave. If you give your variable to
AddSave as an argument, that variable gets saved when
the user quits, and when they log back in, it is restored,
preventing cheating.

See /obj/wed_ring.c for an example.


Where is it saved?

In the player's playerfile, along with the values of all
the objects they were carrying when they quit.


How do I add or remove emotes?

That is an admin job. You admin would use the
addemote or removeemote commands.


How can I tell what files something inherits?

Use the showtree command. To know what files
are inherited by your robe, for example:

showtree /domains/default/armor/robe


How can I find the filename of something?

If it's in your environment: scan here
If it's in your possession: scan me

The number sign (#) and numbers at the end are that
object's unique identifier.


What's the largest integer usable by the mud?

2147483647


How can I find out what functions exist in something?

Get its filename and use the functions efun. For example:

eval return functions(load_object("/domains/town/obj/sign"))


object::init() is broken!

It isn't really. Unless you're coding a lib
item, you should not be inheriting LIB_OBJECT for
"tangible things" anyway. You should inherit LIB_ITEM.

The reason
object::init() fails is that LIB_OBJECT
doesn't have an init() function to call.


if(ob->GetFoo()) seems to break, but I don't know why

This function will error if ob does not exist. Unless
you are 100% positive ob will exist (and really, even if so),
it should look like this:

if(ob && ob->GetFoo())

Which means "if ob exists, and it has a foo".
This way, if there is no ob, the check stops right there
without getting hosed up on the next step.


How do I add color to my descriptions?

There are various markup tokens you can use for this. They look like this:

write("%^BOLD%^GREEN%^ This text would be in bold green letters %^RESET%^ and this would not.");

The %^RESET% is important. Without it, unpredictable things can happen.

To know what colors are available, type: colors

You should probably avoid color unless there is a compelling
reason for its use. Many mud admins discourage it because it can
distract from the game and cause uniformity issues: most mud
admins feel their mud text should look more or less
the same everywhere.


How do I turn the integer 42 into the string "forty-two"?

cardinal(42)


Can I use !=NULL as a test?

In theory, I guess so, but I doubt it'll work by default, and I'd
discourage you from doing anything so non-LPC-standard.
Instead try something like one of the following:

if(variable)
if(sizeof(variable))
if(variable != "")


I want to create and test a new command for the mud,
but I'm not admin so I can't put anything in the
normal command paths. What can I do?

Put your new command in your homedir's cmd/
subdirectory. A sample command is there already
to serve as a template. When you add a command, type:

update /daemon/command

for it to show up in your path.


How do skills work?

Skills are generally class-based, meaning that they are
specified in the class files found in /secure/cfg/classes.
Skills are only meaningful in terms of library objects that
understand them.

For example, a fighter's blade attack is useful because
player.c and combat.c make use of this skill as a
modifier.

But adding a basketweaving skill to a class is not
helpful unless there are library objects (looms, perhaps,
or straw) and verbs (weaving, maybe?) that make
use of that skill.

An upcoming feature is race-based skills, such
as poison bite or breath attack. These skills are
specified in /secure/cfg/races.


How do classes work?

Basically, having a class gives you special skills.
That's it. See the above section, "How do skills work?"


How do virtual rooms work?

Virtual rooms are rooms generated on the fly by a
virtual room server. You program that server with
the room descriptions, the number of them,
etc, and the virtual server can make available
a grid of rooms with your descriptions.

This allows you to create, for example,
a vast desert, or a large jungle, comprised of
dozens, or hundreds, or thousands of rooms
without having to manually code each and every
single room.

For an example, take a look at

/domains/town/virtual/



How are files organized in Dead Souls?


See the admin FAQ.


What are lfuns, sefuns and efuns?


Sefuns and efuns are functions available to all objects on the
mud. Any object may need to know what time() it is, so rather
than have a time() function in every file that needs it, which
could be many, there is a time() function built into the
game that any object can use. An efun is built into the
driver, so there is no LPC code to look at. A sefun is a
simulated efun, coded in LPC. Sefuns are kept in /secure/sefun.

Lfuns are functions specific to library objects. A shirt,
for example, has functions that a sword may not need, so
the LIB_ARMOR and LIB_WEAPON files contain their own functions,
not shared by other files (it's more complicated than this,
but that's the idea). These functions are library
functions, or lfuns. Typically they are found in the objects
defined by the files in /lib.

For a lot more detail on efuns and sefuns, see the
admin FAQ.


Why are there more sefun doc files than sefun files?

Sefun files, like /secure/sefun/strings.c, often contain
more than just one sefun. Therefore, there will be more
files documenting individual functions than there are
files containing sefuns.


I edited a file but now the reload command is complaining.

There are two commonly used commands for loading
objects: update and reload.

When you want to load a file into memory, you use
update, for example: update /domains/default/room/road

When you want to replace a cloned object with a
version that uses the latest code in a file, you
use reload, for example: reload my first red sword

reload doesn't work on files.

update doesn't work on cloned objects.


this_player()->GetName() returns "A shadow" when the player is invis.

Use this_player()->GetKeyName() instead.


Is there a sefun for making a whole string uppercase?

upper_case("omgwtfroflmao")


What is the difference between filter() and foreach()? How do I use them?

Both of these efuns can act on the individual members of an array.

For example, if you wanted to have an array named mystuff which
contains the filenames of all objects in your inventory that
inherit LIB_ARMOR:

using filter:

object *stuff = filter(deep_inventory(this_player()), (: inherits(LIB_ARMOR,$1) :) );
string *mystuff = filter(stuff, (: base_name($1)+".c" :) );

using foreach:

string *mystuff = ({});
foreach( object ob in
deep_inventory(this_player())){
if( inherits(LIB_ARMOR, ob) ) mystuff += ({
base_name(ob)+".c" });
}

There are arguments favoring the use of either. I won't get into
it. As far as I can tell, it's really a question of preference.
You can structure these functions more elegantly
than shown here, to best suit you. But this is the idea.


member_array() is returning exactly the wrong thing

It probably isn't. member_array() seems somewhat counterintuitive
at first, because it often returns a 0 as a "hit".

What this function is doing is checking to see whether the
first argument is a member of the array specified in the second
argument, and then tells you *which* element it is. for example:

member_array( "bar", ({ "foo", "bar", "baz" }) ) returns: 1

member_array( "foo", ({ "foo", "bar", "baz" }) ) returns: 0

Why does it return 0? Because "foo" is element 0 of the
array. If this_array ==
({ "foo", "bar", "baz" }), then
this_array[0] is "foo". So member_array("foo", this_array)
would return 0.

If the first argument is not a member of the array, member
array returns -1. So that:

member_array( "shiz", ({ "foo", "bar", "baz" }) ) returns: -1


Example:

Does this player know how to polka? Return 1 for yes:

RIGHT: if(member_array("polka dancing", this_player()->GetSkills()) != -1) return 1;

WRONG:
if(member_array("polka dancing", this_player()->GetSkills()) ) return 1;
 
The first way says "If 'polka dancing'
has an element number that isn't -1,
then it is a member, so let's return 1"

The second way says
"If 'polka dancing' has an element number that isn't 0,
then it is a member, so let's return 1"

The problem with the second way is that it is possible for "polka dancing"
to be element 0 in that array, and if it is, your code will incorrectly
tell you that you can't polka dance. But worse than this is that if
you actually can't polka dance, this second way will incorrectly tell
you that you can. Given random input, the second way would be wrong more than
half the time.


I'm trying to add two mappings together and the results are bizarre

Adding mappings together has to be done just so in order for
it to work the way one might expect. What can happen in
mapping arithmetic is that in the process of trying to
add the values of one mapping to another, you can change the
values of a mapping you didn't intend to. The deal is a
conflict between passing data by reference or by value. To
be sure that you don't accidentally modify an innocent
bystander, use the add_maps() sefun. For example:

MyMap = add_maps(HisMap, HerMap);

or

MyMap = add_maps(MyMap, HerMap);


When str = "abc", str[1] is 98, not "b". What gives?

What you're getting here is the ASCII code of element 1.
If you have to have that element as a string, use the
convert_ascii() sefun, like this:

convert_ascii(str[1])

You can instead use ranges, so that:

str[0..0] == "a"
str[1..1] == "b"
str[1..2] == "bc"

If you use ranges, do not use the convert_ascii() sefun.


How do I make an array1 that is the same as array2 but without an element?

To do this with just the first instance of the element:

array1 = array2 - ({ element });

To avoid any instance of the element:

array1 = filter(array2, (: $1 != element :) );


How do I pass arguments to a pointer in a functional?

With commas, like this:

(: eventKill, player :)

Your arguments will likely need to be global variables.


What should I do or not do in my code?

1) Avoid using call_out() as much as humanly possible.
Use heart_beat() to time things instead.

2) Don't code stuff that replicates itself.

3) Don't code stuff that circumvents security. For
example, knowing that an admin is logged on but
invisible isn't much help to you if he bans you
for coding a tool to find him.

4) foreach() and filter() are faster than for() loops,
and harder to screw up.

5) switch() is faster and more economical than if()
for multiple evaluations.

6) Don't use callouts.

7) Don't use add_action for something that already
has a verb. There is no point in making an add_action
for "throw", for example. It's just going to confuse
players when your "throw" doesn't behave the way
"throw" does everywhere else on the mud.

8) Callouts are bad, mkay?

9) Don't code delays by using loops. This affects the
whole mud. If an action is to be delayed, use heart_beat().


!
Section 3: Intermud and channel stuff


How do I know what other muds are online on intermud?

Type: mudlist

To see online Dead Souls muds type
: mudlist -m dead


Hey, LeetFooMud is online! How can I tell if Biff is logged on?

To see who's logged on: rwho leetfoomud
To tell Biff hello: tell biff@leetfoomud hello
To see if Biff is listening to <ds>: list ds@leetfoomud
To check out Biff's personal info: finger biff@leetfoomud


That's weird...mudlist says LeetFooMud is there but I'm not getting anything back.

The mudlist command reports on data retrieved the last time
the intermud daemon received an update. This means that if
LeetFooMud dropped off, say, 10 minutes ago, or if your own
intermud connection is down, your intermud commands are falling
into the void.

To see if your intermud connection is up, type: wiz
This takes you to the Creator's Hall, where a sign indicates
your mud's intermud connection status. This sign may be up
to 15 minutes out of date.

You can also test your mud's intermud connection with
the ping command, like this:

ping dead souls

ping frontiers


I heard there are intermud channels that talk between other muds,
not just Dead Souls muds. How can I use them?

Ask your admin. Those channels may not be open for
use on your mud.

If you talk on <intercre>, be polite, and use the same rules
of common sense and intelligent questioning that you need
to follow for <ds>. <intercre> is for code and technical
questions ONLY. Do not ever spam it or use it for chatting.

I strongly discourage you from talking on <intergossip>. I
assure you nothing good will come of it.


Howdo I emote on a channel?

Add the word
"emote" to the channel command. For example:


creemote compels your silence.

gets seen on the channel as:
<cre> Cratylus compels your silence.


Howdo I see what I missed on a channel?

To see the recent messages, use hist. For example:

hist ds

To see older stuff, look in /log/chan


I am sick and tired of the intermud network going down. Please fix it.

That's really out of my hands. I don't maintain the router.
I've been toying with the idea of setting up a separate intermud3
network with the Dead Souls site as the router, but I haven't
had much time to invest into it. I'm looking for volunteers to
help me set that up, and also volunteers to help me fix the
Dead Souls imc2 implementation, which is very close to working.

If you can't help with either one, then I'm sorry,
but you'll have to be patient a little longer until I can get
those volunteers.


I just wanna chat. Is there a dschat channel?

No, and there probably won't be one. You can chat to some extent
on the <ds> line, but if you're perceived as being a spammy
chatty source of noise, you may be asked to cool it.
If you really want to just chat, then use <intergossip>,
since that's what it's there for. Ask your admin for how to
do this. I don't recommend it, but I'd rather you expose
<intergossip> to your boredom than <ds>.
Alternately, there's a <ds_test> channel which is
intended specifically for spammy channel tests and such. Add
that channel to yourself and blab away, though not many
people will be listening. See /doc/README for how to add
channels to yourself.


I'll spam if I want to. You're not the boss of me.

It's true, I can't do much if you're determined to be a
jerk. If you consistently abuse channels, your admin may
be asked to limit your channel access. In extreme cases,
your mud may find itself banned from the channel in
question.
I can only appeal to your sense of fair play.
Spamming hurts people who have nothing to do with whatever
you're pissed off about. Please don't make whatever your
problem is with someone a headache for everyone.

!
Section 4: Miscellanea

!

! Someone ! amputated all my limbs and I can't do anything!

If your body ! gets damaged you can restore yourself to your
normal ! physical status by typing:

! heal ! me
!
!
! People are ! talking to me in gibberish, even though it says they're
! speaking English.

If your race is not human, your default language is not English, therefore
someone ! speaking in English would not be understood by you. As a
creator, you ! can avoid players' tedious language learning process
and simply type:

! call ! me->SetLanguage("English",100)

    Obviously this will work for other languages too.
--- 1,93 ---- ! ! Dead Souls Creator FAQ ! !
Dead Souls Creator FAQ, v2.6

Written by Cratylus @ Frontiers, March 2006
Updated April 2006.

Note: commands are displayed in boldface, like this: ls -a

What's this FAQ about?


There are common issues and questions that crop
up for most new creators. This document is intended to
ease or at least shorten what can be a steep learning
curve.


!
!
Section 1: Getting Started


My question isn't on here. Where can I get an answer?

There are four main ways to get specific answers:

1) Ask your mud's administrator, or other creators on
your mud by using the cre channel, like this:

cre does the flux capacitor use verbs or add_actions?

To know what local channels are available on your
mud, type: lines


2) Your mud is probably on the intermud3 network. If
your administrator has not restricted intermud channels,
you should be able to ask questions on the Dead Souls
intermud channel, with a command like this:

ds hi! can someone tell me what room Leo lives in?

3) If intermud is down, or nobody is answering, or
you have a bug to report, you can also try emailing
me, the author of this doc, at: <my name here>@users.sourceforge.com


4) If intermud is down, you can also log into the
Dead Souls demo/development mud at rugose.com 6666
This mud automatically promotes users to
creator status, allowing guests to get a feel for
what developing on Dead Souls is like, and to provide
examples of current and not-yet-released lib code.
You can try to log into that mud and see if anyone
is available to answer your question.


Important note about asking on <ds>:

Part of the reason this FAQ was written is that
people who ask questions on the ds channel often do not
realize that same question has been asked many times
before. If you ask something like "how do I read the
channel messages I missed?" without first bothering to
read this doc and others, you just might get a response
that's less friendly than you might have expected.
People on the channel really want to help you,
but if it seems like you're not willing to put in the
time to try to help yourself, they might choose to
ignore you until you gather some clues on your own.

Something else to remember is that we are not
on your mud and we don't see what you see. "Why won't
my workroom update" lacks enough information to let
anyone try to help, but "when i try to update my
workroom I get <error message>" might.

Similarly, some things don't have an answer
that is suited to ds. "could someone help me
understand the score.c file?" or "how do quests work?"
have answers that are long, complex, and are
already covered in the documentation available
to you.

Some stuff just doesn't have an answer
that can be explained to you unless you already
have the experience you'd need to know the answer.
for example:

- How do I make a stargate that has a dial for
going to different places?

- How do I make it so a player can be on different
planes of existence, and what they see when they
look around depends on what plane they're on?

- How do I add limbs so people can wear stuff
like kneepads on the knee only?

These three questions illustrate things that are
totally doable, but whose explanation is so
complex and full of judgment calls that there
is no way of satisfying the question without
making you magically understand intermediate-level
LPC coding.
That doesn't mean they're bad ideas, or
even that hard to implement. It's just that
the questions can't be answered until you read
and understand the Creator's Manual, and by that
time, you'll know the answer on your own.

Make sure you've read the docs, then ask
the question in a way that makes it clear you aren't
just a lazy person who wants other people to do her
work, but rather a hardworking builder who has
tried to fix something and needs a specific answer
to a specific question that isn't already in the
FAQ's or the docs.

Critiques are welcome, but they should
be constructive. "This combat system is slow and
stupid" is unhelpful and might be taken as a
hostile statement. Instead you could phrase it
in a way such as: "Combat is slower than I
expected. Why? I used to play on LeetFooMud and it
took less than a minute to kill Tiamat." It's still
a bit clueless, but it's a fair question that can
be answered on its own terms without starting
a flamestorm.


The ds channel is too spammy. It's distracting me.

Enable or disable a channel by typing just its name. Like:

ds


All I did was change one thing in a file, and now it won't update. Help!

You should make it a habit to make backup copies of files
before editing them. That way, if you screw up the code, you can
just copy the backup to the original filename.

A convenient way to do this is the bk command. See
the debugging page for an example of its use.

If you are using Windows, you need to be aware of the
linefeed problem. unix text files and DOS text files have different
formatting. If you edit files in Notepad, then try to update them,
you may find that the file no longer updates, no matter what
you do. The difference is usually invisible to you, so you can't
tell why a file that looks exactly the same as before now won't
work.

Dead Souls expects unix-formatted text, and if you feed it
something else, the results aren't likely to be to your
satisfaction. Make sure you use an editor that respects unix
text. In Windows 2000, WordPad seems to do a reasonable job of not
completely screwing things. It does, however, add carriage
returns to your lines, so when you look at them in ed, you'll
see a bunch of "^M"'s all over the place.

If you still have trouble, take a look at the debugging page.


The mud editor is confusing the heck out of me. It's too hard to use.

Check out the MUD Editor tutorial. It should ease the pain a little.


When I log in, everything is screwed up, and I can't do anything!

This happens sometimes when you log out while carrying an object
with broken code. If for example, you are wearing a vest, and then you
edit the code for it, but it doesn't work anymore, then you log out,
what happens is the next time you log in the mud will try to restore an
item in your inventory that throws an error, and your login
gets stuck halfway.

If you find that when you log in things are all screwed up for
you, use the rescue login feature. For me, this means I would
login as cratylus_rescue instead of cratylus. My inventory
will get wiped before my playerfile is loaded, and I'll
be able to log in with no problems.


Ok, I'm a creator now. What am I supposed to do?

Ask your admin.

If you're like most other creators, you have
a creative vision you want to implement and share with others.
you want to create dragons, or spaceships, perhaps dragons
in spaceships. This makes you a "builder".

As a builder, your job is to learn how your mud
works so you can get your neat ideas turned into a
virtual reality. As you might have guessed, nobody is
going to jack into your brain and upload coding ability
into you. You need to learn how to move around, how
the creation system works, and yes, you'll need at least
some passing acquaintance with the stuff your mud is
made of: files written in the LPC language format.

The good news is that it's nowhere near as hard
to learn as C++. LPC is very powerful, but it doesn't
require you to be a master to get simple things done.

Your first steps as a new creator probably should
go something like this:

1) Talk to your admin. Understand what is expected of
you, and what the rules of your mud are.

2) Go to your workroom by typing: home. Read the helpful
notes that are posted there for you.

3) Read the Player's Handbook, cover to cover. It isn't
long, and you will need every bit of information in there.
This is not a suggestion. You need to read the handbook.

4) Open the chest in your workroom, and play around
with the tools and toys in there. Having read the
handbook will help you deal with any issues you have
handling these items.

5) Type wiz to go to the Creator's Hall, and if there
are any posts on the board, read them. To read the
first post: read 1. To read the second, read 2, and so on.
If you decide to write on the board,
remamber that to exit "writing" or "input" mode,
you need to enter a dot on a line all by itself,
like this:

.

6) Once you get a feel for how to move around,
what playing here is like, and how to do stuff, you
can start exploring your creator powers. To get
a grasp of the very basics of navigating through
files and directories, type:

more /doc/BASICS

Yes, you must include capital letters. Dead
Souls distinguishes between upper and lower case
letters in filenames.

To get a feel for what Dead Souls LPC code looks like,
wander about town and use the about command to read
code that compose the objects there. For example:

goto /domains/town/room/road

about here

about beggar

Or move around in your own home
directory and check out the defaults and templates
there:

cd /realms/<yourname>/area/npc

more fighter.c

To bring a copy of that fighter to life:

clone fighter

To make him dance:

force fighter to dance

To kill him:

zap fighter

To get rid of his corpse:

dest corpse

7) Once you're done having fun with your godlike
powers, it's time to start learning how to make
fun stuff of your own.

For a quick start in building, you
can start reading the Creator's Manual at
chapter 31, which is where the QCS section begins:

read chapter 31 in manual

read chapter 32 in manual

and so on.

That's fine to start with, but eventually
you'll need to read the whole Creator's Manual.
If you don't, 90% of the questions you ask about
code could be fairly answered with: "read the manual."


This is weird...where is the online builder? How does
new stuff get compiled?

Dead Souls can be very strange to people used
to non-LPC muds. This is because many other kinds of
muds use a system where the mud is written in C++,
and to make changes, you need to add C++ code to the
source, recompile it, then reboot the mud.
In that kind of system, building is done with
tools where you fill in blanks and code is generated
for you. I presume that some C++ expertise is
required for doing anything unusual or fancy.

If you come from this kind of environment,
you may be in for a little disorientation. On a Dead
Souls mud, there is no need for compiling code. You
don't need to reboot the mud for new stuff to
be available.

You can add your new Orc God of War to the
game (after you code him, of course) with two
simple commands:

update /realms/<you>/area/npc/grimmash.c

clone
/realms/<you>/area/npc/grimmash.c

You're now face to face with him. This makes
Dead Souls, like most LPC muds, very flexible in
what can be done, and very stable in terms of
needing few reboots. Reboots typically are
necessary only when someone breaks important
code, or to implement major mud-wide changes.

So, just write your code, and update it.
It's that simple. There are two main ways to do
this. The easiest way is with the QCS, or quick
creation system. With the QCS, you don't even need
to look at code. You just issue a few commands,
and your new whatever is there. Check out an example
of the QCS here.


To learn the QCS, read the Creator's
Manual starting on chapter 31.

The other way to create on-line is
with the ed command. The ed editor is a powerful
and flexible way of editing files. Some people
find it difficult at first, and you might even
be able to avoid it for a while if you mostly
just use QCS. However, you'll eventually need to
know a little about ed. For a tutorial, go here.

For more detailed documentation,
type: help ed


I explored around in /domains/Ylsrim and <XYZ> is broken

Ylsrim is kept in the distribution as a kind of
sentimental artifact. It's the demo area that the
original Dead Souls shipped with, and although
it's mostly been fixed up to work with Dead SOuls 2,
things can behave unexpectedly.


I explored around in /domains/town and <XYZ> is broken

Please send me an email and let me know, so I
can fix it. Also let me know if something in /domains/default
is hosed up.

!
!
Section 2: Code

What's the QCS?

Please see the QCS example page for an explanation of this
important Dead Souls system.



SetUnique doesn't work.

SetUnique() is probably doing something you
don't expect. When an item is loaded into memory, and
it has an inventory, it first checks each of those items
for whether it's supposed to be unique.
If it is supposed to be unique, then we look
through the list of loaded objects to see if there is
one of these items already cloned. If there is, then
we don't clone a new one.
What this means is that if I kidnap Leo the
archwizard and hold him in my workroom, another one will
not appear in the basement until my Leo is dested.

Note, however, that this does NOT mean that the
mud will never have two Leos. I can clone however many
Leos I want. But as long as one or more cloned Leos
exist, the basement will not make another. That's
what SetUnique means.

Now, if the behavior you're seeing is different
from what I described, maybe SetUnique is broken,
and you should email me with what you're seeing.


I made a magic wand that disappears after 10 minutes.
But if a player logs out and log back in, they have
another 10 minutes! How do I fix this?

What's happening is that you are keeping
track of how old the wand is, perhaps with a
variable named Age. But if the player quits and
logs back in, then the wand gets cloned again, resetting
all its values, including Age, to the original.

The way to make the Age variable survive
logouts is with AddSave. If you give your variable to
AddSave as an argument, that variable gets saved when
the user quits, and when they log back in, it is restored,
preventing cheating.

See /obj/wed_ring.c for an example.


Where is it saved?

In the player's playerfile, along with the values of all
the objects they were carrying when they quit.


How do I add or remove emotes?

That is an admin job. You admin would use the
addemote or removeemote commands.


How can I tell what files something inherits?

Use the showtree command. To know what files
are inherited by your robe, for example:

showtree /domains/default/armor/robe


How can I find the filename of something?

If it's in your environment: scan here
If it's in your possession: scan me

The number sign (#) and numbers at the end are that
object's unique identifier.


What's the largest integer usable by the mud?

2147483647


How can I find out what functions exist in something?

Get its filename and use the functions efun. For example:

eval return functions(load_object("/domains/town/obj/sign"))


object::init() is broken!

It isn't really. Unless you're coding a lib
item, you should not be inheriting LIB_OBJECT for
"tangible things" anyway. You should inherit LIB_ITEM.

The reason
object::init() fails is that LIB_OBJECT
doesn't have an init() function to call.


if(ob->GetFoo()) seems to break, but I don't know why

This function will error if ob does not exist. Unless
you are 100% positive ob will exist (and really, even if so),
it should look like this:

if(ob && ob->GetFoo())

Which means "if ob exists, and it has a foo".
This way, if there is no ob, the check stops right there
without getting hosed up on the next step.


How do I add color to my descriptions?

There are various markup tokens you can use for this. They look like this:

write("%^BOLD%^GREEN%^ This text would be in bold green letters %^RESET%^ and this would not.");

The %^RESET% is important. Without it, unpredictable things can happen.

To know what colors are available, type: colors

You should probably avoid color unless there is a compelling
reason for its use. Many mud admins discourage it because it can
distract from the game and cause uniformity issues: most mud
admins feel their mud text should look more or less
the same everywhere.


How do I turn the integer 42 into the string "forty-two"?

cardinal(42)


Can I use !=NULL as a test?

In theory, I guess so, but I doubt it'll work by default, and I'd
discourage you from doing anything so non-LPC-standard.
Instead try something like one of the following:

if(variable)
if(sizeof(variable))
if(variable != "")


I want to create and test a new command for the mud,
but I'm not admin so I can't put anything in the
normal command paths. What can I do?

Put your new command in your homedir's cmd/
subdirectory. A sample command is there already
to serve as a template. When you add a command, type:

update /daemon/command

for it to show up in your path.


How do skills work?

Skills are generally class-based, meaning that they are
specified in the class files found in /secure/cfg/classes.
Skills are only meaningful in terms of library objects that
understand them.

For example, a fighter's blade attack is useful because
player.c and combat.c make use of this skill as a
modifier.

But adding a basketweaving skill to a class is not
helpful unless there are library objects (looms, perhaps,
or straw) and verbs (weaving, maybe?) that make
use of that skill.

An upcoming feature is race-based skills, such
as poison bite or breath attack. These skills are
specified in /secure/cfg/races.


How do classes work?

Basically, having a class gives you special skills.
That's it. See the above section, "How do skills work?"


How do virtual rooms work?

Virtual rooms are rooms generated on the fly by a
virtual room server. You program that server with
the room descriptions, the number of them,
etc, and the virtual server can make available
a grid of rooms with your descriptions.

This allows you to create, for example,
a vast desert, or a large jungle, comprised of
dozens, or hundreds, or thousands of rooms
without having to manually code each and every
single room.

For an example, take a look at

/domains/town/virtual/



How are files organized in Dead Souls?


See the admin FAQ.


What are lfuns, sefuns and efuns?


Sefuns and efuns are functions available to all objects on the
mud. Any object may need to know what time() it is, so rather
than have a time() function in every file that needs it, which
could be many, there is a time() function built into the
game that any object can use. An efun is built into the
driver, so there is no LPC code to look at. A sefun is a
simulated efun, coded in LPC. Sefuns are kept in /secure/sefun.

Lfuns are functions specific to library objects. A shirt,
for example, has functions that a sword may not need, so
the LIB_ARMOR and LIB_WEAPON files contain their own functions,
not shared by other files (it's more complicated than this,
but that's the idea). These functions are library
functions, or lfuns. Typically they are found in the objects
defined by the files in /lib.

For a lot more detail on efuns and sefuns, see the
admin FAQ.


Why are there more sefun doc files than sefun files?

Sefun files, like /secure/sefun/strings.c, often contain
more than just one sefun. Therefore, there will be more
files documenting individual functions than there are
files containing sefuns.


I edited a file but now the reload command is complaining.

There are two commonly used commands for loading
objects: update and reload.

When you want to load a file into memory, you use
update, for example: update /domains/default/room/road

When you want to replace a cloned object with a
version that uses the latest code in a file, you
use reload, for example: reload my first red sword

reload doesn't work on files.

update doesn't work on cloned objects.


this_player()->GetName() returns "A shadow" when the player is invis.

Use this_player()->GetKeyName() instead.


Is there a sefun for making a whole string uppercase?

upper_case("omgwtfroflmao")


What is the difference between filter() and foreach()? How do I use them?

Both of these efuns can act on the individual members of an array.

For example, if you wanted to have an array named mystuff which
contains the filenames of all objects in your inventory that
inherit LIB_ARMOR:

using filter:

object *stuff = filter(deep_inventory(this_player()), (: inherits(LIB_ARMOR,$1) :) );
string *mystuff = filter(stuff, (: base_name($1)+".c" :) );

using foreach:

string *mystuff = ({});
foreach( object ob in
deep_inventory(this_player())){
if( inherits(LIB_ARMOR, ob) ) mystuff += ({
base_name(ob)+".c" });
}

There are arguments favoring the use of either. I won't get into
it. As far as I can tell, it's really a question of preference.
You can structure these functions more elegantly
than shown here, to best suit you. But this is the idea.


member_array() is returning exactly the wrong thing

It probably isn't. member_array() seems somewhat counterintuitive
at first, because it often returns a 0 as a "hit".

What this function is doing is checking to see whether the
first argument is a member of the array specified in the second
argument, and then tells you *which* element it is. for example:

member_array( "bar", ({ "foo", "bar", "baz" }) ) returns: 1

member_array( "foo", ({ "foo", "bar", "baz" }) ) returns: 0

Why does it return 0? Because "foo" is element 0 of the
array. If this_array ==
({ "foo", "bar", "baz" }), then
this_array[0] is "foo". So member_array("foo", this_array)
would return 0.

If the first argument is not a member of the array, member
array returns -1. So that:

member_array( "shiz", ({ "foo", "bar", "baz" }) ) returns: -1


Example:

Does this player know how to polka? Return 1 for yes:

RIGHT: if(member_array("polka dancing", this_player()->GetSkills()) != -1) return 1;

WRONG:
if(member_array("polka dancing", this_player()->GetSkills()) ) return 1;
 
The first way says "If 'polka dancing'
has an element number that isn't -1,
then it is a member, so let's return 1"

The second way says
"If 'polka dancing' has an element number that isn't 0,
then it is a member, so let's return 1"

The problem with the second way is that it is possible for "polka dancing"
to be element 0 in that array, and if it is, your code will incorrectly
tell you that you can't polka dance. But worse than this is that if
you actually can't polka dance, this second way will incorrectly tell
you that you can. Given random input, the second way would be wrong more than
half the time.


I'm trying to add two mappings together and the results are bizarre

Adding mappings together has to be done just so in order for
it to work the way one might expect. What can happen in
mapping arithmetic is that in the process of trying to
add the values of one mapping to another, you can change the
values of a mapping you didn't intend to. The deal is a
conflict between passing data by reference or by value. To
be sure that you don't accidentally modify an innocent
bystander, use the add_maps() sefun. For example:

MyMap = add_maps(HisMap, HerMap);

or

MyMap = add_maps(MyMap, HerMap);


When str = "abc", str[1] is 98, not "b". What gives?

What you're getting here is the ASCII code of element 1.
If you have to have that element as a string, use the
convert_ascii() sefun, like this:

convert_ascii(str[1])

You can instead use ranges, so that:

str[0..0] == "a"
str[1..1] == "b"
str[1..2] == "bc"

If you use ranges, do not use the convert_ascii() sefun.


How do I make an array1 that is the same as array2 but without an element?

To do this with just the first instance of the element:

array1 = array2 - ({ element });

To avoid any instance of the element:

array1 = filter(array2, (: $1 != element :) );


How do I pass arguments to a pointer in a functional?

With commas, like this:

(: eventKill, player :)

Your arguments will likely need to be global variables.


What does the tc() sefun do?

It's something I coded for myself long ago, basically
a personalized debug(). However, people have been
asking for that funcitonality for themselves, so
the debug() sefun now carries this functionality. For
more information, type:

man debug


How can I find out how many items are in an array quickly?

sizeof(array)


My SetRead isn't working

Make sure there is an item for each read. For example,
SetRead( ([ ({"alpha", "bravo", "charlie"}) : "Delta.", ]) )

Needs something like this *above* it:

SetItems( ([ ({"alpha", "bravo", "charlie"}) : "A thing you can read.", ]) )


My SetEnters/SetSmells/SetListens isn't working

See above.


Can I nest loops?

Can you? Probably. Should you? Almost certainly not.
For loops and while loops are legal LPC, and you may even
see them here or there in onlder lib code. But they
should be avoided because they generate much more
lag than the more efficient foreach() and filter() efuns.


What should I do or not do in my code?

1) Avoid using call_out() as much as humanly possible.
Use heart_beat() to time things instead.

2) Don't code stuff that replicates itself.

3) Don't code stuff that circumvents security. For
example, knowing that an admin is logged on but
invisible isn't much help to you if he bans you
for coding a tool to find him.

4) foreach() and filter() are faster than for() loops,
and harder to screw up.

5) switch() is faster and more economical than if()
for multiple evaluations.

6) Don't use callouts.

7) Don't use add_action for something that already
has a verb. There is no point in making an add_action
for "throw", for example. It's just going to confuse
players when your "throw" doesn't behave the way
"throw" does everywhere else on the mud.

8) Callouts are bad, mkay?

9) Don't code delays by using loops. This affects the
whole mud. If an action is to be delayed, use heart_beat().


How much different or heavily modified is Dead Souls than stock LPC?

This is a difficult question to answer on its own terms. It's
roughly equivalent to:

Is Fedora different from stock UNIX, or will my Solaris programs work on it?

This DVD movie is in NTSC format, so my TV can handle it, right?

The terms used roughly correspond to the same
general thing, but the assumption here is that there is a
"stock" LPC, and you can transplant code from one LP mud to
another.
Sometimes these transplants can be done. Oftentimes not.
This is because LPC has been interpreted and implemented in
many slightly different ways by many slightly different versions
of many different drivers. The end product of the DVD is a movie
playing on your TV, but how it gets there is very different from
how a videocassette does it, even if it's the same movie and its
signal is encoded in NTSC in both cases.

If you have a LPmuds that use different drivers, it
can be much like the difference between a DVD and a videotape.
Sometimes, if the drivers are related, the difference is smaller,
like VHS versus Betamax, but you'll still be embarking on a
major project getting the movies from one to play on the other.

The result is that a coder from Discworld and a coder
from Nightmare can roughly speak the same language, and discuss
solutions to their problems that make sense. And each coder
could probably visit the other mud and work with a very
small learning curve.
But the code itself would probably require substantial
retooling to be interchanged.


!
Section 3: Intermud and channel stuff


How do I know what other muds are online on intermud?

Type: mudlist

To see online Dead Souls muds type
: mudlist -m dead


Hey, LeetFooMud is online! How can I tell if Biff is logged on?

To see who's logged on: rwho leetfoomud
To tell Biff hello: tell biff@leetfoomud hello
To see if Biff is listening to <ds>: list ds@leetfoomud
To check out Biff's personal info: finger biff@leetfoomud


That's weird...mudlist says LeetFooMud is there but I'm not getting anything back.

The mudlist command reports on data retrieved the last time
the intermud daemon received an update. This means that if
LeetFooMud dropped off, say, 10 minutes ago, or if your own
intermud connection is down, your intermud commands are falling
into the void.

To see if your intermud connection is up, type: wiz
This takes you to the Creator's Hall, where a sign indicates
your mud's intermud connection status. This sign may be up
to 15 minutes out of date.

You can also test your mud's intermud connection with
the ping command, like this:

ping dead souls

ping frontiers


I heard there are intermud channels that talk between other muds,
not just Dead Souls muds. How can I use them?

Ask your admin. Those channels may not be open for
use on your mud.

If you talk on <intercre>, be polite, and use the same rules
of common sense and intelligent questioning that you need
to follow for <ds>. <intercre> is for code and technical
questions ONLY. Do not ever spam it or use it for chatting.

I strongly discourage you from talking on <intergossip>. I
assure you nothing good will come of it.


Howdo I emote on a channel?

Add the word
"emote" to the channel command. For example:


creemote compels your silence.

gets seen on the channel as:
<cre> Cratylus compels your silence.


Howdo I see what I missed on a channel?

To see the recent messages, use hist. For example:

hist ds

To see older stuff, look in /log/chan


I am sick and tired of the intermud network going down. Please fix it.

See the Dead Souls Intermud Router page.


I just wanna chat. Is there a dschat channel?

No, and there probably won't be one. You can chat to some extent
on the <ds> line, but if you're perceived as being a spammy
chatty source of noise, you may be asked to cool it.
If you really want to just chat, then use <intergossip>,
since that's what it's there for. Ask your admin for how to
do this. I'd rather you expose <intergossip> to your boredom
than <ds>.
Alternately, there's a <ds_test> channel which is
intended specifically for spammy channel tests and such. Add
that channel to yourself and blab away, though not many
people will be listening. See /doc/README for how to add
channels to yourself.


I'll spam if I want to. You're not the boss of me.

It's true, I can't do much if you're determined to be a
jerk. If you consistently abuse channels, your admin may
be asked to limit your channel access. In extreme cases,
your mud may find itself banned from the channel in
question.
I can only appeal to your sense of fair play.
Spamming hurts people who have nothing to do with whatever
you're pissed off about. Please don't make whatever your
problem is with someone a headache for everyone.

This guy keeps hassling me on an intermud channel

Sometimes people just can't leave well enough alone,
and they spam. Some people just don't have anything
to say that you want to hear. For such situation,
use the earmuff command. For example:

earmuff tatianna

And you will not receive channel messages from
that person. The reverse command is unmuff.
Earmuffing is also good when someone from
a non-European-language mud sends well-meaning
but garbled, escape-code filled gibberish. If
she doesn't understand your English language
requests to stop spamming, you can just earmuff her.


Is there a way to change the "default exit" room messages?

Yes, but it involves some understanding of LPC. See
if Brodbane@Eve is listening on the ds channel. He
may have some tips.

!
Section 4: Miscellanea
+
+
I'm + fighting the beggar with my staff and he's kicking my ass

!     ! For one thing, you're a creator. Quit goofing around. If
! you want to fight monsters and stuff, create a test
! player character.
!
!     Next, you're probably still a Level 1 character. This
! makes you a wimp. Raise your level with this command:
!
! call me->SetLevel(20)
!
!     Now get the medical tricorder from your workroom's
! chest and raise your stats. Give yourself 100 strength.
! Why not?
!
!     Put the staff in your robe and quit using it as
! a weapon. It's a creating tool. Not only is it a
! poor weapon, by default you lack double-handed
! weapon skills, making you really crappy at using
! a really crappy weapon. No wonder the orcs were
! beating you like an animal. Get a carving knife
! from the mansion. Or an orcslayer. Or hell, just
! use the zap command and stop wasting time. You
! should have characters for this.
!
!

! Someone ! amputated all my limbs and I can't do anything!

If your body ! gets damaged you can restore yourself to your
normal ! physical status by typing:

! heal ! me
!
!
! How do I change my class?
!
!
Again ! with the pretending to be a ! player. Seriously,
! you need a test player char so that if you screw something
! up, you don't screw *yourself* up.
!
! But, if you're determined:
!
! call me->ChangeClass("thief")
!
!
Your stats and levels will probably be all weird and
! hosed up. Just raise your player level, that will probably
! fix it.
!

!
! People are ! talking to me in gibberish, even though it says they're
! speaking English.

If your race is not human, your default language is not English, therefore
someone ! speaking in English would not be understood by you. As a
creator, you ! can avoid players' tedious language learning process
and simply type:

! call ! me->SetLanguage("English",100)

    Obviously this will work for other languages too.
*************** *** 305,333 **** since you don't seem logged on.


! How ! do I find the location of a verb or command?

Use the which ! command. For example:

! which zap

! which update

If 'which' ! doesn't find it, the command is probably built into
some object ! you inherit, like the command shell or the
hooks for the chat daemon. Or it may be an add_action bound to a
nearby object. To see what commands objects or inherited
--- 102,123 ---- since you don't seem logged on.


! How ! do I find the location of a verb or command?

Use the which ! command. For example:

! which zap

! which update

If 'which' ! doesn't find it, the command is probably built into
some object ! you inherit, like the command shell or the
hooks for the chat daemon. Or it may be an add_action bound to a
nearby object. To see what commands objects or inherited
*************** *** 336,454 **** localcmds


! How ! do I make a quest?

    ! Think of a quest in terms of the result. The result of a quest is
a player ! receiving quest points and a quest title.

    ! This means that pretty much anything can be a quest. If
you've coded ! a rock to provide quest points and a quest title
when it is ! picked up, well, there's your Rock Quest. However,
you usually ! want to make things a bit more challenging.
    ! A quest can be as boring as "pick up the red rock" or
it can be a ! challenging metaphysical inquiry into the
nature of ! consciousness. If quest points and a quest title are
at the end of ! a series of actions, then that series of actions
! is a quest.

    ! What those actions should be are entirely up to your
imagination. ! Review the orcslayer quest in the Player's
Handbook for an example. You did read the ! Player's Handbook,
! right?
    ! Take a look at Leo the Archwizard's code for an example
of the ! mechanics of solving a quest.

!
! Where's ! Leo?


Read the ! Player's Handbook already, please.

!
My wandering monster escaped from my workroom! How can
I find him?

If its name is jabberwock, try:

findobj jabberwock

You can also probably just:

goto jabberwock
!
! I ! ran findobj on something but it says no environment. Where is it?

Right where ! it says. Some objects create a "master copy" of themselves
when they are ! cloned. This copy remains loaded in memory even if
that cloned ! object goes away. You can distinguish between cloned
objects and ! master copies by the number sign  and number at the end
of cloned ! objects. The master copy has no instance number. It is
simply loaded ! code, and does not "exist" in a way accessible to your player
object on the mud.

Sometimes a ! cloned object will lose its environment. This is usually
caused by an ! error and is not a good thing. Dead Souls runs a
"reaper" ! daemon that periodically searches memory for cloned
objects that lack an environment, and they are destroyed.

--- 126,204 ---- localcmds


! How ! do I make a quest?

    ! Think of a quest in terms of the result. The result of a quest is
a player ! receiving quest points and a quest title.

    ! This means that pretty much anything can be a quest. If
you've coded ! a rock to provide quest points and a quest title
when it is ! picked up, well, there's your Rock Quest. However,
you usually ! want to make things a bit more challenging.
    ! A quest can be as boring as "pick up the red rock" or
it can be a ! challenging metaphysical inquiry into the
nature of ! consciousness. If quest points and a quest title are
at the end of ! a series of actions, then that series of actions
! is a quest.

    ! What those actions should be are entirely up to your
imagination. ! Review the orcslayer quest in the Player's
Handbook for an example. You did read the ! Player's Handbook,
! right?
    ! Take a look at Leo the Archwizard's code for an example
of the ! mechanics of solving a quest.

!
! Where's ! Leo?


Read the ! Player's Handbook already, please.

!
My wandering monster escaped from my workroom! How can
I find him?

If its name is jabberwock, try:

findobj jabberwock

You can also probably just:

goto jabberwock
!
! I ! ran findobj on something but it says no environment. Where is it?

Right where ! it says. Some objects create a "master copy" of themselves
when they are ! cloned. This copy remains loaded in memory even if
that cloned ! object goes away. You can distinguish between cloned
objects and ! master copies by the number sign  and number at the end
of cloned ! objects. The master copy has no instance number. It is
simply loaded ! code, and does not "exist" in a way accessible to your player
object on the mud.

Sometimes a ! cloned object will lose its environment. This is usually
caused by an ! error and is not a good thing. Dead Souls runs a
"reaper" ! daemon that periodically searches memory for cloned
objects that lack an environment, and they are destroyed.

*************** *** 469,476 **** directory with dozens of files in it will cause a noticeable hiccup
in the rest of the mud.

! If you are determined to do this
, though, the command is :

update /path/to/dir/*

--- 219,225 ---- directory with dozens of files in it will cause a noticeable hiccup
in the rest of the mud.

! If you are determined to do this
, though, the command is :

update /path/to/dir/*

*************** *** 487,495 **** Um...I want colors back now please

! Type: terminal ansi

then type: save


--- 236,242 ---- Um...I want colors back now please

!
Type: terminal ansi

then type: save


*************** *** 505,553 **** take you anywhere. But
go north will.


! ZOMG ! this is the best mudlib evar how can I evar thank you?
!
! Writing an ! honest review of the lib at http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls
! would be ! great, along with a rating you feel is appropriate. I seem to have ! pissed
! somebody off ! over there (he knows who he is), and he has made it a project to give
! Dead Souls ! crappy ratings whenever a new release comes out.
!
! Posting your honest opinion and ! rating there would be a lovely way to
! thank me for ! the effort of putting this lib together.
!
! But really, I ! did it for the fun of it, so it's not necessary.

!
Dude this mudlib sux0rz @ss. What a waste of my time.

I'm sure Dead Souls has lots of things that you don't
like, but I can't fix them if I don't know what they are.
Post an honest review and rating at mudmagic so I can
understand the lameness, and so others can benefit
for your suggestions.
- ! Cratylus
!
! Dead ! Souls Homepage
! ! --- 252,293 ---- take you anywhere. But
go north will.

+
+ Why is + there a bunch of stuff in ROOMS_FURNACE?
+
+ The QCS is designed to attempt the graceful handling
+ of unusual events. Sloppy code, non-working objects,
+ etc. Part of this design is avoiding a situation
+ where an object's destruction affects your local
+ environment (and this happens a bit more often than
+ you might think).
+     To avoid some types of unpleasantness, QCS doesn't
+ try to immediately destruct objects when replacing them.
+ Instead, they are moved, along with whatever problems
+ they might have, to ROOMS_FURNACE. That is a room
+ where things go to be destructed quietly. Every 60
+ seconds or so, the contents of that room are destroyed,
+ and their bits recycled.
+     A few other items in the lib use the furnace,
+ notably the recycling bins and the reload command.
+

! ZOMG ! this is the best mudlib evar how can I evar thank you?
!
! Just let me ! know what bugs you find, and how I can
! make the lib better.


!
Dude this mudlib sux0rz @ss. What a waste of my time.

I'm sure Dead Souls has lots of things that you don't
like, but I can't fix them if I don't know what they are.
Email me so that I can understand the lameness, and so
others can benefit for your suggestions.
- ! Cratylus
!
! <my name here>@users.sourceforge.net
!

! Dead ! Souls Homepage
! \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/www/ds-faq.html ds2.0r20b/lib/www/ds-faq.html *** ds2.0r18/lib/www/ds-faq.html Thu Feb 23 15:40:41 2006 --- ds2.0r20b/lib/www/ds-faq.html Sun Apr 9 23:48:48 2006 *************** *** 1,41 **** ! ! ! ! Dead Souls FAQ ! !
Dead Souls FAQ, v2

Written by Cratylus @ Frontiers, October 2005
Updated January 2006

What is Dead Souls?

Primarily Dead Souls is a "mudlib". There is also a Dead Souls
MUD, but this is not what people generally mean when they refer to Dead Souls as a
game. It also happens that a book by the Russian author Nikolai Gogol is named Dead
Souls. That book is wholly unrelated to the Dead Souls software.

What is it for?

It's for building a game. If what you want to do is play a game,
you're looking for something else.

What is a MUD?

A MUD is a computer program that uses text (very rarely do MUDs
use graphics or sound) to describe virtual environments you can manipulate.
You enter a command, the program tells you how the virtual world responds
around you. Typically there are other people connected to the same program
over the Internet, and you can interact with them as well. A MUD can be mostly
social, or mostly game oriented, with quests and puzzles to solve or
villains to defeat. The name MUD is an acronym that originally stood for
"Multi-User Dungeon", in accord with the "Dungeons and Dragons" style of
many early MUDs. Now it stands for different things to different people,
but the basic concept of operation is the same, whether the game is set
on the moon, in Manhattan, or in Middle Earth.

What's a mudlib?

Generally there are two main parts to the MUD program. First is the
"driver". This is an executable program file (in Windows, you'd see the driver
has an .EXE extension) that enables the input and output of data, accepts
network connections, performs basic calculations, etc. The other part
is the mudlib, or, more properly, MUD object library. This is usually a
large set of files in plain text that the driver reads and uses as a
basis for the game. Some files provide information about rooms and
environments, some files provide information about objects or creatures,
etc. When players connect, the driver provides them the world that these
files describe.

When I configure Dead Souls, it says it is a MUD. If it is really a mudlib,
why would that be?

Dead Souls is not intended to be a fully-developed MUD when you
install it. Instead it provides you with the basic framework you need to
make a MUD of your own. After you set up Dead Souls, you should rename it,
and customize the lib (that is, library) files to create your own world. When
 you first run Dead Souls, you will have some rooms available to explore.
This is not your mud. It is just a set of sample places and objects to help
you understand how to build a MUD of your own. So in a way, Dead Souls provides
you a kind of "starter" MUD, but since it's just examples, you can't really
consider it a MUD until you change it to suit your creative vision.

Is Dead Souls really Nightmare in disguise?

Let's break this question down into its components:

What is Nightmare?

Nightmare was a mud. It was part of a branching of mud development
that occurred early in the days of popularized mudding. Some folks
decided to take MUD library development in a particular direction,
and eventually made available what is now known as the Nightmare mudlib.
Nightmare went through a few major changes, most notably from version 3
to version IV. By that time, the development of Nightmare was solely
managed by a coder who called himself Descartes.

What is the relationship between Nightmare and Dead Souls?

It appears that Dead Souls began as a "development" MUD. This means
that while Descartes ran his own MUD, he also worked on improving that MUD's
lib. It is unwise to make major changes to a MUD that people are playing on,
so the Dead Souls development MUD was one which served as a platform to
develop, extend, and improve the Nightmare lib without risking harm to active players.
Sometime after the release of the Nightmare IV mudlib, Descartes decided to
withdraw it from distribution. Based on their interpretation of copyright
law, people now do not distribute the Nightmare mudlib on Internet servers.
However, somewhat inexplicably, Descartes released the mudlib for his
development mud, Dead Souls, into the public domain. This meant that the
Dead Souls mudlib was completely free to be used by anyone in any way they
chose, be it distribution, modification, spindling or folding. Because Dead
Souls was the development mud for Nightmare Mud, which was the base of the
Nightmare mudlib, the relationship between the two is an extremely close one.

How close?

Frankly, almost identical. A close comparison of the Dead Souls lib
that Descartes released (version 1.1pre) against the last released Nightmare
lib (IVr6) reveals that they are very nearly the same thing, file for file.
The main differences between the two are:

* A small number of Nightmare library files aren't on Dead Souls.
* Dead Souls doesn't come with the driver or install script the Nightmare had.
* All documentation files were removed from Dead Souls.
* "Nightmare" in file headers was changed to say "Dead Souls"

This might sound like a lot of difference, but consider this: not counting
documentation, Nightmare IVr6 lib contained 1064 files and directories, and
the Dead Souls 1.1pre lib contains 1082. Dead Souls 1.1pre actually had more
lib material in it than the last release of Nightmare.

Why mess with Dead Souls, then?

The main problem was that Dead Souls was a bear to set up. Because
driver development had not stopped (the driver is a separate software project),
but lib development had, incompatibilities grew in number over time. Using
the original driver from 1997 created a MUD that lacked important features
of modern muds, and risked instability. Using a modern driver required a
modification of fundamental lib systems that required some expertise to
perform. People stopped using Nightmare because they couldn't get it, and
they didn't use Dead Souls because the damn thing didn't work right. My own
Nightmare lib MUD, Frontiers, continued to chug along, quietly fading into
obscurity along with all other Nightmare IV based MUDs, while scrappy young
newcomers like CoffeeMud lib started elbowing their way into the MUD community.

Then a funny thing happened. I really got into lib coding. I mean, full-on
lib obsession. I can't really explain it, other than to say that when I was
younger it seemed hard and impenetrable, but now that I've been working in a
technical field for years, I have the mental tools (and patience) required to
disassemble and understand complex systems. I got turned on by analyzing and
understanding stuff that I'd considered over my head in years past. But I
realized I was living in the past. I couldn't share my exciting lib ideas
and discoveries with anyone else, because the Nightmare LPC community was
in the very last stages of extinction.

I decided to do something about it. Maybe I'd be whistling into the wind,
tilting at windmills, or even worse, just talking to myself. But I decided
I'd make Dead Souls a viable lib for people to use, because it would be fun,
and because it might be nice to have other people to bounce ideas off of and
steal code from. At worst, I'd be doing nothing more pathetic than, say,
building model ships in my basement. At best, I might revive a once-thriving
MUD development community. Either way, it sounded like an enjoyable project,
so I proceeded.

Fine, but what's so special about Nightmare/Dead Souls? Why are you making such a
big deal of wanting people to use it? It isn't better than everything else,
surely. [insert mudlib name here] is newer and has [insert feature here] and [other feature]!

Yes, that may be. My experience with other libs is limited, and I'm sure
that Dead Souls pales in comparison to others in one feature or another. My only
answer to that is, go ahead and use the lib you're comfortable with. I make no
claims of superiority. Hell, I'll be the first to admit there are still things
to fix and systems to implement. But if you are not sure which lib to pick,
Dead Souls is an excellent choice as a solid, stable, flexible and powerful platform
to build your MUD. You can do anything in a MUD with LPC, and I mean anything.
If you happen to have Nightmare experience, Dead Souls will be a homecoming...
like an old comfortable shoe....but without the holes or the stink.

What's LPC?

LPC is a kind of programming language. Dead Souls lib files don't
just contain descriptions of places and things: they have a format that describes
their relationships to the driver and permits you to do fancy stuff...pretty much
any text MUD thing you can think of, you can do in LPC.

How do I get started?

Download the latest version from http://dead-souls.sourceforge.net/
or http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls and
install it. There are versions available for Windows and for Unix. The main
difference between the two is the driver. The Windows driver is a Windows
executable. The Unix driver is in source code form and must be compiled.
The lib files for both versions are identical.

Once you log in, read the Players Handbook and the Creators Manual.


Anything else?

Read the Dead Souls Admin FAQ.
! The end.

! Dead Souls Homepage
! ! --- 1,11 ---- ! ! Dead Souls FAQ ! !
Dead Souls FAQ, v2.1

Written by Cratylus @ Frontiers, October 2005
Updated March 2006

What is Dead Souls?

Primarily Dead Souls is a "mudlib". There is
also a Dead Souls MUD, but this is not what people generally
mean when they refer to Dead Souls as a game.
It also happens that a book by the Russian author
Nikolai Gogol is named Dead Souls. That book is wholly
unrelated to the Dead Souls software.

What is it for?

It's for building a game. If what you want to do
is play a game, you're looking for something else.

What is a MUD?

A MUD is a computer program that uses text (very rarely do MUDs
use graphics or sound) to describe virtual environments you can manipulate.
You enter a command, the program tells you how the virtual world responds
around you. Typically there are other people connected to the same program
over the Internet, and you can interact with them as well. A MUD can be mostly
social, or mostly game oriented, with quests and puzzles to solve or
villains to defeat. The name MUD is an acronym that originally stood for
"Multi-User Dungeon", in accord with the "Dungeons and Dragons" style of
many early MUDs. Now it stands for different things to different people,
but the basic concept of operation is the same, whether the game is set
on the moon, in Manhattan, or in Middle Earth.

See also:
http://www.catb.org/~esr/jargon/html/M/MUD.html


What's a mudlib?

There are many different types of MUD programs. Some are
executable programs, with all of their virtual worlds
defined in one big file. Others are entirely interpreted,
such as java muds, which are composed of thick forests
of folders containing java files.

LP MUDs are something between the two.

Generally there are two main parts to an LP MUD
program. First is the "driver". This is an executable program
file (in Windows, you'd see the driver has an .EXE extension)
that enables the input and output of data, accepts network
connections, performs basic calculations, etc. The other part
is the mudlib, or, more properly, MUD object library. This is
usually a large set of files in plain text that the driver
reads and uses as a basis for the game. Some files provide
information about rooms and environments, some files provide
information about objects or creatures, etc. When players
connect, the driver provides them the world that these
files describe.


When I configure Dead Souls, it says it is a MUD.
If it is really a mudlib,
why would that be?

Dead Souls is not intended to be a fully-developed
MUD when you install it. Instead it provides you with
the basic framework you need to make a MUD of your own.
After you set up Dead Souls, you should rename it, and
customize the lib (that is, library) files to create your
own world. When you first run Dead Souls, you will
have some rooms available to explore. This is not your mud.
It is just a set of sample places and objects to help
you understand how to build a MUD of your own. So in a
way, Dead Souls provides you a kind of "starter" MUD,
but since it's just examples, you can't really
consider it a MUD until you change it to suit
your creative vision.


Is Dead Souls really Nightmare in disguise?

Let's break this question down into its components:

What is Nightmare?

Nightmare was a mud. It was part of a branching of mud development
that occurred early in the days of popularized mudding. Some folks
decided to take MUD library development in a particular direction,
and eventually made available what is now known as the Nightmare mudlib.
Nightmare went through a few major changes, most notably from version 3
to version IV. By that time, the development of Nightmare was solely
managed by a coder who called himself Descartes.

What is the relationship between Nightmare and Dead Souls?

It appears that Dead Souls began as a "development" MUD. This means
that while Descartes ran his own MUD, he also worked on improving that MUD's
lib. It is unwise to make major changes to a MUD that people are playing on,
so the Dead Souls development MUD was one which served as a platform to
develop, extend, and improve the Nightmare lib without risking harm to active players.
Sometime after the release of the Nightmare IV mudlib, Descartes decided to
withdraw it from distribution. Based on their interpretation of copyright
law, people now do not distribute the Nightmare mudlib on Internet servers.
However, somewhat inexplicably, Descartes released the mudlib for his
development mud, Dead Souls, into the public domain. This meant that the
Dead Souls mudlib was completely free to be used by anyone in any way they
chose, be it distribution, modification, spindling or folding. Because Dead
Souls was the development mud for Nightmare Mud, which was the base of the
Nightmare mudlib, the relationship between the two is a very close one.


How close?


The similarity between Nightmare and Dead Souls can
now best be described as close cousins, rather than twins.


At one time it was almost identical. A close comparison of the
Dead Souls lib that Descartes released (version 1.1pre) against the
last released Nightmare lib (IVr6) reveals that they are very
nearly the same thing, file for file.

The main differences between the two are:

* A small number of Nightmare library files aren't on Dead Souls.
* Dead Souls doesn't come with the driver or install script the Nightmare had.
* All documentation files were removed from Dead Souls.
* "Nightmare" in file headers was changed to say "Dead Souls"

This might sound like a lot of difference, but consider this: not counting
documentation, Nightmare IVr6 lib contained 1064 files and directories, and
the Dead Souls 1.1pre lib contains 1082. Dead Souls 1.1pre actually had more
lib material in it than the last release of Nightmare.


Why mess with Dead Souls, then?

The main problem was that Dead Souls was a bear to set up. Because
driver development had not stopped (the driver is a separate software project),
but lib development had, incompatibilities grew in number over time. Using
the original driver from 1997 created a MUD that lacked important features
of modern muds, and risked instability. Using a modern driver required a
modification of fundamental lib systems that required some expertise to
perform. People stopped using Nightmare because they couldn't get it, and
they didn't use Dead Souls because the damn thing didn't work right. My own
Nightmare lib MUD, Frontiers, continued to chug along, quietly fading into
obscurity along with all other Nightmare IV based MUDs, while scrappy young
newcomers like CoffeeMud lib started elbowing their way into the MUD community.

Then a funny thing happened. I really got into lib coding. I mean, full-on
lib obsession. I can't really explain it, other than to say that when I was
younger it seemed hard and impenetrable, but now that I've been working in a
technical field for years, I have the mental tools (and patience) required to
disassemble and understand complex systems. I got turned on by analyzing and
understanding stuff that I'd considered over my head in years past.
But I was living in the past. I couldn't share my exciting lib ideas
and discoveries with anyone else, because the Nightmare LPC community was
in the very last stages of extinction.

I decided to do something about it. Maybe I'd be whistling into the wind,
tilting at windmills, or even worse, just talking to myself. But I decided
I'd make Dead Souls a viable lib for people to use, because it would be fun,
and because it might be nice to have other people to bounce ideas off of and
steal code from. At worst, I'd be doing nothing more pathetic than, say,
building model ships in my basement. At best, I might revive a once-thriving
MUD development community. Either way, it sounded like an enjoyable project,
so I proceeded.


Fine, but what's so special about Nightmare/Dead Souls? Why are you
making such a
big deal of wanting people to use it? It isn't
better than everything else,
surely. [insert mudlib name here]
is newer and has [insert feature here] and [other feature]!


Yes, that may be. My experience with other libs is limited, and I'm sure
that Dead Souls pales in comparison to others in one feature or another. My only
answer to that is, go ahead and use the lib you're comfortable with. I make no
claims of superiority. Hell, I'll be the first to admit there are still things
to fix and systems to implement. But if you are not sure which lib to pick,
Dead Souls is an excellent choice as a solid, stable, flexible and powerful platform
to build your MUD. You can do anything in a MUD with LPC, and I mean anything.
If you happen to have Nightmare experience, Dead Souls will be a homecoming...
like an old comfortable shoe, but without the holes or the stink.


What's LPC?

LPC is a kind of programming language. Dead Souls lib files don't
just contain descriptions of places and things: they have a format that describes
their relationships to the driver and permits you to do fancy stuff...pretty much
any text MUD thing you can think of, you can do in LPC.


How do I get started?

Download the latest version from http://dead-souls.sourceforge.net/
or http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls and
install it. There are versions available for Windows and for Unix. The main
difference between the two is the driver. The Windows driver is a Windows
executable. The Unix driver is in source code form and must be compiled.
The lib files for both versions are identical.

Once you log in, read the Players Handbook and the Creators Manual.


I went to http://dead-souls.net but the connection fails.

I'm just this guy, you know? I don't have the money to
pay for a static IP, so when my IP changes, it can take a day for
dead-souls.net to catch up with it.
In the meantime, you can use:

http://dead-souls.sourceforge.net


Anything else?

Read the Dead Souls Admin FAQ.

Read the Dead Souls Creator's FAQ.

Read the Dead Souls Installation FAQ.

Read the Quick Creation System Example Page.

Read the Debugging Guide.

Read the Editor Tutorial.

! The end.

! Dead Souls Homepage
! \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/www/ds-inst-faq.html ds2.0r20b/lib/www/ds-inst-faq.html *** ds2.0r18/lib/www/ds-inst-faq.html Fri Mar 24 14:34:51 2006 --- ds2.0r20b/lib/www/ds-inst-faq.html Sun Apr 9 23:48:48 2006 *************** *** 1,19 **** ! ! ! ! Dead Souls Installation FAQ ! !
Dead Souls Installation FAQ, v2.2

Written by Cratylus @ Frontiers, February 2006
Updated March 2006


Is this FAQ really necessary?

Normally, no. If you just follow the instructions included in the
Dead Souls packages, you'll be fine 90% of the time. However, a
non-trivial number of folks have run into difficult circumstances. For
those folks, this document is meant to illuminate how the install
process works, why some things are as they are, and suggest some
solutions to the more common obstacles.



Where do I get Dead Souls?

Download the latest version from one of the following:


http://sourceforge.net/project/showfiles.php?group_id=148388

http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls

Should I apply the available patches during an install?

--- 1,26 ---- ! ! Dead Souls Installation FAQ ! !
Dead Souls Installation FAQ, v2.5

Written by Cratylus @ Frontiers, February 2006
Updated April 2006

Is this FAQ really necessary?

Normally, no. If you just follow the instructions included in the
Dead Souls packages, you'll be fine 90% of the time. However, a
non-trivial number of folks have run into difficult circumstances. For
those folks, this document is meant to illuminate how the install
process works, why some things are as they are, and suggest some
solutions to the more common obstacles.



Where do I get Dead Souls?

You should only ever download from the sites listed below.
Some other sites tend to mirror these or copy data from
them, then fail to update their data regularly. The following
will always have the most recent version, and they are the
only ones officially authorized to distribute Dead Souls.

Download the latest version from one of the following:

Mudmagic: http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls

Sourceforge: http://sourceforge.net/project/showfiles.php?group_id=148388

+
+ Where + do I get older patches?
+
+ Mudmagic:
+
+     Windows patches: http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls/windows_patches
+    
+     UNIX patches: http://www.mudmagic.com/codes/download/lpc/mudos/dead_souls/unix_patches
+

+ Sourceforge:
+
+      Both: http://sourceforge.net/project/showfiles.php?group_id=148388&package_id=175140
+
+

+
Should I apply the available patches during an install?

*************** *** 24,32 **** version to another, please read the upgrade section further down in this
document.

!
! What's this Cygwin stuff?

Don't bother with it. The Cygwin files are there strictly for legal reasons, and they
--- 31,38 ---- version to another, please read the upgrade section further down in this
document.

!
! What's this Cygwin stuff?

Don't bother with it. The Cygwin files are there strictly for legal reasons, and they
*************** *** 40,47 **** provide
the source code that these binaries came from.

! Fortunately, the source code doesn't have to be in the distribution. Making
it downloadable from the same page satisfies their licensing. But their
source code is very unlikely to be useful to you, unless you're very --- 46,52 ---- provide
the source code that these binaries came from.

! Fortunately, the source code doesn't have to be in the distribution. Making
it downloadable from the same page satisfies their licensing. But their
source code is very unlikely to be useful to you, unless you're very *************** *** 50,62 **** sources.

So, leave it alone.
!
!
How do I ! install the Windows version of Dead Souls?
!
! Easy.
!
First make sure you are running Windows 2000 or above. Then:

1) unzip the distribution file
--- 55,66 ---- sources.

So, leave it alone.
!

!
How do I ! install the Windows version of Dead Souls?

!
NOTE: If you are using Windows, USE THE WINDOWS VERSION. 
There is no benefit in trying to download Cygwin and
modify the UNIX source code and trying to get it to
compile in Windows, unless you know exactly what you're
doing. Yes, people have tried to do this and complained.
!
First make sure you are running Windows 2000 or above. Then:

1) unzip the distribution file
*************** *** 74,81 ****
5) connect to your Windows computer by telnetting to port 6666. If you are using the command
!     window, type: telnet localhost 6666

6) Enter the name you want your admin to have, and answer the questions provided. Make sure
--- 78,84 ----
5) connect to your Windows computer by telnetting to port 6666. If you are using the command
!     window, type: telnet localhost 6666

6) Enter the name you want your admin to have, and answer the questions provided. Make sure
*************** *** 85,92 **** 7) When you finish entering the admin's info, the mud will automatically shut down.

! 8)
run c:\ds\runmud.bat again

9) log in as your admin --- 88,94 ---- 7) When you finish entering the admin's info, the mud will automatically shut down.

! 8)
run c:\ds\runmud.bat again

9) log in as your admin *************** *** 99,134 ****        (as of this writing, it's option r). Enter the name desired, allow the mud to shut down.

! 11)
run c:\ds\runmud.bat (that's it for the mud reboots. come on, it's windows. you're used to rebooting)

! 12) log in, type: rm /log/chan/ds
!
!
13) start reading the handbook and the manual.


Hold up, these Windows instructions aren't working

There are a few common reasons for this.

! * You need to
rm /log/chan/ds . Dead ! Souls includes a large sample logfile which gets
! rotated soon after installation. Problem is, the new filename is
! incompatible with your Windows filesystem. If you don't issue this
! command, your mud will soon start crapping out, complaining about
! the /log directory. The fix for this will be in a later release.

! * Most Windows PC's these days have firewall software installed. If you try to connect but
aren't able to, there's a good chance your connection is being blocked by your firewall. Disable
--- 101,128 ----        (as of this writing, it's option r). Enter the name desired, allow the mud to shut down.

! 11)
run c:\ds\runmud.bat (that's it for the mud reboots. come on, it's windows. you're used to rebooting)

! 12) log in,
start ! reading the handbook and the manual.

+ * Note: If you use c:\ds\startmud.bat, + you won't need to manually restart each time.
+

Hold up, these Windows instructions aren't working

There are a few common reasons for this.

! * Download only from the sites mentioned above. Those are the only
! ones sure to have the latest version. Other sites can be out of date.

!
* ! Most Windows PC's these days have firewall software installed. If you try to connect but
aren't able to, there's a good chance your connection is being blocked by your firewall. Disable
*************** *** 136,144 **** away, you know now that
you have to somehow configure your firewall to allow incoming TCP connections on port 6666.
!   Note: You may also have to permit outbound UDP connections to ! port 9000 on
! IP address 198.144.203.194 if you want your mud to join the Intermud3 network.

*  You might not be using c:\ds as your base directory. Make sure --- 130,138 ---- away, you know now that
you have to somehow configure your firewall to allow incoming TCP connections on port 6666.
!   Note: You may also have to permit outbound TCP connections to ! port 23 on
! IP address 149.152.218.102 if you want your mud to join the Intermud3 network.

*  You might not be using c:\ds as your base directory. Make sure *************** *** 155,172 **** please let me know by emailing me at <my name>@users.sourcefore.net .

- *  If you've made sure you've followed the directions, avoided the - "don'ts", and it
- still doesn't work, it may be that you have a Cygwin conflict. If you - already
- have Cygwin installed on your PC, the dll's provided in the c:\ds\bin - directory
- might be conflicting with your current version. Try moving the .dll - files in
- c:\ds\bin to some other folder and see if this fixes the problem. If it - doesn't, don't forget
- to put them back.
-
*  If the mud starts but you get lots of bizarre errors, there may be a couple of
reasons for this:
--- 149,154 ---- *************** *** 193,198 **** --- 175,193 ---- reinstalling but with a different
    unzip utility.

+
*  + If you've made sure you've followed the directions, avoided the + "don'ts", and it
+ still doesn't work, it may be that you have a Cygwin conflict. If you + already
+ have Cygwin installed on your PC, the dll's provided in the c:\ds\bin + directory
+ might be conflicting with your current version. Try moving the .dll + files in
+ c:\ds\bin to some other folder and see if this fixes the problem. If it + doesn't, don't forget
+ to put them back.

+

How do I install the UNIX version of Dead Souls?
*************** *** 203,214 **** fileroller (a GUI based app) to decompress the tarball. If
you ignore this warning you are very likely to end up with really
confusing errors and problems. Instead use the normal unix command
! line. For example: tar xzf ds2.0.tar.gz

* Don't use an existing driver ! binary, even if its from a previous
(or even the same) Dead Souls distribution. If you're doing a fresh
install, always, always, always do the complete and exact installation procedure,
--- 198,207 ---- fileroller (a GUI based app) to decompress the tarball. If
you ignore this warning you are very likely to end up with really
confusing errors and problems. Instead use the normal unix command
! line. For example: tar xzf ds2.0.tar.gz

* Don't use an existing driver ! binary, even if it's from a previous
(or even the same) Dead Souls distribution. If you're doing a fresh
install, always, always, always do the complete and exact installation procedure,
*************** *** 226,239 ****
2) cd to v22.2b14

! 3) type: ./configure

! 4) type: make

! 5) type: make install
        If this fails, just manually copy the "driver" file
        into $MUDHOME/bin/
--- 219,229 ----
2) cd to v22.2b14

! 3) type: ./configure

! 4) type: make

! 5) type: make install
        If this fails, just manually copy the "driver" file
        into $MUDHOME/bin/
*************** *** 259,268 ****
9)  telnet to your machine, using the port specified in mudos.cfg. For
! example: telnet ! localhost 6666

10) Create a new user. Just answer the questions. Make sure you are
--- 249,256 ----
9)  telnet to your machine, using the port specified in mudos.cfg. For
! example: telnet ! localhost 6666

10) Create a new user. Just answer the questions. Make sure you are
*************** *** 278,286 **** I'm having trouble getting Dead Souls for UNIX to work

! * first, stop using Fedora. Ha ha just kidding (not really).

! * most of the problems with unix installs involve permissions conflicts. If
you uncompress the tarball as root user, for example, then try to
run it as an unprivileged user, the process won't be able to read
--- 266,279 ---- I'm having trouble getting Dead Souls for UNIX to work

! * first, stop using Fedora. Ha ha just kidding.
!
!
* ! Download only from the sites mentioned above. Those are the only
! ones sure to have the latest version. Other sites can be out of date.

!
* ! most of the problems with unix installs involve permissions conflicts. If
you uncompress the tarball as root user, for example, then try to
run it as an unprivileged user, the process won't be able to read
*************** *** 305,318 **** directory:

cd ! /home/joe/ds2.0

cp bin/mudos.cfg.orig lib/secure/cfg/mudos.cfg

! Then edit
lib/secure/cfg/mudos.cfg to point to the correct bin and
lib directories.

--- 298,309 ---- directory:

cd ! /home/joe/ds2.0

cp bin/mudos.cfg.orig lib/secure/cfg/mudos.cfg

! Then edit
lib/secure/cfg/mudos.cfg to point to the correct bin and
lib directories.

*************** *** 337,355 **** ./configure script as per the current instructions, which you
should follow closely.

- * If you have trouble logging in and the driver complains about
- "Cost" functions and "economy", then you've run into a very odd
- bug that's still a bit mysterious. Somehow your /save/economy.o
- file has been corrupted. Uncompress the tarball into a temporary
- directory and copy the original economy.o over the corrupt
- one. Then please email - me about this. Only one user has ever had
- this problem, but apparently it happened twice, so if it happens
- to someone else, I can at least tell him he's not crazy.
-
* If the driver craps out complaining about a hosed up swap
! file
, you're probably running Fedora, and you probably haven't
changed your hostname from the original "localhost.localdomain"
or whatever nonsense they use.
--- 328,335 ---- ./configure script as per the current instructions, which you
should follow closely.

* If the driver craps out complaining about a hosed up swap
! file
, you're probably running Fedora, and you probably haven't
changed your hostname from the original "localhost.localdomain"
or whatever nonsense they use.
*************** *** 361,369 **** its hostname, that it receive something like
"alpha", and ! not something like "alpha.bravo".
    If your machine is under the impression that its --- 341,347 ---- its hostname, that it receive something like
"alpha", and ! not something like "alpha.bravo".
    If your machine is under the impression that its *************** *** 374,381 **** mudos, which will eventually choke on it.
!     If you're good at C++, you can edit lines 66 and 76 of
v22.2b14/swap.c and correct this behavior. But the common sense fix is
--- 352,358 ---- mudos, which will eventually choke on it.
!     If you're good at C++, you can edit lines 66 and 76 of
v22.2b14/swap.c and correct this behavior. But the common sense fix is
*************** *** 397,403 **** is there a windows-format mudos.cfg in /secure/cfg? I'm running unix.


This is a symptom of my obsession to have the Windows lib distribution
! and the unix lib be absolutely identical. During a fresh install,
this file is overwritten with a unix version, if you follow the
install instructions.


--- 374,381 ---- is there a windows-format mudos.cfg in /secure/cfg? I'm running unix.

This is a symptom of my obsession to have the Windows lib distribution
! and the unix lib be absolutely identical. ! During a fresh install,
this file is overwritten with a unix version, if you follow the
install instructions.


*************** *** 417,423 **** How do I upgrade from one version of Dead Souls to another?


!     For the your convenience, patches are available to move from one minor
revision of Dead Souls to another. But there isn't a patch for every possible
--- 395,401 ---- How do I upgrade from one version of Dead Souls to another?


!     For your convenience, patches are available to move from one minor
revision of Dead Souls to another. But there isn't a patch for every possible
*************** *** 432,438 **** of Dead Souls to another. For example, do not expect a ds2.0 -> ds2.1 patch.

!     The upgrade principle for bot Windows and UNIX is the same. Basically
a Dead Souls patch is a pretty unsophisticated upgrade system. In the case of
--- 410,416 ---- of Dead Souls to another. For example, do not expect a ds2.0 -> ds2.1 patch.

!     The upgrade principle for both Windows and UNIX is the same. Basically
a Dead Souls patch is a pretty unsophisticated upgrade system. In the case of
*************** *** 517,541 **** Ok, it's running. Now what?

! Read the admin FAQ.
!
! Read the creator's FAQ.
!
! Log in and read the Player's Handbook.
!
! Then read the Creator's Manual.
!
! If you run into problems or have questions not addressed in the docs, ! use the <ds> ! channel
! to ask for help. See the
creator's FAQ for proper ! etiquette and form.
!

!
Dead Souls Homepage
! ! --- 495,508 ---- Ok, it's running. Now what?

! Log in and read the in-game Player's Handbook.
!
!
Read the Dead Souls Admin FAQ.

Read the Dead Souls Creator's FAQ.

Read the Dead Souls Installation FAQ.

Read the Quick Creation System Example Page.

Read the Debugging Guide.

Read the Editor Tutorial.
! Read ! the in-game Creator's Manual.
!
!

!
Dead ! Souls Homepage
! \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/www/editor.html ds2.0r20b/lib/www/editor.html *** ds2.0r18/lib/www/editor.html Fri Mar 24 14:42:02 2006 --- ds2.0r20b/lib/www/editor.html Sun Apr 9 23:48:49 2006 *************** *** 1,174 **** ! ! ! ! Mud Editor Tutorial ! !
The ed Editor


This has always been the aspect of coding that new
creators have most trouble with. It's what discourages most
people from creating lots of stuff, in fact.

With Dead Souls, you can get away with avoiding ed
most of the time, by using the room maker and the thing maker.

But to add special functions to your code, like
magic items, smart NPC's (aka mobs), traps, hidden objects,
etc, you need to use ed, if you're going to be editing inside
the mud.

ed is a simple editing program. It is designed to
work on a line-by-line basis, so it is called a "line editor".

Let's start by looking at, and editing, a small file.
We've coded a sword, and we want to change its description
from "short sword" to "plain sword":


!
!

> cd /realms/cratylus/area/weap
1) I changed my working directory to my area weapons dir
/realms/cratylus/area/weap:
> ls
I listed the contents of that dir:
/realms/cratylus/area/weap/:
1 dagger.c 1 nco_sword.c~ 1 std_sword.c~
1 gsword.c 1 sharpsword.c 1 sword.c
001 gsword.c~ 1 staff.c
1 nco_sword.c 1 std_sword.c


> ed sword.c
I ran the ed command on the file sword.c.
/realms/cratylus/area/weap/sword.c, 641 bytes
:n
This makes the editor display line numbers next to the lines.
number on, list off
:1z This lists about 20 lines of text
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
11 inherit LIB_ITEM;
12
13 static void create() {
14 item::create();
15 SetKeyName("short sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a short sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:z
22 SetVendorType(VT_WEAPON);
23 SetClass(20);
24 SetDamageType(BLADE);
25 SetWeaponType("blade");
26 }
:15 I displayed line 15
15 SetKeyName("short sword");
:15c I used 'c' to replace line 15
15. * SetKeyName("plain sword"); I entered my replacement text
16. * . I entered a single dot on a blank line
:
16 SetId( ({ "sword", "short sword" }) );
:1z I listed about 20 lines, starting from line 1
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
11 inherit LIB_ITEM;
12
13 static void create() {
14 item::create();
15 SetKeyName("plain sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a short sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:18 I displayed line 18
18 SetShort("a short sword");
:18c I started the replacement of line 18
18. * SetShort("a plain sword"); I entered my replacement text
19. * . I entered a single dot on a blank line
:1z I displayed about 20 lines starting from line 1
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
11 inherit LIB_ITEM;
12
13 static void create() {
14 item::create();
15 SetKeyName("plain sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a plain sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:x I saved and exited
"/realms/cratylus/area/weap/sword.c" 26 lines 633 bytes
Exit from ed.
> update sword I loaded the file into memory
/realms/cratylus/area/weap/sword: Ok
!
!


Let's take this step by step:

1) I changed my working directory to my area weapons dir:
cd /realms/cratylus/area/weap

2) I listed the contents of that dir: ls

3) I ran the ed command on the file sword.c: ed sword.c

4) Within the editor, I issued the 'n' command. This makes the editor
display line numbers next to the lines.

5) Within the editor, I issued the '1z' command. What 'z' does is display
about 20 lines of the file (the exact number depends on your screen
settings. In my case it's 22). If you happen to be looking at line 1, it
will display lines 1 through to about 20. If you happen to be looking
at line 40, it will display from line 40 to about 60.
If you want to start looking at lines starting at line 15, you
can issue the '15z' command, which basically means "display about 20
lines starting at line 15".
In this case, I wanted to start from the beginning of the file,
so I issued '1z'.

6) '1z' stopped listing the file at line 22, so I entered 'z' again to
list the rest.

7) Since I want to change "short sword" to "plain sword", I examined each
line to find the word "short". I noticed that line 15 has "short" in it,
so to get a look at that line alone, I entered '15'.

8) Now that I'm sure line 15 needs to change, I issue the '15c' command.
'c' indicates that I want to change a line. '15c' means "delete whatever
was in line 15, and replace it with what I am about to type".

9) You can see that my editor prompt changed from ":" to "*". What this
means is that I am now in "input mode". Whatever I type now will be
added to the file. Since my last command in "command mode" was '15c',
I am now replacing that line with what I want the line to contain:
SetKeyName("plain sword");

10) Ok, I replaced the line, but I'm still in input mode. To go back to
command mode, I type a single period and enter, like this:
.

11) I'm back in command mode now. When I list the file contents with
'1z' I can see that line 15 now says what I wanted.

12) Now I see another line that needs changing, so I enter '18' to
get a closer look.

13) Sure enough, 18 needs to change, so I issue '18c'.

14) Like I did for line 15, I enter what the line should be.

15) To return to command mode, I enter a single period on a blank line.

16) I list the file contents, and see that my change was successful.

17) I'm finished making my changes, so I issue the 'x' command. 'x'
means "save the changes I have made, and exit the editor".

18) I am now at my regular command prompt. To load my changes to this
file, I type 'update sword'.


Editor basics, part 2



In the last section you saw what a simple line
replacement looks like in ed. Next we'll talk about some common
ed actions.

ADDING STUFF:

Suppose I want to specify that this sword requires only
one hand to wield it:

!
!

> ed sword.c started the editor
/realms/cratylus/area/weap/sword.c, 633 bytes
:n enabled line number printing
number on, list off
:15,22 listed lines 15 to 22
15 SetKeyName("plain sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a plain sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:20a appended to the file after line 20
21. * SetHands(1); entered my added text
22. * . single dot on a blank line to exit input mode
:18,22 displayed line 18 through 22
18 SetShort("a plain sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetHands(1);
22 SetDollarCost(50);
:x exited editor and saved
"/realms/cratylus/area/weap/sword.c" 27 lines 646 bytes
Exit from ed.
!
!


Here you can see that instead of 'c', which replaces, I
used 'a', which adds. I decided my new line would go after line
20, so I issued the command '20a'. Once I was done, I typed
a single dot on a blank line to exit "input mode". You'll notice
I didn't use the 'z' command. Instead, since I knew where my
changes would go, I decided to list lines 18 through 22 with
the command '18,22'. I then issued the 'x' command to save my
changes and exit the editor.
If had I wanted my addition to go in front of line 20,
I could have used the '20i' command.

DELETING LINES

Suppose I'm tired of seeing header lines that no
longer apply to this file. We can delete a single line, or
a range of lines, with the 'd' commmand:

!
> ed sword.c
!
/realms/cratylus/area/weap/sword.c, 646 bytes
:n enabled line number printing
number on, list off
:1,10 listed lines 1 to 10
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
:1,5d deleted lines 1 to 5
:1,5 listed (the new) lines 1 to 5
1
2 #include <lib.h>
3 #include <damage_types.h>
4 #include <vendor_types.h>
5
:1d deleted blank line 1
:1z displayed the file starting at line 1
1 #include <lib.h>
2 #include <damage_types.h>
3 #include <vendor_types.h>
4
5 inherit LIB_ITEM;
6
7 static void create() {
8 item::create();
9 SetKeyName("plain sword");
10 SetId( ({ "sword", "short sword" }) );
11 SetAdjectives( ({ "short" }) );
12 SetShort("a plain sword");
13 SetLong("A cheap and rather dull short sword.");
14 SetMass(150);
15 SetHands(1);
16 SetDollarCost(50);
17 SetVendorType(VT_WEAPON);
18 SetClass(20);
19 SetDamageType(BLADE);
20 SetWeaponType("blade");
21 }
:x exited and saved
"/realms/cratylus/area/weap/sword.c" 21 lines 476 bytes
Exit from ed.
!
!


First I deleted lines 1 through 5 with the command '1,5d'.
Then, for good measure, I removed the remaining blank line '1d'.
Voila. Cleaner code.

REPLACING STRINGS

Well now I want to replace all instances of "short" with
"plain", and I don't feel like editing each matching line
manually. I can do a search and replace. First I will list which
lines need to change, then I will change them:

!
> ed sword.c
!
/realms/cratylus/area/weap/sword.c, 476 bytes
:n
enabled line number printing
number on, list off
:g/short/p
searched for and displayed lines containing "short"
10 SetId( ({ "sword", "short sword" }) );
11 SetAdjectives( ({ "short" }) );
13 SetLong("A cheap and rather dull short sword.");
:g/short/s/short/plain
searched for "short" and replaced with "plain"
:g/short/p
searched for "short" again but found none
:1z
listed file from line 1
1 #include <lib.h>
2 #include <damage_types.h>
3 #include <vendor_types.h>
4
5 inherit LIB_ITEM;
6
7 static void create() {
8 item::create();
9 SetKeyName("plain sword");
10 SetId( ({ "sword", "plain sword" }) );
11 SetAdjectives( ({ "plain" }) );
12 SetShort("a plain sword");
13 SetLong("A cheap and rather dull plain sword.");
14 SetMass(150);
15 SetHands(1);
16 SetDollarCost(50);
17 SetVendorType(VT_WEAPON);
18 SetClass(20);
19 SetDamageType(BLADE);
20 SetWeaponType("blade");
21 }
:1
moved to line 1
1 #include <lib.h>
:I
ran automatic indentation
Indenting entire code...
Indentation complete.
:1z
listed file from line 1
#include <lib.h>
#include <damage_types.h>
#include <vendor_types.h>

inherit LIB_ITEM;

static void create() {
item::create();
SetKeyName("plain sword");
SetId( ({ "sword", "plain sword" }) );
SetAdjectives( ({ "plain" }) );
SetShort("a plain sword");
SetLong("A cheap and rather dull plain sword.");
SetMass(150);
SetHands(1);
SetDollarCost(50);
SetVendorType(VT_WEAPON);
SetClass(20);
SetDamageType(BLADE);
SetWeaponType("blade");
}
:x
exited and saved
"/realms/cratylus/area/weap/sword.c" 21 lines 488 bytes
Exit from ed.
!
!


The command g/short/p showed me all the lines
that contained the substring "short". Then I ran the global
search and replace command to substitute "plain" for "short",
:g/short/s/short/plain
Then I searched again for the string "short" and
nothing came up, because it had been replaced.

Finally I went to line number 1 and issued the 'I'
command. This auto-indents the code, making it neater and
easier to read.


Editor basics, part 3



Now let's look at some common problems:


1) Accidental deletion


If you type 1,20d when you meant to type 1,2d you will end
up with a file 18 lines shorter than you intended. ed does not
have an "undo" command, so those lines will never come back.
However, if you quit the editor *without saving*, then that
deletion will not be committed to the file. You can issue the 'Q'
command:

:Q

To force quit without saving. Of course, if those lines
weren't already in the file, this won't help much.


2) Can't leave the editor


You try to write and exit, but get this:

:x
File command failed.

What this means is that for some reason, you can't write
to the file, so you don't exit the editor. What this usually means is that
you tried to edit a file that does not belong to you. Since you do not
have permission to modify the file, ed refuses to commit your changes.

There are two ways around this. If you don't really care
whether your changes are saved or not, you can just force quit the
editor with 'Q':

:Q
Exit from ed.

Your changes will be lost, but you'll be out of the editor.

If you really want to save this file, you'll have to save it
somewhere other than your current working directory (cwd). You can save
it to your home directory with the 'w' command, then force quit:

:w /realms/cratylus/sword.c
"/realms/cratylus/sword.c" 20 lines 478 bytes
:Q
Exit from ed.


3) Indent command fails


You try to auto-indent your code but get an error like this:

:I
Indenting entire code...
Unterminated string in line 13
Indentation halted.

This is pretty self explanatory. Indent relies on a certain
amount of coherence in your code, and if your syntax is sufficiently
munged, it can't figure out how to properly do its thing.
Examine the line that indent complains about, and also the
line before it. Sometimes a good line is accused of being bad, just
because it comes after a bad line.


4) I need to [something] in ed, but don't know how!


While in command mode, type 'h' and enter. You'll get
a handy list of ed commands available to you.


5) My ability/patience/time is limited. I want not to use ed.


I feel your pain. The currently available ways around
this are:

1) Shell account. If you can get shell, or command line access
to the computer that is running the mud, then you can probably
use an editor local to that computer (like vim) to edit files.
Chances are, though, that if you are a regular rank-and-file
creator, you will not be given shell access. Most system admins
consider giving random people off the net shell access
an abomination.

2) Server FTP/SFTP. The server that runs the mud might have an
ftp server or sftpd access. Again, most security-conscious sysadmins
will not permit Just Some Person Off The Internet to have this
kind of access.

3) Mud FTP. I don't like this option. Unix FTPD is a security
concern as it is. Using unsupported, un-warrantied mud network code
to provide ftp access to files seems to me to be equivalent to pulling
down your pants, bending over, and whistling for the Internet to
come visit. But...it's an option.

4) Client upload. This is actually the most sensible option, if
you are truly allergic to ed. You still need to use ed, but what
you can do is write your code in your favorite local editor, like
notepad or gvim or whatever. Then use your mud client (most of them
have an option to "send text") to send the code by running ed,
entering input mode, copying the code from your editor, and
pasting it into your client.
This is a somewhat awkward system, and ill-suited to
making minor changes. But it has the virtue of working well and
being a widely available option.

5) Suck it up. Really, you need to just get used to it. Don't
make me tell you stories about how when I was younger I had to
code using a VT terminal with no cut-and-paste, in an unheated,
locked computer lab 20'x10' in size, at 9600 bps. In a snowstorm.
Uphill both ways.



Dead Souls Homepage



! ! --- 1,23 ---- ! ! Mud Editor Tutorial ! !
The ed Editor


This has always been the aspect of coding that new
creators have most trouble with. It's what discourages most
people from creating lots of stuff, in fact.

With Dead Souls, you can get away with avoiding ed
most of the time, by using the room maker and the thing maker.

But to add special functions to your code, like
magic items, smart NPC's (aka mobs), traps, hidden objects,
etc, you need to use ed, if you're going to be editing inside
the mud.

ed is a simple editing program. It is designed to
work on a line-by-line basis, so it is called a "line editor".

Let's start by looking at, and editing, a small file.
We've coded a sword, and we want to change its description
from "short sword" to "plain sword":


!
!

> cd /realms/cratylus/area/weap
1) I changed my working directory to my area weapons dir
/realms/cratylus/area/weap:
> ls
I listed the contents of that dir:
/realms/cratylus/area/weap/:
1 dagger.c 1 nco_sword.c~ 1 std_sword.c~
1 gsword.c 1 sharpsword.c 1 sword.c
001 gsword.c~ 1 staff.c
1 nco_sword.c 1 std_sword.c


> ed sword.c
I ran the ed command on the file sword.c.
/realms/cratylus/area/weap/sword.c, 641 bytes
:n
This makes the editor display line numbers next to the lines.
number on, list off
:1z This lists about 20 lines of text
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
11 inherit LIB_ITEM;
12
13 static void create() {
14 item::create();
15 SetKeyName("short sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a short sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:z
22 SetVendorType(VT_WEAPON);
23 SetClass(20);
24 SetDamageType(BLADE);
25 SetWeaponType("blade");
26 }
:15 I displayed line 15
15 SetKeyName("short sword");
:15c I used 'c' to replace line 15
15. * SetKeyName("plain sword"); I entered my replacement text
16. * . I entered a single dot on a blank line
:
16 SetId( ({ "sword", "short sword" }) );
:1z I listed about 20 lines, starting from line 1
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
11 inherit LIB_ITEM;
12
13 static void create() {
14 item::create();
15 SetKeyName("plain sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a short sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:18 I displayed line 18
18 SetShort("a short sword");
:18c I started the replacement of line 18
18. * SetShort("a plain sword"); I entered my replacement text
19. * . I entered a single dot on a blank line
:1z I displayed about 20 lines starting from line 1
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
11 inherit LIB_ITEM;
12
13 static void create() {
14 item::create();
15 SetKeyName("plain sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a plain sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:x I saved and exited
"/realms/cratylus/area/weap/sword.c" 26 lines 633 bytes
Exit from ed.
> update sword I loaded the file into memory
/realms/cratylus/area/weap/sword: Ok
!
!


Let's take this step by step:

1) I changed my working directory to my area weapons dir:
cd /realms/cratylus/area/weap

2) I listed the contents of that dir: ls

3) I ran the ed command on the file sword.c: ed sword.c

4) Within the editor, I issued the 'n' command. This makes the editor
display line numbers next to the lines.

5) Within the editor, I issued the '1z' command. What 'z' does is display
about 20 lines of the file (the exact number depends on your screen
settings. In my case it's 22). If you happen to be looking at line 1, it
will display lines 1 through to about 20. If you happen to be looking
at line 40, it will display from line 40 to about 60.
If you want to start looking at lines starting at line 15, you
can issue the '15z' command, which basically means "display about 20
lines starting at line 15".
In this case, I wanted to start from the beginning of the file,
so I issued '1z'.

6) '1z' stopped listing the file at line 22, so I entered 'z' again to
list the rest.

7) Since I want to change "short sword" to "plain sword", I examined each
line to find the word "short". I noticed that line 15 has "short" in it,
so to get a look at that line alone, I entered '15'.

8) Now that I'm sure line 15 needs to change, I issue the '15c' command.
'c' indicates that I want to change a line. '15c' means "delete whatever
was in line 15, and replace it with what I am about to type".

9) You can see that my editor prompt changed from ":" to "*". What this
means is that I am now in "input mode". Whatever I type now will be
added to the file. Since my last command in "command mode" was '15c',
I am now replacing that line with what I want the line to contain:
SetKeyName("plain sword");

10) Ok, I replaced the line, but I'm still in input mode. To go back to
command mode, I type a single period and enter, like this:
.

11) I'm back in command mode now. When I list the file contents with
'1z' I can see that line 15 now says what I wanted.

12) Now I see another line that needs changing, so I enter '18' to
get a closer look.

13) Sure enough, 18 needs to change, so I issue '18c'.

14) Like I did for line 15, I enter what the line should be.

15) To return to command mode, I enter a single period on a blank line.

16) I list the file contents, and see that my change was successful.

17) I'm finished making my changes, so I issue the 'x' command. 'x'
means "save the changes I have made, and exit the editor".

18) I am now at my regular command prompt. To load my changes to this
file, I type 'update sword'.


Editor basics, part 2



In the last section you saw what a simple line
replacement looks like in ed. Next we'll talk about some common
ed actions.

ADDING STUFF:

Suppose I want to specify that this sword requires only
one hand to wield it:

!
!

> ed sword.c started the editor
/realms/cratylus/area/weap/sword.c, 633 bytes
:n enabled line number printing
number on, list off
:15,22 listed lines 15 to 22
15 SetKeyName("plain sword");
16 SetId( ({ "sword", "short sword" }) );
17 SetAdjectives( ({ "short" }) );
18 SetShort("a plain sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetDollarCost(50);
22 SetVendorType(VT_WEAPON);
:20a appended to the file after line 20
21. * SetHands(1); entered my added text
22. * . single dot on a blank line to exit input mode
:18,22 displayed line 18 through 22
18 SetShort("a plain sword");
19 SetLong("A cheap and rather dull short sword.");
20 SetMass(150);
21 SetHands(1);
22 SetDollarCost(50);
:x exited editor and saved
"/realms/cratylus/area/weap/sword.c" 27 lines 646 bytes
Exit from ed.
!
!


Here you can see that instead of 'c', which replaces, I
used 'a', which adds. I decided my new line would go after line
20, so I issued the command '20a'. Once I was done, I typed
a single dot on a blank line to exit "input mode". You'll notice
I didn't use the 'z' command. Instead, since I knew where my
changes would go, I decided to list lines 18 through 22 with
the command '18,22'. I then issued the 'x' command to save my
changes and exit the editor.
If had I wanted my addition to go in front of line 20,
I could have used the '20i' command.

DELETING LINES

Suppose I'm tired of seeing header lines that no
longer apply to this file. We can delete a single line, or
a range of lines, with the 'd' commmand:

!
> ed sword.c
!
/realms/cratylus/area/weap/sword.c, 646 bytes
:n enabled line number printing
number on, list off
:1,10 listed lines 1 to 10
1 /* /domains/Examples/weapon/sword.c
2 * from the Nightmare IV LPC Library
3 * a simple sword example, nothing fancy
4 * created by Descartes of Borg 950402
5 */
6
7 #include <lib.h>
8 #include <damage_types.h>
9 #include <vendor_types.h>
10
:1,5d deleted lines 1 to 5
:1,5 listed (the new) lines 1 to 5
1
2 #include <lib.h>
3 #include <damage_types.h>
4 #include <vendor_types.h>
5
:1d deleted blank line 1
:1z displayed the file starting at line 1
1 #include <lib.h>
2 #include <damage_types.h>
3 #include <vendor_types.h>
4
5 inherit LIB_ITEM;
6
7 static void create() {
8 item::create();
9 SetKeyName("plain sword");
10 SetId( ({ "sword", "short sword" }) );
11 SetAdjectives( ({ "short" }) );
12 SetShort("a plain sword");
13 SetLong("A cheap and rather dull short sword.");
14 SetMass(150);
15 SetHands(1);
16 SetDollarCost(50);
17 SetVendorType(VT_WEAPON);
18 SetClass(20);
19 SetDamageType(BLADE);
20 SetWeaponType("blade");
21 }
:x exited and saved
"/realms/cratylus/area/weap/sword.c" 21 lines 476 bytes
Exit from ed.
!
!


First I deleted lines 1 through 5 with the command '1,5d'.
Then, for good measure, I removed the remaining blank line '1d'.
Voila. Cleaner code.

REPLACING STRINGS

Well now I want to replace all instances of "short" with
"plain", and I don't feel like editing each matching line
manually. I can do a search and replace. First I will list which
lines need to change, then I will change them:

!
> ed sword.c
!
/realms/cratylus/area/weap/sword.c, 476 bytes
:n
enabled line number printing
number on, list off
:g/short/p
searched for and displayed lines containing "short"
10 SetId( ({ "sword", "short sword" }) );
11 SetAdjectives( ({ "short" }) );
13 SetLong("A cheap and rather dull short sword.");
:g/short/s/short/plain
searched for "short" and replaced with "plain"
:g/short/p
searched for "short" again but found none
:1z
listed file from line 1
1 #include <lib.h>
2 #include <damage_types.h>
3 #include <vendor_types.h>
4
5 inherit LIB_ITEM;
6
7 static void create() {
8 item::create();
9 SetKeyName("plain sword");
10 SetId( ({ "sword", "plain sword" }) );
11 SetAdjectives( ({ "plain" }) );
12 SetShort("a plain sword");
13 SetLong("A cheap and rather dull plain sword.");
14 SetMass(150);
15 SetHands(1);
16 SetDollarCost(50);
17 SetVendorType(VT_WEAPON);
18 SetClass(20);
19 SetDamageType(BLADE);
20 SetWeaponType("blade");
21 }
:1
moved to line 1
1 #include <lib.h>
:I
ran automatic indentation
Indenting entire code...
Indentation complete.
:1z
listed file from line 1
#include <lib.h>
#include <damage_types.h>
#include <vendor_types.h>

inherit LIB_ITEM;

static void create() {
item::create();
SetKeyName("plain sword");
SetId( ({ "sword", "plain sword" }) );
SetAdjectives( ({ "plain" }) );
SetShort("a plain sword");
SetLong("A cheap and rather dull plain sword.");
SetMass(150);
SetHands(1);
SetDollarCost(50);
SetVendorType(VT_WEAPON);
SetClass(20);
SetDamageType(BLADE);
SetWeaponType("blade");
}
:x
exited and saved
"/realms/cratylus/area/weap/sword.c" 21 lines 488 bytes
Exit from ed.
!
!


The command g/short/p showed me all the lines
that contained the substring "short". Then I ran the global
search and replace command to substitute "plain" for "short",
:g/short/s/short/plain
Then I searched again for the string "short" and
nothing came up, because it had been replaced.

Finally I went to line number 1 and issued the 'I'
command. This auto-indents the code, making it neater and
easier to read.


Editor basics, part 3



Now let's look at some common problems:


1) Accidental deletion


If you type 1,20d when you meant to type 1,2d you will end
up with a file 18 lines shorter than you intended. ed does not
have an "undo" command, so those lines will never come back.
However, if you quit the editor *without saving*, then that
deletion will not be committed to the file. You can issue the 'Q'
command:

:Q

To force quit without saving. Of course, if those lines
weren't already in the file, this won't help much.


2) Can't leave the editor


You try to write and exit, but get this:

:x
File command failed.

What this means is that for some reason, you can't write
to the file, so you don't exit the editor. What this usually means is that
you tried to edit a file that does not belong to you. Since you do not
have permission to modify the file, ed refuses to commit your changes.

There are two ways around this. If you don't really care
whether your changes are saved or not, you can just force quit the
editor with 'Q':

:Q
Exit from ed.

Your changes will be lost, but you'll be out of the editor.

If you really want to save this file, you'll have to save it
somewhere other than your current working directory (cwd). You can save
it to your home directory with the 'w' command, then force quit:

:w /realms/cratylus/sword.c
"/realms/cratylus/sword.c" 20 lines 478 bytes
:Q
Exit from ed.


3) Indent command fails


You try to auto-indent your code but get an error like this:

:I
Indenting entire code...
Unterminated string in line 13
Indentation halted.

This is pretty self explanatory. Indent relies on a certain
amount of coherence in your code, and if your syntax is sufficiently
munged, it can't figure out how to properly do its thing.
Examine the line that indent complains about, and also the
line before it. Sometimes a good line is accused of being bad, just
because it comes after a bad line.


4) I need to [something] in ed, but don't know how!


While in command mode, type 'h' and enter. You'll get
a handy list of ed commands available to you.


5) My ability/patience/time is limited. I want not to use ed.


I feel your pain. The currently available ways around
this are:

1) Shell account. If you can get shell, or command line access
to the computer that is running the mud, then you can probably
use an editor local to that computer (like vim) to edit files.
Chances are, though, that if you are a regular rank-and-file
creator, you will not be given shell access. Most system admins
consider giving random people off the net shell access
an abomination.

2) Server FTP/SFTP. The server that runs the mud might have an
ftp server or sftpd access. Again, most security-conscious sysadmins
will not permit Just Some Person Off The Internet to have this
kind of access.

3) Mud FTP. I don't like this option. Unix FTPD is a security
concern as it is. Using unsupported, un-warrantied mud network code
to provide ftp access to files seems to me to be equivalent to pulling
down your pants, bending over, and whistling for the Internet to
come visit. But...it's an option.

4) Client upload. This is actually the most sensible option, if
you are truly allergic to ed. You still need to use ed, but what
you can do is write your code in your favorite local editor, like
notepad or gvim or whatever. Then use your mud client (most of them
have an option to "send text") to send the code by running ed,
entering input mode, copying the code from your editor, and
pasting it into your client.
This is a somewhat awkward system, and ill-suited to
making minor changes. But it has the virtue of working well and
being a widely available option.

5) Suck it up. Really, you need to just get used to it. Don't
make me tell you stories about how when I was younger I had to
code using a VT terminal with no cut-and-paste, in an unheated,
locked computer lab 20'x10' in size, at 9600 bps. In a snowstorm.
Uphill both ways.



Dead Souls Homepage



! \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/www/example.html ds2.0r20b/lib/www/example.html *** ds2.0r18/lib/www/example.html Thu Feb 23 15:40:41 2006 --- ds2.0r20b/lib/www/example.html Sun Apr 9 23:48:50 2006 *************** *** 1,22 **** ! ! ! ! creation example page ! What's the QCS?
!

QCS stands for Quick Creation System. The QCS is a
series of commands and modules that lets you create stuff
easily and quickly. Before the QCS, if you wanted to make
an orc, you would edit the text file by hand, or copy
a template file and use an editor to manually change the
lines you needed to modify. This could be a tiresome
process, as the standard editor can be a bit awkward, and
making dozens of objects this way could be real torture for
beginners.

The QCS changes all of that. Rather than use an
editor to meodify files, the QCS gives you commands that
permit you to modify objects on the fly. This means that
orc creation for example could involve just the following
simple steps (please note "npc" is another word for "mob"):

create npc new_orc

modify npc name orc

modify orc short a mean-looking orc

modify orc long A typical orc: nasty, brutish, and short.

modify orc race orc

And that's it. All your modifications automatically
get written to new_orc.c (usually in your area directory),
and you now have an npc you can add to a room. Adding things
to rooms is just as easy. Creating weapons, armor, and other
objects is done the same way.

For complete details and examples, read the
QCS chapters in the Creators Manual. The QCS section starts
in chapter 31.

This is a log of the creation of some items using the Dead Souls creation system. It has
--- 1,11 ---- ! ! creation example page ! What's the QCS?
!

QCS stands for Quick Creation System. The QCS is a
series of commands and modules that lets you create stuff
easily and quickly. Before the QCS, if you wanted to make
an orc, you would edit the text file by hand, or copy
a template file and use an editor to manually change the
lines you needed to modify. This could be a tiresome
process, as the standard editor can be a bit awkward, and
making dozens of objects this way could be real torture for
beginners.

The QCS changes all of that. Rather than use an
editor to meodify files, the QCS gives you commands that
permit you to modify objects on the fly. This means that
orc creation for example could involve just the following
simple steps (please note "npc" is another word for "mob"):

create npc new_orc

modify npc name orc

modify orc short a mean-looking orc

modify orc long A typical orc: nasty, brutish, and short.

modify orc race orc

And that's it. All your modifications automatically
get written to new_orc.c (usually in your area directory),
and you now have an npc you can add to a room. Adding things
to rooms is just as easy. Creating weapons, armor, and other
objects is done the same way.

For complete details and examples, read the
QCS chapters in the Creators Manual. The QCS section starts
in chapter 31.

This is a log of the creation of some items using the Dead Souls creation system. It has
*************** *** 44,51 **** A simple table is here.
A fighter is standing here.

! //// This is the standard sample room. We're about to create a new room to the east of it.
create room east test1
--- 33,39 ---- A simple table is here.
A fighter is standing here.

! //// This is the standard sample room. We're about to create a new room to the east of it.
create room east test1
*************** *** 72,79 **** A simple table is here.
A fighter is standing here.

! //// We go into the new room and see it is a copy of the old one. Let's change the short description to avoid confusion:
modify here short Room One
--- 60,66 ---- A simple table is here.
A fighter is standing here.

! //// We go into the new room and see it is a copy of the old one. Let's change the short description to avoid confusion:
modify here short Room One
*************** *** 81,88 **** "/tmp/indent.1134436526.tmp.dat" 27 lines 515 bytes
Exit from ed.

! //// We don't need the fighter from the other room here, so we remove him from this new room's inventory.
delete fighter
--- 68,74 ---- "/tmp/indent.1134436526.tmp.dat" 27 lines 515 bytes
Exit from ed.

! //// We don't need the fighter from the other room here, so we remove him from this new room's inventory.
delete fighter
*************** *** 879,884 **** and objects quickly helps you avoid getting bogged down in mechanics when what you really want to do is build.


! Dead Souls Homepage
! ! --- 865,869 ---- and objects quickly helps you avoid getting bogged down in mechanics when what you really want to do is build.


! Dead Souls Homepage
! \ No newline at end of file diff -c -r --new-file ds2.0r18/lib/www/router.html ds2.0r20b/lib/www/router.html *** ds2.0r18/lib/www/router.html Wed Dec 31 19:00:00 1969 --- ds2.0r20b/lib/www/router.html Sun Apr 9 23:48:50 2006 *************** *** 0 **** --- 1,234 ---- + + + + Dead Souls I3 router + + + + +
+ +
+
+
+
+
+
+
The + Dead Souls + Intermud3 Router
+
+
+
This page is for folks + already using Dead Souls and modifying
+
+
+
their intermud configuration. If + this does not apply to you, please
+ return to the main site for general + information:
+
+
+
+ + Or the following FAQs:
+
+
The General FAQ  http://dead-souls.net/ds-faq.html
+
+
The Admin FAQ  http://dead-souls.net/ds-admin-faq.html
+
+
The Creator FAQ: http://dead-souls.net/ds-creator-faq.html
+
+
The Installation FAQ: http://dead-souls.net/ds-inst-faq.html
+

+
+ What is + the Dead Souls router? + It's an intermud protocol version 3
+ router which follows intermud standards ( http://intermud.org + ) and
+ was written by the + legendary Tim@TimMUD.
+
+ What is the IP and port?  + This may occasionally change. Such changes
+ will be posted here when they happen. The current port and address is:
+
+
+
IP: 149.152.218.102 +     port: 23
+
+
+
How + do I set it up?
+
+
If you're + running r18 or higher, you need do nothing.
+ If you're running r17 or r16, upgrading to r18 will
+ be enough.
+
+
+ It doesn't + work
+
+
     There are a few possible reasons for + this, mostly
+ centered around the router being paranoid about
+ security. The router resets frequently, and on that
+ reset, your mud will be authenticated. Just be patient.
+ If it's been more than a day or so, email me at
+ <my name here>@users.sourceforge.net
+

+
+ What's the + point of a new router? Who died and made you intermud king?
+
+     On the morning of 27 March 2006, the intermud.org i3 + router stopped
+ functioning. There had been some talk on the dead_souls channel of how
+ unreliable the i3 router was, and how we should make our own,
+ etc, yakety schmakety.
+     March 27th was the last straw. For Dead Souls + developers, the
+ dead_souls intermud channel was a vital resource for development + discussion
+ and support. After being down for 24 hours, I decided it was time to
+ implement a router that the Dead Souls muds could count on.
+
+
+ Why did + you change it from port 25 to port 23?
+
+     During testing, it was discovered that some ISP's + and hosting services block
+ outbound connections to port 25, presumably for anti-spam reasons. Since
+ port 23 is very often open for outbound connections, and it is rarely
+ spam-firewalled, it seemed like a good choice. It's not like we were + doing
+ anything else with it.
+
+
+ Isn't a + low port a security risk?
+
+     It's not running the way you think.
+
+
+ Hey, XYZ + is broken and ABC works only half the time
+
+     For crying out loud, email me and tell me. I need to + know. I'm still
+ in the early stages of customizing and troubleshooting, so I need all + the
+ bug reports I can get. Please email me at <my name + here>@users.sourceforge.net
+
+
+ There are a + bunch of non-active muds on the mudlist.
+

+     This is a known bug. I'm working on tightening up
+ the mudlist update code.
+

+
+ Is this + router actually any more stable? What's the uptime?
+
+     It looks like there's good potential for this
+ router to be just as stable as the old *gjs, if not
+ more so. The biggest danger comes from the fact that
+ it's running on a computer on the campus of a university
+ I went to 15 years ago, so some bored network admin
+ might notice it and pull the plug. Should that ever
+ happen, the new IP will be posted here.
+
+     The most likely thing to happen is that the machine
+ it's on could lose power, despite being on UPS. If
+ this happens, channel communication will be limited
+ until someone emails me and tells me I need to
+ reload channels. On the todo list is a plan to make
+ channel data persist across server resets.
+
+     In general, however, about every other day or
+  every third day I notice that *gjs is down or has
+ been down for a couple of hours, and our new router
+ is still going strong.
+
+
+ You should + integrate your router with *gjs and enable failover
+
+     I will, just as soon as you send me the network code
+ to do it. Until then, this is what you get.
+
+
+ How does + the router work?
+
+     Tim@TimMUD wrote a swell LPC based router that is
+ basically a bunch of .h files you put into a TMI-2
+ mud. You tinker with the settings a bit, and your TMI-2
+ mud becomes an intermud router.
+     I got rather medieval on his code and shoehorned it
+ into Dead Souls. It's a testament to Tim's skill that
+ my crude fumblings were able to get the thing ported
+ and working.
+
+
+ Is router + code part of Dead Souls?
+
+ With Tim's blessing I've included his I3 router
+ in the Dead Souls distribution, after removing/replacing
+ some non-Tim code. This means that any Dead Souls
+ mud can serve as a router, should it wish to
+ establish its own private intermud network. Eventually
+ these individual routers may be part of a failover
+ network, but there are no firm plans for this in place.
+
+
+ How do I + become my own I3 router?
+
+ Read the code in /secure/daemon/i3router. Understand it.
+ Then modify it to suit you. I won't be posting step-
+ by-step instructions on how to do this, because I believe
+ this is one of those things that you really need to
+ figure out on your own. If you can't figure it out
+ by reading the code, I argue you have no business
+ running the router.
+
+
+ - Cratylus
+
+
+
+
+
+
More technical docs:
+ Creator FAQ             + Debugging FAQ         + Editor Tutorial     +   +   The Quick Creation System         +

+
+
+
+
+
+
+
+
+
+ + diff -c -r --new-file ds2.0r18/v22.2b14/contrib.c ds2.0r20b/v22.2b14/contrib.c *** ds2.0r18/v22.2b14/contrib.c Sun Nov 6 01:49:42 2005 --- ds2.0r20b/v22.2b14/contrib.c Wed Dec 31 19:00:00 1969 *************** *** 1,1944 **** - #define SUPPRESS_COMPILER_INLINES - #ifdef LATTICE - #include "/lpc_incl.h" - #include "/comm.h" - #include "/file_incl.h" - #include "/file.h" - #include "/backend.h" - #include "/swap.h" - #include "/compiler.h" - #include "/main.h" - #include "/eoperators.h" - #include "/simul_efun.h" - #include "/add_action.h" - #else - #include "../lpc_incl.h" - #include "../comm.h" - #include "../file_incl.h" - #include "../file.h" - #include "../backend.h" - #include "../swap.h" - #include "../compiler.h" - #include "../main.h" - #include "../eoperators.h" - #include "../efun_protos.h" - #include "../simul_efun.h" - #include "../add_action.h" - #endif - - /* should be done in configure */ - #ifdef WIN32 - #define strcasecmp(X, Y) stricmp(X, Y) - #endif - - /* - * This differs from the livings() efun in that this efun only returns - * objects which have had set_living_name() called as well as - * enable_commands(). The other major difference is that this is - * substantially faster. - */ - #ifdef F_NAMED_LIVINGS - void f_named_livings() { - int i; - int nob; - #ifdef F_SET_HIDE - int apply_valid_hide, display_hidden = 0; - #endif - object_t *ob, **obtab; - array_t *vec; - - nob = 0; - #ifdef F_SET_HIDE - apply_valid_hide = 1; - #endif - - obtab = CALLOCATE(max_array_size, object_t *, TAG_TEMPORARY, "named_livings"); - - for (i = 0; i < CFG_LIVING_HASH_SIZE; i++) { - for (ob = hashed_living[i]; ob; ob = ob->next_hashed_living) { - if (!(ob->flags & O_ENABLE_COMMANDS)) - continue; - #ifdef F_SET_HIDE - if (ob->flags & O_HIDDEN) { - if (apply_valid_hide) { - apply_valid_hide = 0; - display_hidden = valid_hide(current_object); - } - if (!display_hidden) - continue; - } - #endif - if (nob == max_array_size) - break; - obtab[nob++] = ob; - } - } - - vec = allocate_empty_array(nob); - while (--nob >= 0) { - vec->item[nob].type = T_OBJECT; - vec->item[nob].u.ob = obtab[nob]; - add_ref(obtab[nob], "livings"); - } - - FREE(obtab); - - push_refed_array(vec); - } - #endif - - /* I forgot who wrote this, please claim it :) */ - #ifdef F_REMOVE_SHADOW - void - f_remove_shadow PROT((void)) - { - object_t *ob; - - ob = current_object; - if (st_num_arg) { - ob = sp->u.ob; - pop_stack(); - } - if (ob == 0 || (ob->shadowing == 0 && ob->shadowed == 0)) - push_number(0); - else { - if (ob->shadowed) - ob->shadowed->shadowing = ob->shadowing; - if (ob->shadowing) - ob->shadowing->shadowed = ob->shadowed; - ob->shadowing = ob->shadowed = 0; - push_number(1); - } - } - #endif - - /* This was originally written my Malic for Demon. I rewrote parts of it - when I added it (added function support, etc) -Beek */ - #ifdef F_QUERY_NOTIFY_FAIL - void - f_query_notify_fail PROT((void)) { - char *p; - - if (command_giver && command_giver->interactive) { - if (command_giver->interactive->iflags & NOTIFY_FAIL_FUNC) { - push_funp(command_giver->interactive->default_err_message.f); - return; - } else if ((p = command_giver->interactive->default_err_message.s)) { - STACK_INC; - sp->type = T_STRING; - sp->subtype = STRING_SHARED; - sp->u.string = p; - ref_string(p); - return; - } - } - push_number(0); - } - #endif - - /* Beek again */ - #ifdef F_STORE_VARIABLE - void - f_store_variable PROT((void)) { - int idx; - svalue_t *sv; - unsigned short type; - - idx = find_global_variable(current_object->prog, (sp-1)->u.string, &type, 0); - if (idx == -1) - error("No variable named '%s'!\n", (sp-1)->u.string); - sv = ¤t_object->variables[idx]; - free_svalue(sv, "f_store_variable"); - *sv = *sp--; - free_string_svalue(sp--); - } - #endif - - #ifdef F_FETCH_VARIABLE - void - f_fetch_variable PROT((void)) { - int idx; - svalue_t *sv; - unsigned short type; - - idx = find_global_variable(current_object->prog, sp->u.string, &type, 0); - if (idx == -1) - error("No variable named '%s'!\n", sp->u.string); - sv = ¤t_object->variables[idx]; - free_string_svalue(sp--); - push_svalue(sv); - } - #endif - - /* Beek */ - #ifdef F_SET_PROMPT - void - f_set_prompt PROT((void)) { - object_t *who; - if (st_num_arg == 2) { - who = sp->u.ob; - pop_stack(); - } else who = command_giver; - - if (!who || who->flags & O_DESTRUCTED || !who->interactive) - error("Prompts can only be set for interactives.\n"); - - /* Future work */ - /* ed() will nuke this; also we have to make sure the string will get - * freed */ - } - #endif - - /* Gudu@VR wrote copy_array() and copy_mapping() which this is heavily - * based on. I made it into a general copy() efun which incorporates - * both. -Beek - */ - #ifdef F_COPY - static int depth; - - static void deep_copy_svalue PROT((svalue_t *, svalue_t *)); - - static array_t *deep_copy_array P1( array_t *, arg ) { - array_t *vec; - int i; - - vec = allocate_empty_array(arg->size); - for (i = 0; i < arg->size; i++) - deep_copy_svalue(&arg->item[i], &vec->item[i]); - - return vec; - } - - static array_t *deep_copy_class P1(array_t *, arg) { - array_t *vec; - int i; - - vec = allocate_empty_class_by_size(arg->size); - for (i = 0; i < arg->size; i++) - deep_copy_svalue(&arg->item[i], &vec->item[i]); - - return vec; - } - - static int doCopy P3( mapping_t *, map, mapping_node_t *, elt, mapping_t *, dest) { - svalue_t *sv; - - sv = find_for_insert(dest, &elt->values[0], 1); - if (!sv) { - mapping_too_large(); - return 1; - } - - deep_copy_svalue(&elt->values[1], sv); - return 0; - } - - static mapping_t *deep_copy_mapping P1( mapping_t *, arg ) { - mapping_t *map; - - map = allocate_mapping( 0 ); /* this should be fixed. -Beek */ - mapTraverse( arg, (int (*)()) doCopy, map); /* Not horridly efficient either */ - return map; - } - - static void deep_copy_svalue P2(svalue_t *, from, svalue_t *, to) { - switch (from->type) { - case T_ARRAY: - depth++; - if (depth > MAX_SAVE_SVALUE_DEPTH) { - depth = 0; - error("Mappings, arrays and/or classes nested too deep (%d) for copy()\n", - MAX_SAVE_SVALUE_DEPTH); - } - *to = *from; - to->u.arr = deep_copy_array( from->u.arr ); - depth--; - break; - case T_CLASS: - depth++; - if (depth > MAX_SAVE_SVALUE_DEPTH) { - depth = 0; - error("Mappings, arrays and/or classes nested too deep (%d) for copy()\n", - MAX_SAVE_SVALUE_DEPTH); - } - *to = *from; - to->u.arr = deep_copy_class( from->u.arr ); - depth--; - break; - case T_MAPPING: - depth++; - if (depth > MAX_SAVE_SVALUE_DEPTH) { - depth = 0; - error("Mappings, arrays and/or classes nested too deep (%d) for copy()\n", - MAX_SAVE_SVALUE_DEPTH); - } - *to = *from; - to->u.map = deep_copy_mapping( from->u.map ); - depth--; - break; - #ifndef NO_BUFFER_TYPE - case T_BUFFER: - *to = *from; - to->u.buf = allocate_buffer(from->u.buf->size); - memcpy(to->u.buf->item, to->u.buf->item, from->u.buf->size); - break; - #endif - default: - assign_svalue_no_free( to, from ); - } - } - - void f_copy PROT((void)) - { - svalue_t ret; - - depth = 0; - deep_copy_svalue(sp, &ret); - free_svalue(sp, "f_copy"); - *sp = ret; - } - #endif - - /* Gudu@VR */ - /* flag and extra info by Beek */ - #ifdef F_FUNCTIONS - void f_functions PROT((void)) { - int i, j, num, index; - array_t *vec, *subvec; - function_t *funp; - program_t *prog; - int flag = (sp--)->u.number; - unsigned short *types; - char buf[256]; - char *end = EndOf(buf); - program_t *progp; - - if (sp->u.ob->flags & O_SWAPPED) - load_ob_from_swap(sp->u.ob); - - progp = sp->u.ob->prog; - num = progp->num_functions_defined + progp->last_inherited; - if (progp->num_functions_defined && - progp->function_table[progp->num_functions_defined-1].name[0] - == APPLY___INIT_SPECIAL_CHAR) - num--; - - vec = allocate_empty_array(num); - i = num; - - while (i--) { - unsigned short low, high, mid; - - prog = sp->u.ob->prog; - index = i; - - /* Walk up the inheritance tree to the real definition */ - if (prog->function_flags[index] & FUNC_ALIAS) { - index = prog->function_flags[index] & ~FUNC_ALIAS; - } - - while (prog->function_flags[index] & FUNC_INHERITED) { - low = 0; - high = prog->num_inherited -1; - - while (high > low) { - mid = (low + high + 1) >> 1; - if (prog->inherit[mid].function_index_offset > index) - high = mid -1; - else low = mid; - } - index -= prog->inherit[low].function_index_offset; - prog = prog->inherit[low].prog; - } - - index -= prog->last_inherited; - - funp = prog->function_table + index; - - if (flag) { - if (prog->type_start && prog->type_start[index] != INDEX_START_NONE) - types = &prog->argument_types[prog->type_start[index]]; - else - types = 0; - - vec->item[i].type = T_ARRAY; - subvec = vec->item[i].u.arr = allocate_empty_array(3 + funp->num_arg); - - subvec->item[0].type = T_STRING; - subvec->item[0].subtype = STRING_SHARED; - subvec->item[0].u.string = ref_string(funp->name); - - subvec->item[1].type = T_NUMBER; - subvec->item[1].subtype = 0; - subvec->item[1].u.number = funp->num_arg; - - get_type_name(buf, end, funp->type); - subvec->item[2].type = T_STRING; - subvec->item[2].subtype = STRING_SHARED; - subvec->item[2].u.string = make_shared_string(buf); - - for (j = 0; j < funp->num_arg; j++) { - if (types) { - get_type_name(buf, end, types[j]); - subvec->item[3 + j].type = T_STRING; - subvec->item[3 + j].subtype = STRING_SHARED; - subvec->item[3 + j].u.string = make_shared_string(buf); - } else { - subvec->item[3 + j].type = T_NUMBER; - subvec->item[3 + j].u.number = 0; - } - } - } else { - vec->item[i].type = T_STRING; - vec->item[i].subtype = STRING_SHARED; - vec->item[i].u.string = ref_string(funp->name); - } - } - - pop_stack(); - push_refed_array(vec); - } - #endif - - /* Beek */ - #ifdef F_VARIABLES - static void fv_recurse P5(array_t *, arr, int *, idx, program_t *, prog, int, type, int, flag) { - int i; - array_t *subarr; - char buf[256]; - char *end = EndOf(buf); - - for (i = 0; i < prog->num_inherited; i++) { - fv_recurse(arr, idx, prog->inherit[i].prog, - type | prog->inherit[i].type_mod, flag); - } - for (i = 0; i < prog->num_variables_defined; i++) { - if (flag) { - arr->item[*idx + i].type = T_ARRAY; - subarr = arr->item[*idx + i].u.arr = allocate_empty_array(2); - subarr->item[0].type = T_STRING; - subarr->item[0].subtype = STRING_SHARED; - subarr->item[0].u.string = ref_string(prog->variable_table[i]); - get_type_name(buf, end, prog->variable_types[i]); - subarr->item[1].type = T_STRING; - subarr->item[1].subtype = STRING_SHARED; - subarr->item[1].u.string = make_shared_string(buf); - } else { - arr->item[*idx + i].type = T_STRING; - arr->item[*idx + i].subtype = STRING_SHARED; - arr->item[*idx + i].u.string = ref_string(prog->variable_table[i]); - } - } - *idx += prog->num_variables_defined; - } - - void f_variables PROT((void)) { - int idx = 0; - array_t *arr; - int flag = (sp--)->u.number; - program_t *prog = sp->u.ob->prog; - - if (sp->u.ob->flags & O_SWAPPED) - load_ob_from_swap(sp->u.ob); - - arr = allocate_empty_array(prog->num_variables_total); - fv_recurse(arr, &idx, prog, 0, flag); - - pop_stack(); - push_refed_array(arr); - } - #endif - - /* also Beek */ - #ifdef F_HEART_BEATS - void f_heart_beats PROT((void)) { - push_refed_array(get_heart_beats()); - } - #endif - - /*Aleas@Nightmare */ - #ifdef F_TERMINAL_COLOUR - /* A fast implementation of the Nightmare color support. - - [Ed note: These codes were actually used on Discworld - before Nightmare] - - Rewritten several times, since Beek wants it to be - perfect :) - - Takes a string and a mapping as args. The string is - exploded using "%^" as delimiter, then all keys of - the mapping found in the resulting array are replaced - by their values. Afterwards a string imploded from - the array is returned. - - No actual string copying is done except for the - creation of the final string and a temporary copy of - the input string to avoid destruction of shared - input strings. An array of pointers to the segments - of the string is compared against the mapping keys - and replaced with a pointer to the value belonging to - that key where matches are found. - - After the replacement pass the result string is created - from the pointer array. - - Further speed is gained by the fact that no parsing is - done if the input string does not contain any "%^" - delimiter sequence. - - by Aleas@Nightmare, dec-94 */ - - /* number of input string segments, if more, it still works, but a - _slow_ realloc is required */ - #define NSTRSEGS 32 - #define TC_FIRST_CHAR '%' - #define TC_SECOND_CHAR '^' - - static int at_end(int i, int imax, int z, int *lens) { - if (z + 1 != lens[i]) - return 0; - for (i++; i < imax; i++) { - if (lens[i] > 0) - return 0; - } - return 1; - } - - void - f_terminal_colour PROT((void)) - { - char *instr, *cp, *savestr, *deststr, **parts; - int num, i, j, k, col, start, space, *lens, maybe_at_end; - int space_garbage = 0; - mapping_node_t *elt, **mtab; - int buflen, max_buflen, space_buflen; - int wrap = 0; - int indent = 0; - - if (st_num_arg >= 3) { - if (st_num_arg == 4) - indent = (sp--)->u.number; - wrap = (sp--)->u.number; - if (wrap < 2 && wrap != 0) wrap = 2; - if (indent < 0 || indent >= wrap - 1) - indent = wrap - 2; - } - - cp = instr = (sp-1)->u.string; - do { - cp = strchr(cp, TC_FIRST_CHAR); - if (cp) - { - if (cp[1] == TC_SECOND_CHAR) - { - savestr = string_copy(instr, "f_terminal_colour"); - cp = savestr + ( cp - instr ); - instr = savestr; - break; - } - cp++; - } - } while (cp); - if (cp == NULL) { - if (wrap) { - num = 1; - parts = CALLOCATE(1, char *, TAG_TEMPORARY, "f_terminal_colour: parts"); - parts[0] = instr; - savestr = 0; - } else { - pop_stack(); /* no delimiter in string, so return the original */ - return; - } - } else { - /* here we have something to parse */ - - parts = CALLOCATE(NSTRSEGS, char *, TAG_TEMPORARY, "f_terminal_colour: parts"); - if (cp - instr) { /* starting seg, if not delimiter */ - num = 1; - parts[0] = instr; - *cp = 0; - } else - num = 0; - while (cp) { - cp += 2; - instr = cp; - do { - cp = strchr(cp,TC_FIRST_CHAR); - if (cp) { - if (cp[1] == TC_SECOND_CHAR) - break; - cp++; - } - } while (cp); - if (cp) { - *cp = 0; - if (cp > instr) { - if (num && num % NSTRSEGS == 0) { - parts = RESIZE(parts, num + NSTRSEGS, char *, - TAG_TEMPORARY, "f_terminal_colour: parts realloc"); - } - parts[num++] = instr; - } - } - } - if (*instr) { /* trailing seg, if not delimiter */ - if (num && num % NSTRSEGS == 0) { - parts = RESIZE(parts, num + NSTRSEGS, char *, - TAG_TEMPORARY, "f_terminal_colour: parts realloc"); - } - parts[num++] = instr; - } - } - - if (num == 0) { - /* string consists entirely of %^'s */ - FREE(parts); - if (savestr) - FREE_MSTR(savestr); - pop_stack(); - free_string_svalue(sp); - sp->type = T_STRING; - sp->subtype = STRING_CONSTANT; - sp->u.string = ""; - return; - } - - /* Could keep track of the lens as we create parts, removing the need - for a strlen() below */ - lens = CALLOCATE(num, int, TAG_TEMPORARY, "f_terminal_colour: lens"); - mtab = sp->u.map->table; - - /* Do the the pointer replacement and calculate the lengths */ - col = 0; - start = -1; - space = 0; - maybe_at_end = 0; - buflen = max_buflen = space_buflen = 0; - for (j = i = 0, k = sp->u.map->table_size; i < num; i++) { - if ((cp = findstring(parts[i]))) { - int tmp = MAP_POINTER_HASH(cp); - for (elt = mtab[tmp & k]; elt; elt = elt->next) - if ( elt->values->type == T_STRING && - (elt->values + 1)->type == T_STRING && - cp == elt->values->u.string) { - parts[i] = (elt->values + 1)->u.string; - /* Negative indicates don't count for wrapping */ - lens[i] = SVALUE_STRLEN(elt->values + 1); - if (wrap) lens[i] = -lens[i]; - break; - } - if (!elt) - lens[i] = SHARED_STRLEN(cp); - } else { - lens[i] = strlen(parts[i]); - } - - if (lens[i] <= 0) { - if (j + -lens[i] > max_string_length) - lens[i] = -(-(lens[i]) - (j + -lens[i] - max_string_length)); - j += -lens[i]; - buflen += -lens[i]; - continue; - } - - if (maybe_at_end) { - if (j + indent > max_string_length) { - /* this string no longer counts, so we are still in - a maybe_at_end condition. This means we will end - up truncating the rest of the fragments too, since - the indent will never fit. */ - lens[i] = 0; - } else { - j += indent; - col += indent; - maybe_at_end = 0; - } - } - - j += lens[i]; - if (j > max_string_length) { - lens[i] -= j - max_string_length; - j = max_string_length; - } - - if (wrap) { - int z; - char *p = parts[i]; - for (z = 0; z < lens[i]; z++) { - char c = p[z]; - buflen++; - if (c == '\n') { - col = 0; - space = space_buflen = 0; - start = -1; - max_buflen = (buflen > max_buflen ? buflen : max_buflen); - buflen = 0; - } else { - if (col > start || (c != ' ' && c != '\t')) - col++; - else { - j--; - buflen--; - } - - if (col > start && c == '\t') - col += (8 - ((col - 1) % 8)); - if (c == ' ' || c == '\t') { - space = col; - space_buflen = buflen; - } - if (col == wrap+1) { - if (space) { - col -= space; - space = 0; - max_buflen = (buflen > max_buflen ? buflen : max_buflen); - buflen -= space_buflen; - space_buflen = 0; - } else { - j++; - col = 1; - max_buflen = (buflen > max_buflen ? buflen : max_buflen); - buflen = 1; - } - start = indent; - } else - continue; - } - - /* If we get here, we ended a line by wrapping */ - if (z + 1 != lens[i] || col) { - j += indent; - col += indent; - } else - maybe_at_end = 1; - - if (j > max_string_length) { - lens[i] -= (j - max_string_length); - j = max_string_length; - if (lens[i] < z) { - /* must have been ok or we wouldn't be here */ - lens[i] = z; - break; - } - } - } - } - } - - if (wrap && buflen > max_buflen) - max_buflen = buflen; - - /* now we have the final string in parts and length in j. - let's compose it, wrapping if necessary */ - cp = deststr = new_string(j, "f_terminal_colour: deststr"); - if (wrap) { - char *tmp = new_string(max_buflen, "f_terminal_colour: wrap"); - char *pt = tmp; - - col = 0; - start = -1; - space = 0; - buflen = space_buflen = 0; - for (i = 0; i < num; i++) { - int kind; - char *p = parts[i]; - if (lens[i] < 0) { - memcpy(pt, p, -lens[i]); - pt += -lens[i]; - buflen += -lens[i]; - space_garbage += -lens[i]; /* Number of chars due to ignored junk - since last space */ - continue; - } - for (k = 0; k < lens[i]; k++) { - int n; - char c = p[k]; - *pt++ = c; - buflen++; - if (c == '\n') { - col = 0; - kind = 0; - space = space_garbage = 0; - start = -1; - buflen = 0; - } else { - if (col > start || (c != ' ' && c != '\t')) - col++; - else { - pt--; - buflen--; - } - - if (col > start && c == '\t') - col += (8 - ((col - 1) % 8)); - if (c == ' ' || c == '\t') { - space = col; - space_garbage = 0; - space_buflen = buflen; - } - if (col == wrap+1) { - if (space) { - col -= space; - space = 0; - kind = 1; - buflen -= space_buflen; - space_buflen = 0; - } else { - col = 1; - kind = 2; - buflen = 1; - } - start = indent; - } else - continue; - } - /* If we get here, we ended a line */ - n = (pt - tmp) - buflen; - memcpy(cp, tmp, n); - cp += n; - if (kind == 1) { - /* replace the space */ - cp[-1] = '\n'; - } - if (kind == 2) { - /* need to insert a newline */ - *cp++ = '\n'; - } - memmove(tmp, tmp + n, buflen); - pt = tmp + buflen; - if (col || !at_end(i, num, k, lens)) { - memset(cp, ' ', indent); - cp += indent; - col += indent; - } - } - } - memcpy(cp, tmp, pt - tmp); - cp += pt - tmp; - FREE_MSTR(tmp); - } else { - for (i = 0; i < num; i++) { - memcpy(cp, parts[i], lens[i]); - cp += lens[i]; - } - } - *cp = 0; - FREE(lens); - FREE(parts); - if (savestr) - FREE_MSTR(savestr); - /* now we have what we want */ - pop_stack(); - #ifdef DEBUG - if (cp - deststr != j) { - fatal("Length miscalculated in terminal_colour()\n Expected: %i Was: %i\n String: %s\n Indent: %i Wrap: %i\n", j, cp - deststr, sp->u.string, indent, wrap); - } - #endif - free_string_svalue(sp); - sp->type = T_STRING; - sp->subtype = STRING_MALLOC; - sp->u.string = deststr; - } - #endif - - #ifdef F_PLURALIZE - - #define PLURAL_SUFFIX 1 - #define PLURAL_SAME 2 - /* number to chop is added */ - #define PLURAL_CHOP 2 - - static char *pluralize P1(char *, str) { - char *pre, *rel, *end; - char *p, *of_buf; - int of_len = 0, plen, slen; - int sz; - - /* default rule */ - int found = 0; - char *suffix = "s"; - - sz = strlen(str); - if (sz == 0) return 0; - - /* if it is of the form 'X of Y', pluralize the 'X' part */ - if ((p = strstr(str, " of "))) { - of_buf = alloc_cstring(p, "pluralize: of"); - of_len = strlen(of_buf); - sz = p - str; - } - - /* - * first, get rid of determiners. pluralized forms never have them ;) - * They can have 'the' so don't remove that - */ - if (str[0] == 'a' || str[0] == 'A') { - if (str[1] == ' ') { - plen = sz - 2; - pre = DXALLOC(plen + 1, TAG_TEMPORARY, "pluralize: pre"); - strncpy(pre, str + 2, plen); - } else if (str[1] == 'n' && str[2] == ' ') { - plen = sz - 3; - pre = DXALLOC(plen + 1, TAG_TEMPORARY, "pluralize: pre"); - strncpy(pre, str + 3, plen); - } else { - plen = sz; - pre = DXALLOC(plen + 1, TAG_TEMPORARY, "pluralize: pre"); - strncpy(pre, str, plen); - } - } else { - plen = sz; - pre = DXALLOC(plen + 1, TAG_TEMPORARY, "pluralize: pre"); - strncpy(pre, str, plen); - } - pre[plen] = 0; - - /* - * only pluralize the last word, ie: lose adjectives. - */ - if ((p = strrchr(pre, ' '))) - rel = p + 1; - else - rel = pre; - - end = rel + strlen(rel); - - /* - * trap the exceptions to the rules below and special cases. - * - * Hmm, maybe this should be a prebuilt hash table to make maintenance - * a bit easier. Possibly gperf based; or is that overkill? :-) - */ - switch (rel[0]) { - case 'A': - case 'a': - if (!strcasecmp(rel + 1, "re")) { - found = PLURAL_CHOP + 3; - suffix = "is"; - } - break; - case 'B': - case 'b': - if (!strcasecmp(rel + 1, "us")) { - found = PLURAL_SUFFIX; - suffix = "es"; - } else - if (!strcasecmp(rel + 1, "onus")) { - found = PLURAL_SUFFIX; - suffix = "es"; - } - break; - case 'C': - case 'c': - if (!strcasecmp(rel + 1, "hild")) { - found = PLURAL_SUFFIX; - suffix = "ren"; - } - break; - case 'D': - case 'd': - if (!strcasecmp(rel + 1, "datum")) { - found = PLURAL_CHOP + 2; - suffix = "a"; - } else - if (!strcasecmp(rel + 1, "ie")) { - found = PLURAL_CHOP + 1; - suffix = "ce"; - } else - if (!strcasecmp(rel + 1, "eer")) { - found = PLURAL_SAME; - } else - if (!strcasecmp(rel + 1, "o")) { - found = PLURAL_SUFFIX; - suffix = "es"; - } else - if (!strcasecmp(rel + 1, "ynamo")) - found = PLURAL_SUFFIX; - break; - case 'F': - case 'f': - if (!strcasecmp(rel + 1, "oot")) { - found = PLURAL_CHOP + 3; - suffix = "eet"; - break; - } - if (!strcasecmp(rel + 1, "ish")) { - found = PLURAL_SAME; - break; - } - if (!strcasecmp(rel + 1, "forum")) { - found = PLURAL_CHOP + 2; - suffix = "a"; - break; - } - if (!strcasecmp(rel + 1, "ife")) - found = PLURAL_SUFFIX; - break; - case 'G': - case 'g': - if (!strcasecmp(rel + 1, "oose")) { - found = PLURAL_CHOP + 4; - suffix = "eese"; - } else - if (!strcasecmp(rel + 1, "o")) { - found = PLURAL_SUFFIX; - suffix = "es"; - } else - if (!strcasecmp(rel + 1, "um")) { - found = PLURAL_SUFFIX; - } - break; - case 'H': - case 'h': - if (!strcasecmp(rel + 1, "uman")) - found = PLURAL_SUFFIX; - else if (!strcasecmp(rel + 1, "ave")) { - found = PLURAL_CHOP + 2; - suffix = "s"; - } - break; - case 'I': - case 'i': - if (!strcasecmp(rel + 1, "ndex")) { - found = PLURAL_CHOP + 2; - suffix = "ices"; - } - break; - case 'L': - case 'l': - if (!strcasecmp(rel + 1, "ouse")) { - found = PLURAL_CHOP + 4; - suffix = "ice"; - } - if (!strcasecmp(rel + 1, "otus")) { - found = PLURAL_SUFFIX; - break; - } - break; - case 'M': - case 'm': - if (!strcasecmp(rel + 1, "ackerel")) { - found = PLURAL_SAME; - break; - } - if (!strcasecmp(rel + 1, "oose")) { - found = PLURAL_SAME; - break; - } - if (!strcasecmp(rel + 1, "ouse")) { - found = PLURAL_CHOP + 4; - suffix = "ice"; - break; - } - if (!strcasecmp(rel + 1, "atrix")) { - found = PLURAL_CHOP + 1; - suffix = "ces"; - } - break; - case 'O': - case 'o': - if (!strcasecmp(rel + 1, "x")) { - found = PLURAL_SUFFIX; - suffix = "en"; - } - break; - case 'P': - case 'p': - if (!strcasecmp(rel + 1, "ants")) - found = PLURAL_SAME; - break; - case 'R': - case 'r': - if (!strcasecmp(rel + 1, "oof")) { - found = PLURAL_SUFFIX; - break; - } - if (!strcasecmp(rel + 1, "emains")) { - found = PLURAL_SAME; - break; - } - case 'S': - case 's': - if (!strcasecmp(rel + 1, "niff")) { - found = PLURAL_SUFFIX; - break; - } - if (!strcasecmp(rel + 1, "heep")) { - found = PLURAL_SAME; - break; - } - if (!strcasecmp(rel + 1, "phinx")) { - found = PLURAL_CHOP + 1; - suffix = "ges"; - break; - } - if (!strcasecmp(rel + 1, "taff")) { - found = PLURAL_CHOP + 2; - suffix = "ves"; - break; - } - if (!strcasecmp(rel + 1, "afe")) { - found = PLURAL_SUFFIX; - break; - } - if (!strcasecmp(rel + 1, "haman")) - found = PLURAL_SUFFIX; - break; - case 'T': - case 't': - if (!strcasecmp(rel + 1, "hief")) { - found = PLURAL_CHOP + 1; - suffix = "ves"; - break; - } - if (!strcasecmp(rel + 1, "ooth")) { - found = PLURAL_CHOP + 4; - suffix = "eeth"; - } - break; - case 'V': - case 'v': - if (!strcasecmp(rel + 1, "ax")) { - found = PLURAL_SUFFIX; - suffix = "en"; - } - if (!strcasecmp(rel + 1, "irus")) { - found = PLURAL_SUFFIX; - suffix = "es"; - } - break; - case 'W': - case 'w': - if (!strcasecmp(rel + 1, "as")) { - found = PLURAL_CHOP + 2; - suffix = "ere"; - } - break; - } - /* - * now handle "rules" ... god I hate english!! - */ - /* - * *x -> *xes (fox -> foxes) - * *s -> *ses (pass -> passes) - * *ch -> *ches (church -> churches) - * *sh -> *shes (brush -> brushes) - */ - /* - * *fe -> *ves (knife -> knives) - */ - /* - * *f -> *ves (half -> halves) - * *ef -> *efs (chef -> chefs) (really a rule for a special case) - */ - /* - * *y -> *ies (gumby -> gumbies) - */ - /* - * *us -> *i (cactus -> cacti) - */ - /* - * *man -> *men (foreman -> foremen) - */ - /* - * *is -> *es (this is from gordons pluralize ... ) - */ - /* - * *o -> *s (also from gordon) - */ - - /* don't have to set found to PLURAL_SUFFIX in these rules b/c - found == 0 is interpreted as PLURAL_SUFFIX */ - if (!found) - switch (end[-1]) { - case 'E': case 'e': - if (end[-2] == 'f' || end[-2] == 'F') { - found = PLURAL_CHOP + 2; - suffix = "ves"; - } - break; - case 'F': case 'f': - if (end[-2] == 'e' || end[-2] == 'E') - break; - if (end[-2] == 'f' || end[-2] == 'F') - found = PLURAL_CHOP + 2; - else - found = PLURAL_CHOP + 1; - suffix = "ves"; - break; - case 'H': case 'h': - if (end[-2] == 'c' || end[-2]=='s') - suffix = "es"; - break; - #if 0 - /* - * This rule is causing more problems than not. As such, I'm removing - * it in favour of adding exceptions for words above that should use - * this rule. I'm aware that this rule is proper for Latin derived - * English words, however its use has fallen out of common speech and - * writing for the majority of cases. Currently known common exceptions - * are forum (fora) and datum (data). - * -- Marius, 23-Jun-2000 - */ - case 'M': case 'm': - if (end[-2] == 'u') { - found = PLURAL_CHOP + 2; - suffix = "a"; - } - break; - #endif - case 'N': case 'n': - if (end[-2] == 'a' && end[-3] == 'm') { - found = PLURAL_CHOP + 3; - suffix = "men"; - } - break; - case 'O': case 'o': - if (end[-2] != 'o') - suffix = "es"; - break; - case 'S': case 's': - if (end[-2] == 'i') { - found = PLURAL_CHOP + 2; - suffix = "es"; - break; - } - if (end[-2] == 'u') { - found = PLURAL_CHOP + 2; - suffix = "i"; - break; - } - if (end[-2] == 'a' || end[-2] == 'e' || end[-2] == 'o') - suffix = "ses"; - else - suffix = "es"; - break; - case 'X': case 'x': - suffix = "es"; - break; - case 'Y': case 'y': - if (end[-2] != 'a' && end[-2] != 'e' && end[-2] != 'i' - && end[-2] != 'o' && end[-2] != 'u') { - found = PLURAL_CHOP + 1; - suffix = "ies"; - } - break; - case 'Z': case 'z': - if (end[-2] == 'a' || end[-2] == 'e' || end[-2] == 'o' - || end[-2] == 'i' || end[-2] == 'u') - suffix = "zes"; - else - suffix = "es"; - } - - switch (found) { - case PLURAL_SAME: - slen = 0; - sz = plen + of_len; - break; - default: - plen -= (found - PLURAL_CHOP); - /* fallthrough */ - case 0: - case PLURAL_SUFFIX: - slen = strlen(suffix); - sz = plen + slen + of_len; - break; - } - - p = new_string(sz, "pluralize"); - p[sz] = 0; - - strncpy(p, pre, plen); - if (slen) - strncpy(p + plen, suffix, slen); - if (of_len) { - strcpy(p + plen + slen, of_buf); - FREE(of_buf); - } - - FREE(pre); - return p; - } /* end of pluralize() */ - - void - f_pluralize PROT((void)) - { - char *s; - - s = pluralize(sp->u.string); - pop_stack(); - if (!s) - push_number(0); - else - push_malloced_string(s); - } - #endif - - #ifdef F_FILE_LENGTH - /* - * file_length() efun, returns the number of lines in a file. - * Returns -1 if no privs or file doesn't exist. - */ - static int file_length P1(char *, file) - { - struct stat st; - FILE *f; - int ret = 0; - int num; - char buf[2049]; - char *p, *newp; - - file = check_valid_path(file, current_object, "file_size", 0); - - if (!file) return -1; - if (stat(file, &st) == -1) - return -1; - if (st.st_mode & S_IFDIR) - return -2; - if (!(f = fopen(file, "r"))) - return -1; - - do { - num = fread(buf, 1, 2048, f); - p = buf - 1; - while ((newp = memchr(p + 1, '\n', num))) { - num -= (newp - p); - p = newp; - ret++; - } - } while (!feof(f)); - - fclose(f); - return ret; - } /* end of file_length() */ - - void - f_file_length PROT((void)) - { - int l; - - l = file_length(sp->u.string); - pop_stack(); - push_number(l); - } - #endif - - #ifdef F_UPPER_CASE - void - f_upper_case PROT((void)) - { - char *str; - - str = sp->u.string; - /* find first upper case letter, if any */ - for (; *str; str++) { - if (uislower(*str)) { - int l = str - sp->u.string; - unlink_string_svalue(sp); - str = sp->u.string + l; - *str = toupper((unsigned char)*str); - for (str++; *str; str++) { - if (uislower((unsigned char)*str)) - *str = toupper((unsigned char)*str); - } - return; - } - } - } - #endif - - #ifdef F_REPLACEABLE - void f_replaceable PROT((void)) { - object_t *obj; - program_t *prog; - int i, j, num, numignore, replaceable; - char **ignore; - - if (st_num_arg == 2) { - numignore = sp->u.arr->size; - if (numignore) - ignore = CALLOCATE(numignore + 2, char *, TAG_TEMPORARY, "replaceable"); - else - ignore = 0; - ignore[0] = findstring(APPLY_CREATE); - ignore[1] = findstring(APPLY___INIT); - for (i = 0; i < numignore; i++) { - if (sp->u.arr->item[i].type == T_STRING) - ignore[i + 2] = findstring(sp->u.arr->item[i].u.string); - else - ignore[i + 2] = 0; - } - numignore += 2; - obj = (sp-1)->u.ob; - } else { - numignore = 2; - ignore = CALLOCATE(2, char *, TAG_TEMPORARY, "replaceable"); - ignore[0] = findstring(APPLY_CREATE); - ignore[1] = findstring(APPLY___INIT); - obj = sp->u.ob; - } - - prog = obj->prog; - num = prog->num_functions_defined + prog->last_inherited; - - for (i = 0; i < num; i++) { - if (prog->function_flags[i] & (FUNC_INHERITED | FUNC_NO_CODE)) continue; - for (j = 0; j < numignore; j++) - if (ignore[j] == find_func_entry(prog, i)->name) - break; - if (j == numignore) - break; - } - - replaceable = (i == num); - if (obj == simul_efun_ob || prog->func_ref) - replaceable = 0; - - if (st_num_arg == 2) - free_array((sp--)->u.arr); - FREE(ignore); - free_svalue(sp, "f_replaceable"); - put_number(replaceable); - } - #endif - - #ifdef F_PROGRAM_INFO - void f_program_info PROT((void)) { - int func_size = 0; - int string_size = 0; - int var_size = 0; - int inherit_size = 0; - int prog_size = 0; - int hdr_size = 0; - int class_size = 0; - int type_size = 0; - int total_size = 0; - object_t *ob; - mapping_t *m; - program_t *prog; - int i, n; - - if (st_num_arg == 1) { - ob = sp->u.ob; - prog = ob->prog; - if (!(ob->flags & (O_CLONE|O_SWAPPED))) { - hdr_size += sizeof(program_t); - prog_size += prog->program_size; - - /* function flags */ - func_size += (prog->last_inherited + - prog->num_functions_defined) *sizeof(unsigned short); - - /* definitions */ - func_size += prog->num_functions_defined * - sizeof(function_t); - - string_size += prog->num_strings * sizeof(char *); - var_size += prog->num_variables_defined * (sizeof(char *) + sizeof(unsigned short)); - inherit_size += prog->num_inherited * sizeof(inherit_t); - if (prog->num_classes) - class_size += prog->num_classes * sizeof(class_def_t) + (prog->classes[prog->num_classes - 1].index + prog->classes[prog->num_classes - 1].size) * sizeof(class_member_entry_t); - type_size += prog->num_functions_defined * sizeof(short); - n = 0; - if (prog->type_start) { - unsigned short *ts = prog->type_start; - int nfd = prog->num_functions_defined; - - for (i = 0; i < nfd; i++) { - if (ts[i] == INDEX_START_NONE) - continue; - n += prog->function_table[i].num_arg; - } - } - type_size += n * sizeof(short); - total_size += prog->total_size; - } - pop_stack(); - } else { - for (ob = obj_list; ob; ob = ob->next_all) { - if (ob->flags & (O_CLONE|O_SWAPPED)) continue; - prog = ob->prog; - hdr_size += sizeof(program_t); - prog_size += prog->program_size; - - /* function flags */ - func_size += (prog->last_inherited + - prog->num_functions_defined) << 1; - - /* definitions */ - func_size += prog->num_functions_defined * - sizeof(function_t); - - - string_size += prog->num_strings * sizeof(char *); - var_size += prog->num_variables_defined * (sizeof(char *) + sizeof(unsigned short)); - inherit_size += prog->num_inherited * sizeof(inherit_t); - if (prog->num_classes) - class_size += prog->num_classes * sizeof(class_def_t) + (prog->classes[prog->num_classes - 1].index + prog->classes[prog->num_classes - 1].size) * sizeof(class_member_entry_t); - type_size += prog->num_functions_defined * sizeof(short); - n = 0; - if (prog->type_start) { - unsigned short *ts = prog->type_start; - int nfd = prog->num_functions_defined; - - for (i = 0; i < nfd; i++) { - if (ts[i] == INDEX_START_NONE) - continue; - n += prog->function_table[i].num_arg; - } - } - type_size += n * sizeof(short); - total_size += prog->total_size; - } - } - - m = allocate_mapping(0); - add_mapping_pair(m, "header size", hdr_size); - add_mapping_pair(m, "code size", prog_size); - add_mapping_pair(m, "function size", func_size); - add_mapping_pair(m, "string size", string_size); - add_mapping_pair(m, "var size", var_size); - add_mapping_pair(m, "class size", class_size); - add_mapping_pair(m, "inherit size", inherit_size); - add_mapping_pair(m, "saved type size", type_size); - - add_mapping_pair(m, "total size", total_size); - - push_refed_mapping(m); - } - #endif - - /* Magician - 08May95 - * int remove_interactive(object ob) - * If the object isn't destructed and is interactive, then remove it's - * interactivity and disconnect it. (useful for exec()ing to an already - * interactive object, ie, Linkdead reconnection) - */ - - #ifdef F_REMOVE_INTERACTIVE - void f_remove_interactive PROT((void)) { - if( (sp->u.ob->flags & O_DESTRUCTED) || !(sp->u.ob->interactive) ) { - free_object(sp->u.ob, "f_remove_interactive"); - *sp = const0; - } else { - remove_interactive(sp->u.ob, 0); - /* It may have been dested */ - if (sp->type == T_OBJECT) - free_object(sp->u.ob, "f_remove_interactive"); - *sp = const1; - } - } - #endif - - /* Zakk - August 23 1995 - * return the port number the interactive object used to connect to the - * mud. - */ - #ifdef F_QUERY_IP_PORT - static int query_ip_port P1(object_t *, ob) - { - if (!ob || ob->interactive == 0) - return 0; - return ob->interactive->local_port; - } - - void - f_query_ip_port PROT((void)) - { - int tmp; - - if (st_num_arg) { - tmp = query_ip_port(sp->u.ob); - free_object(sp->u.ob, "f_query_ip_port"); - } else { - tmp = query_ip_port(command_giver); - STACK_INC; - } - put_number(tmp); - } - #endif - - /* - ** John Viega (rust@lima.imaginary.com) Jan, 1996 - ** efuns for doing time zone conversions. Much friendlier - ** than doing all the lookup tables in LPC. - ** most muds have traditionally just used an offset of the - ** mud time or GMT, and this isn't always correct. - */ - - #ifdef F_ZONETIME - - char * - set_timezone (char * timezone) - { - char put_tz[20]; - char *old_tz; - - old_tz = getenv("TZ"); - sprintf (put_tz, "TZ=%s", timezone); - putenv (put_tz); - tzset (); - return old_tz; - } - - void - reset_timezone (char *old_tz) - { - int i = 0; - int env_size = 0; - char put_tz[20]; - - if (!old_tz) - { - while (environ[env_size] != NULL) - { - if (strlen (environ[env_size]) > 3 && environ[env_size][2] == '=' - && environ[env_size][1] == 'Z' && environ[env_size][0] == 'T') - { - i = env_size; - } - env_size++; - } - if ((i+1) == env_size) - { - environ[i] = NULL; - } - else - { - environ[i] = environ[env_size-1]; - environ[env_size-1] = NULL; - } - } - else - { - sprintf (put_tz, "TZ=%s", old_tz); - putenv (put_tz); - } - tzset (); - } - - void - f_zonetime PROT((void)) - { - char *timezone, *old_tz; - char *retv; - int time_val; - int len; - - time_val = sp->u.number; - pop_stack (); - timezone = sp->u.string; - pop_stack (); - - old_tz = set_timezone (timezone); - retv = ctime ((time_t *)&time_val); - len = strlen (retv); - retv[len-1] = '\0'; - reset_timezone (old_tz); - push_malloced_string (string_copy(retv, "zonetime")); - - } - #endif - - #ifdef F_IS_DAYLIGHT_SAVINGS_TIME - void - f_is_daylight_savings_time PROT((void)) - { - struct tm *t; - int time_to_check; - char *timezone; - char *old_tz; - - time_to_check = sp->u.number; - pop_stack (); - timezone = sp->u.string; - pop_stack (); - - old_tz = set_timezone (timezone); - - t = localtime ((time_t *)&time_to_check); - - push_number ((t->tm_isdst) > 0); - - reset_timezone (old_tz); - } - #endif - - #ifdef F_DEBUG_MESSAGE - void f_debug_message PROT((void)) { - debug_message("%s\n", sp->u.string); - free_string_svalue(sp--); - } - #endif - - #ifdef F_FUNCTION_OWNER - void f_function_owner PROT((void)) { - object_t *owner = sp->u.fp->hdr.owner; - - free_funp(sp->u.fp); - put_unrefed_object(owner, "f_function_owner"); - } - #endif - - #ifdef F_REPEAT_STRING - void f_repeat_string PROT((void)) { - char *str; - int repeat, len, newlen; - char *ret, *p; - int i; - - repeat = (sp--)->u.number; - if (repeat > 0) { - str = sp->u.string; - len = SVALUE_STRLEN(sp); - if ((newlen = len * repeat) > max_string_length) - repeat = max_string_length / len; - } - if (repeat <= 0) { - free_string_svalue(sp); - sp->type = T_STRING; - sp->subtype = STRING_CONSTANT; - sp->u.string = ""; - } else if (repeat != 1) { - p = ret = new_string(newlen, "f_repeat_string"); - for (i = 0; i < repeat; i++) { - memcpy(p, str, len); - p += len; - } - *p = 0; - free_string_svalue(sp); - sp->type = T_STRING; - sp->subtype = STRING_MALLOC; - sp->u.string = ret; - } - } - #endif - - #ifdef F_MEMORY_SUMMARY - static int memory_share PROT((svalue_t *)); - - static int node_share P3(mapping_t *, m, mapping_node_t *, elt, void *, tp) { - int *t = (int *)tp; - - *t += sizeof(mapping_node_t) - 2*sizeof(svalue_t); - *t += memory_share(&elt->values[0]); - *t += memory_share(&elt->values[1]); - - return 0; - } - - static int memory_share P1(svalue_t *, sv) { - int i, total = sizeof(svalue_t); - int subtotal; - static int depth = 0; - - switch (sv->type) { - case T_STRING: - switch (sv->subtype) { - case STRING_MALLOC: - return total + - (1 + COUNTED_STRLEN(sv->u.string) + sizeof(malloc_block_t))/ - (COUNTED_REF(sv->u.string)); - case STRING_SHARED: - return total + - (1 + COUNTED_STRLEN(sv->u.string) + sizeof(block_t))/ - (COUNTED_REF(sv->u.string)); - } - break; - case T_ARRAY: - case T_CLASS: - if (++depth > 100) - return 0; - - /* first svalue is stored inside the array struct, so sizeof(array_t) - * includes one svalue. - */ - subtotal = sizeof(array_t) - sizeof(svalue_t); - for (i = 0; i < sv->u.arr->size; i++) - subtotal += memory_share(&sv->u.arr->item[i]); - depth--; - return total + subtotal/sv->u.arr->ref; - case T_MAPPING: - if (++depth > 100) - return 0; - subtotal = sizeof(mapping_t); - mapTraverse(sv->u.map, node_share, &subtotal); - depth--; - return total + subtotal/sv->u.map->ref; - case T_FUNCTION: - { - svalue_t tmp; - tmp.type = T_ARRAY; - tmp.u.arr = sv->u.fp->hdr.args; - - if (++depth > 100) - return 0; - - if (tmp.u.arr) - subtotal = sizeof(funptr_hdr_t) + memory_share(&tmp) - sizeof(svalue_t); - else - subtotal = sizeof(funptr_hdr_t); - switch (sv->u.fp->hdr.type) { - case FP_EFUN: - subtotal += sizeof(efun_ptr_t); - break; - case FP_LOCAL | FP_NOT_BINDABLE: - subtotal += sizeof(local_ptr_t); - break; - case FP_SIMUL: - subtotal += sizeof(simul_ptr_t); - break; - case FP_FUNCTIONAL: - case FP_FUNCTIONAL | FP_NOT_BINDABLE: - subtotal += sizeof(functional_t); - break; - } - depth--; - return total + subtotal/sv->u.fp->hdr.ref; - } - #ifndef NO_BUFFER_TYPE - case T_BUFFER: - /* first byte is stored inside the buffer struct */ - return total + (sizeof(buffer_t) + sv->u.buf->size - 1)/sv->u.buf->ref; - #endif - } - return total; - } - - - /* - * The returned mapping is: - * - * map["program name"]["variable name"] = memory usage - */ - #ifdef F_MEMORY_SUMMARY - static void fms_recurse P4(mapping_t *, map, object_t *, ob, - int *, idx, program_t *, prog) { - int i; - svalue_t *entry; - svalue_t sv; - - sv.type = T_STRING; - sv.subtype = STRING_SHARED; - - for (i = 0; i < prog->num_inherited; i++) - fms_recurse(map, ob, idx, prog->inherit[i].prog); - - for (i = 0; i < prog->num_variables_defined; i++) { - int size = memory_share(ob->variables + *idx + i); - - sv.u.string = prog->variable_table[i]; - entry = find_for_insert(map, &sv, 0); - entry->u.number += size; - } - *idx += prog->num_variables_defined; - } - - void f_memory_summary PROT((void)) { - mapping_t *result = allocate_mapping(8); - object_t *ob; - int idx; - svalue_t sv; - - sv.type = T_STRING; - sv.subtype = STRING_SHARED; - - for (ob = obj_list; ob; ob = ob->next_all) { - svalue_t *entry; - - if (ob->flags & O_SWAPPED) - load_ob_from_swap(ob); - - sv.u.string = ob->prog->name; - entry = find_for_insert(result, &sv, 0); - if (entry->type == T_NUMBER) { - entry->type = T_MAPPING; - entry->u.map = allocate_mapping(8); - } - idx = 0; - fms_recurse(entry->u.map, ob, &idx, ob->prog); - } - push_refed_mapping(result); - } - #endif - - #endif - - /* Marius */ - #ifdef F_QUERY_REPLACED_PROGRAM - void f_query_replaced_program PROT((void)) - { - char *res = 0; - - if (st_num_arg) - { - if (sp->u.ob->replaced_program) - res = add_slash(sp->u.ob->replaced_program); - free_object(sp->u.ob, "f_query_replaced_program"); - } - else - { - if (current_object->replaced_program) - res = add_slash(sp->u.ob->replaced_program); - STACK_INC; - } - - if (res) { - put_malloced_string(res); - } else { - put_number(0); - } - } - #endif - - /* Skullslayer@Realms of the Dragon */ - #ifdef F_NETWORK_STATS - void f_network_stats PROT((void)) - { - mapping_t *m; - int i, ports = 0; - - for (i = 0; i < 5; i++) - if (external_port[i].port) - ports += 4; - - #ifndef PACKAGE_SOCKETS - m = allocate_mapping(ports + 4); - #else - m = allocate_mapping(ports + 8); - #endif - - add_mapping_pair(m, "incoming packets total", inet_in_packets); - add_mapping_pair(m, "incoming volume total", inet_in_volume); - add_mapping_pair(m, "outgoing packets total", inet_out_packets); - add_mapping_pair(m, "outgoing volume total", inet_out_volume); - - #ifdef PACKAGE_SOCKETS - add_mapping_pair(m, "incoming packets sockets", inet_socket_in_packets); - add_mapping_pair(m, "incoming volume sockets", inet_socket_in_volume); - add_mapping_pair(m, "outgoing packets sockets", inet_socket_out_packets); - add_mapping_pair(m, "outgoing volume sockets", inet_socket_out_volume); - #endif - - if (ports) { - for (i = 0; i < 5; i++) { - if (external_port[i].port) { - char buf[30]; - - sprintf(buf, "incoming packets port %d", external_port[i].port); - add_mapping_pair(m, buf, external_port[i].in_packets); - sprintf(buf, "incoming volume port %d", external_port[i].port); - add_mapping_pair(m, buf, external_port[i].in_volume); - sprintf(buf, "outgoing packets port %d", external_port[i].port); - add_mapping_pair(m, buf, external_port[i].out_packets); - sprintf(buf, "outgoing volume port %d", external_port[i].port); - add_mapping_pair(m, buf, external_port[i].out_volume); - } - } - } - - push_refed_mapping(m); - } - #endif --- 0 ---- diff -c -r --new-file ds2.0r18/v22.2b14/local_options ds2.0r20b/v22.2b14/local_options *** ds2.0r18/v22.2b14/local_options Mon Jan 16 23:11:40 2006 --- ds2.0r20b/v22.2b14/local_options Wed Apr 5 19:56:06 2006 *************** *** 76,82 **** #undef AUTO_SETEUID #undef AUTO_TRUST_BACKBONE #undef USE_32BIT_ADDRESSES ! #define HEARTBEAT_INTERVAL 2000000 #define CALLOUT_CYCLE_SIZE 32 #define LARGEST_PRINTABLE_STRING 8192 #define MESSAGE_BUFFER_SIZE 4096 --- 76,82 ---- #undef AUTO_SETEUID #undef AUTO_TRUST_BACKBONE #undef USE_32BIT_ADDRESSES ! #define HEARTBEAT_INTERVAL 1000000 #define CALLOUT_CYCLE_SIZE 32 #define LARGEST_PRINTABLE_STRING 8192 #define MESSAGE_BUFFER_SIZE 4096