Skip to content

Commit ef80a60

Browse files
committed
Merge conflict (fixed manually)
2 parents 1e0e295 + a162bf7 commit ef80a60

3 files changed

Lines changed: 60 additions & 15 deletions

File tree

ddoc2.js

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -488,6 +488,7 @@ docIface = {
488488
//roomData.fileIO.roomRecFilename,
489489
area);
490490
}*/
491+
491492
try {
492493
roomData.fileIO.snagRoomInfoBlob();
493494
} catch (e) {
@@ -508,7 +509,7 @@ docIface = {
508509
}
509510

510511
//save user setting defaults
511-
docIface.util.preUserSettings = user.settings;
512+
this.preUserSettings = user.settings;
512513
this.turnOffSynchronetDefaults();
513514
if (userSettings.confined) {
514515
bbs.log_str(user.alias + " is entering dDOC shell and " +
@@ -530,9 +531,15 @@ docIface = {
530531
user.settings |= USER_PAUSE;
531532

532533
//save bbs defaults
533-
docIface.util.preSubBoard = bbs.cursub;
534-
docIface.util.preMsgGroup = bbs.curgrp;
535-
docIface.util.preFileDir = bbs.curdir;
534+
if (userSettings.debug.misc) {
535+
console.putmsg(yellow + "Saving settings for later restoration:\n" +
536+
"preSubBoard (user.cursub):\t" + green + user.cursub + yellow +
537+
"\npreMsgGroup (user.curgrp):\t" + green + user.curgrp + yellow +
538+
"\npreFileDir (user.curdir):\t" + green + user.curdir + "\n");
539+
}
540+
this.preSubBoard = user.cursub;
541+
this.preMsgGroup = user.curgrp;
542+
this.preFileDir = user.curdir;
536543

537544
//snag user zapped rooms list
538545
try {
@@ -583,19 +590,19 @@ docIface = {
583590
bbs.log_key("L");
584591

585592
if (userSettings.debug.flow_control) {
586-
console.putmsg(red + "\nRestoring bbs.* properties:\n" +
587-
" bbs.cursub: " + docIface.util.preSubBoard + "\n" +
588-
" bbs.curgrp: " + docIface.util.preMsgGroup + "\n" +
589-
" bbs.curdir: " + docIface.util.preFileDir + "\n");
593+
console.putmsg(red + "\nRestoring user.* properties:\n" +
594+
" user.cursub: " + this.preSubBoard + "\n" +
595+
" user.curgrp: " + this.preMsgGroup + "\n" +
596+
" user.curdir: " + this.preFileDir + "\n");
590597
console.putmsg(red + "\nRestoring user.settings . . .\n");
591598
}
592599

593600
//restore initial settings prior to exit
594-
bbs.cursub = docIface.util.preSubBoard;
595-
user.cursub = bbs.cursub_code;
596-
bbs.curgrp = docIface.util.preMsgGroup;
597-
bbs.curdir = docIface.util.preFileDir;
598-
user.settings = docIface.util.preUserSettings;
601+
user.cursub = this.preSubBoard;
602+
//user.cursub = bbs.cursub_code;
603+
user.curgrp = this.preMsgGroup;
604+
user.curdir = this.preFileDir;
605+
user.settings = this.preUserSettings;
599606

600607
//disable H exemption in case they go back to usual shell so that
601608
//we can handle events, etc
@@ -839,6 +846,11 @@ if (!debugOnly) {
839846
}
840847
}
841848
break;
849+
case 'p': //profile a user
850+
console.putmsg(green + high_intensity +
851+
"User to profile -> ");
852+
userRecords.userDataUI.profileUser(console.getstr());
853+
break;
842854
default:
843855
console.putmsg(excuse);
844856
break;

load/dperroom.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,12 @@ roomData = {
171171
* set, otherwise amusing nethack message)
172172
*/
173173
displayRoomInfo : function() {
174-
this.displayRoomInfoHdr();
174+
/* this.displayRoomInfoHdr();
175175
176-
roomSettings[bbs.cursub_code] = roomData.fileIO.snagRoomInfoBlob();
176+
roomSettings[bbs.cursub_code] = roomData.fileIO.snagRoomInfoBlob(); */
177+
178+
roomData.fileIO.snagRoomInfoBlob();
179+
this.displayRoomInfoHdr();
177180

178181
if (roomSettings[bbs.cursub_code].info.length == 0) {
179182
//or should we be looking for null here?

load/dperuser.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,36 @@ userRecords = {
256256
//terminology now)
257257

258258
// ----++++****====userDataUI methods====****++++----
259+
profileUser : function (uname) {
260+
var profileeSettings = { };
261+
var unum, uObj;
262+
263+
if ((unum = system.matchuser(uname)) == 0) {
264+
console.putmsg(yellow + high_intensity + "User " + green +
265+
uname + " was not found!\n");
266+
throw new dDocException("profileUser() Exception",
267+
"Unable to locate " + uname, 1);
268+
}
269+
270+
profileeSettings = userRecords.userDataIO.loadSettings(unum);
271+
uObj = new User(unum);
272+
273+
console.putmsg(cyan + high_intensity + uObj.alias + "\n" +
274+
yellow + high_intensity + uObj.address + "\n" +
275+
uObj.location + "\n");
276+
277+
if (profileeSettings == null) { //that is the error condition, no?
278+
console.putmsg(yellow + high_intensity + "User has not set up" +
279+
" profile information yet\n\n");
280+
} else {
281+
console.putmsg(high_intensity + green + "Doing: " + cyan +
282+
profileeSettings.doing + "\n\n");
283+
for each (var infoLine in profileeSettings.info) {
284+
console.putmsg(green + high_intensity + infoLine + "\n");
285+
}
286+
console.putmsg("\n");
287+
}
288+
},
259289
/*
260290
* summary:
261291
* obtains a new list of lines of text to utilize as the

0 commit comments

Comments
 (0)