22 * dexpress.js
33 * by: Damon Getsman
44 * started: 12oct14 (lol I'm 37 today; lawd the helpless aging)
5- * finished;
5+ * beta: well prior to 30may15
6+ * finished:
67 *
78 * Handles text entry and the like for the ddoc suite's express message
89 * functionality
@@ -25,7 +26,7 @@ wholist = {
2526 * summary:
2627 * Cycles through system's nodes, checking to see if they're in use
2728 * and then compiling an array of the usernames
28- * returns :
29+ * return :
2930 * Array() of User objects
3031 */
3132 populate : function ( ) {
@@ -133,17 +134,17 @@ wholist = {
133134 /*bbs.log_key("w");
134135 bbs.whos_online(); */
135136 } ,
136- /*
137- * summary:
138- * Displays a shorter (multicolumn, though spacing isn't perfectly
139- * figured out on that yet) format listing of who is online
140- * ul:
141- * Array() of User objects for those currently online
142- */
137+ /*
138+ * summary:
139+ * Displays a shorter (multicolumn, though spacing isn't perfectly
140+ * figured out on that yet) format listing of who is online
141+ * ul:
142+ * Array() of User objects for those currently online
143+ */
143144 list_short : function ( ul ) {
144145 //this one we'll have to make multi-column
145146 var uNames = new Array ( ) ;
146- var maxArrayLen = 0 , totalUsers = 0 , cols , ouah2 , colBoundary ;
147+ var maxArrayLen = 0 , totalUsers = 0 , ouah2 , colBoundary ;
147148
148149 bbs . log_key ( "W" ) ;
149150 console . putmsg ( green + high_intensity +
@@ -161,7 +162,7 @@ wholist = {
161162 //name, determines where the nearest tab beyond is, and divides the
162163 //available screen columns into that many segments accordingly
163164 colBoundary = ( ( ( ( maxArrayLen + 2 ) % 8 ) + 1 ) * 8 ) ;
164- cols = Math . round ( console . screen_columns / colBoundary ) ;
165+ // cols = Math.round(console.screen_columns / colBoundary);
165166
166167 //generate wholist
167168 for ( var ouah = 0 ; ouah < totalUsers ; ouah ++ ) {
@@ -174,26 +175,26 @@ wholist = {
174175 } else {
175176 console . putmsg ( "\t\t" ) ;
176177 }
177-
178- //pretty sure the above replaces this right now
179- /* if ((ouah > 0) && ((ouah % cols) == 0)) {
180- console.putmsg("\n");
181- } */
182178 }
183179
184180 console . putmsg ( "\n" ) ;
185181 }
186182} ,
183+ //sub-object
187184express = {
188185 /*
189186 * summary:
190187 * Reads in a buffer of up to 5 77 column lines, checking
191188 * each line for end-of-input criteria (ie ABORT, or a
192189 * blank line prematurely), sending it off to be sent via a
193190 * Synchronet telegram by the calling routine
194- * returns :
191+ * return :
195192 * null if aborted; an array of Strings, with up to 5
196193 * elements. Assume nothing else.
194+ * NOTE:
195+ * Yet another great candidate for switching out that null and
196+ * replacing things with an exception, the way code is supposed to
197+ * work, etc etc etc
197198 */
198199 readBuf : function ( ) {
199200 var abort = false , nao = new Date , mTxt = new Array , xHdr ;
@@ -251,16 +252,24 @@ express = {
251252 * recipient's name, it verifies whether or not the user is logged
252253 * in/valid in general. More functionality will be added as the
253254 * skeleton is first implemented.
254- * returns :
255+ * return :
255256 * Negative value for user not found, zero for success
257+ * NOTE:
258+ * Let's get some exceptions in here; c'mon with this lazy shite
256259 */
257260 chkRcp : function ( ul ) {
258261 //check to make sure the recipient is valid
259262 var recip = null , success = false ;
260263
261264 console . putmsg ( green + "Message eXpress\nRecipient: " ) ;
262- //note that a default user from previous expresses will
263- //have to be added here to keep people from bitching
265+ /*
266+ * note that a default user from previous expresses will
267+ * have to be added here to keep people from bitching; this can be
268+ * implemented most easily [probably] when it is time to start keeping
269+ * a list of the different Xes that have been sent in order to scroll
270+ * back or forwards through them, as well as to quote harassing ones to
271+ * the sysop, who probably won't give a fuck in any case
272+ */
264273
265274 recip = console . getstr ( ) ;
266275 for each ( u in ul ) {
@@ -292,8 +301,9 @@ express = {
292301 * routine, from 'x' at the main menu, as well as from any other
293302 * area where it will be implemented (ie message save menus,
294303 * message read menus, etc)
295- * returns:
296- * Negative value for fuggup
304+ * return:
305+ * Negative value for fuggup; let's switch that to an exception, for the
306+ * love of all things holy
297307 */
298308 sendX : function ( ) {
299309 var recip , mTxt ;
0 commit comments