Skip to content
2 changes: 2 additions & 0 deletions load/dexpress.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ wholist = {
* NOTE: This needs to be less of a monolith
*/
list_long : function(ul) {
var timeon;

//time to do this the right way
bbs.log_key("w");

Expand Down
59 changes: 2 additions & 57 deletions load/dperroom.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,38 +82,6 @@ roomData = {
console.putmsg(green + high_intensity + "\nStaying the same for " +
"now . . .\n");
}
},
/*
* summary:
* If the current user is the sysop/cosysop, allows editing of the
* room's info to set a moderator
*/
changeRoomModerator : function() {
var newMod = new String();

if (user.security.level >= 80) {
//go ahead and set the moderator for this room/sub
console.putmsg(yellow + high_intensity + "Changing moderator for " +
user.cursub + "\nNew Moderator: " + green);
newMod = console.getstr("New Moderator: ", 40); //max user alias len

while (system.matchuser(newMod) == 0) {
console.putmsg(yellow + newMod + " not found.\n");
newMod = console.getstr("New Moderator: ", 40);
}

roomSettings[bbs.cursub_code].moderator = newMod;
} else {
//add some error logging here at some point, as well; this could be
//a security concern at some point
console.putmsg(red + high_intensity + "Your security level is not" +
" high enough to change room moderator.\nMust we log this?\n");
throw new dDocException("changeRoomModerator() Exception",
"Not high enough security to change room moderator", 1);
}

roomData.fileIO.saveRoomInfo();

},
/*
* summary:
Expand All @@ -123,36 +91,12 @@ roomData = {
changeRoomInfo : function() {
var infoTxt = new Array();

if (roomSettings[bbs.cursub_code].moderator != user.alias) {
try {
this.changeRoomModerator();
} catch (e) {
if (userSettings.debug.misc) {
console.putmsg(yellow + "Unable to change room mod!\n" +
"Msg: " + red + high_intensity + e.message + "\n");
}

throw new dDocException("changeRoomInfo() Exception",
"Exception in changeRoomModerator()", 1);
//that should keep anyone from getting beyond here that
//shouldn't be
}
}

var nao = new Date();
roomSettings[bbs.cursub_code].infoCreationDate =
nao.getDate() + nao.toUTCString();

this.displayRoomInfoHdr();

if ((infoTxt = poast.getTextBlob(this.maxInfoLines)) != null) {
roomSettings[bbs.cursub_code].info = infoTxt;
//this will be set in a separate method handling moderators
//roomSettings[bbs.cursub_code].moderator = user.alias;
roomSettings[bbs.cursub_code].moderator = user.alias;
//of course this will have to be replaced with better code to
//make sure the person is authorized, sysop modification of it,
//etc etc etc (re: above)

//roomSettings[bbs.cursub_code].infoCreationDate =
roomData.fileIO.saveRoomInfo();
}
Expand All @@ -166,6 +110,7 @@ roomData = {
roomData.fileIO.snagRoomInfoBlob();
this.displayRoomInfoHdr();


if (roomSettings[bbs.cursub_code].info.length == 0) {
//or should we be looking for null here?
console.putmsg(green + high_intensity +
Expand Down
17 changes: 10 additions & 7 deletions load/dpoast.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,6 @@ poast = {
"\nlength: " + mTxt.length + "\nBeing returned\n");
}

//this is an ugly hack fix, but whatever; it's quick and
//works for now (issue #136 on github)
mTxt.pop();
return mTxt;
break;
/* case 'X':
Expand Down Expand Up @@ -179,9 +176,9 @@ poast = {
var mTxt = new Array();
//var lNdx, uchoice, done = false;

if (userSettings.debug.message_posting) {
/*if (userSettings.debug.message_posting) {
console.putmsg("Attempting post to: " + base.cfg.code + "\n");
}
}*/

//going to use a generic subject for now; ignoring it from the
//ddoc interface completely to see how it goes
Expand Down Expand Up @@ -392,12 +389,18 @@ poast = {
* throw exception
*/
yell : function() {
console.putmsg(green + high_intensity + "\nPress 'y' to send" +
/* console.putmsg(green + high_intensity + "\nPress 'y' to send" +
" a yell to the Sysop(s).\n\nEnter your choice -> ");
if (console.getkey().toUpperCase() != 'Y') {
throw new dDocException("yell() Exception",
"User didn't want to yell", 1);
}
} */

if (console.noyes("Send Yell to SysOp")) {
console.putmsg(yellow + high_intensity + "Aborting Yell to " +
"SysOp\n");
return;
}

var mb = new MsgBase('mail');
if (userSettings.debug.message_posting) {
Expand Down
17 changes: 1 addition & 16 deletions misc/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,28 +54,13 @@ for(var c=0; c<10; c++) {
// Continue normal login (prompting for password)
// modified by Khelair for usage w/ddoc2
if(bbs.login(str, "\1n\1c\1hPW:\b\b\bPassword: \1w")) {
/*
//while we're in a debugging mode here
console.putmsg("Shell: " + user.command_shell.toUpperCase() +
" (to upper)\n");
console.getkey(); //since we're not seeing the pause w/ddoc

//check to see if we're a ddoc user, skip interactive if so
if (user.command_shell.toUpperCase() == "DDOC") {
exit();
} else {
bbs.logon();
exit();
} */
/*if (console.noyes("Quick login?")) {
bbs.logon();
exit();
} else {
exit();
}*/

bbs.logon();
exit();
}
}
console.clearkeybuffer(); // Clear pending input (e.g. mistyped system password)
bbs.rlogin_name=''; // Clear user/login name (if supplied via protocol)
Expand Down
Loading