• js version of user default

    From Rob Swindell@VERT to GitLab note in main/sbbs on Wed Sep 13 12:14:33 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4033

    Double-check what you put in the .asc file against the property names in `disp_strings`.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Fri Sep 15 23:44:46 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4053

    For the sake of getting this pushed out, I'll remove the template option for now, instead pointing to users to use replace_text or their own text.dat file. I may look at adding templating later once I've experimented a bit.

    Have now accounted for the various I,D,W,M,and E options and I think I have added the security around them properly.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 00:02:11 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4054

    Removed all eotl customization and will use system defaults.

    and yes, I'll fork a copy next time :smile:
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 01:37:44 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4055

    Not sure if I've done it right, but I went with taking the array and adding from file.ini compressor: if the lower case version of extension isn't present, otherwise it would show zip and ZIP which I'm not sure we'd want, it looks odd.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 14:57:34 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4085

    Remove debug stuff.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:20 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4086

    That doesn't look right. if 'i' is 0, then you don't want to use array index i-1. I think the `-1` here just needs to be removed.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:20 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4087

    You shouldn't need to manually clear the `console.aborted` flag, it's cleared automatically.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:20 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4088

    Ditto (no need to do this clearing).
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:21 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4089

    So, you'd get both `text/bademail.msg` displayed to the user (if it exists) and this new string. Probably best to just go back to using `system.trashcan()` here, but I also don't like adding a hard-coded string that can't be easily localized (for other languages) or customized by the sysop. Consider making this overridable via modopts.ini
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:21 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4090

    You don't need to pass the string argument ('') here to `getstr()` since you're not editing an existing string.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:21 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4091

    Ditto here, don't need to pass '' to `getstr()` in this case.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:21 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4092

    This looks like a new log message not present in the current built-in default settings editor. I'm okay with it, but I didn't think you were adding new features/capabilities with this script.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 15:12:21 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4093

    You don't need to assign twice to user.settings here (and elsewhere), just: `user.settings ^= USER_EXPERT;`
    Is all you need.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 17:35:08 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4100

    in useredit.cpp line 1057-1058

    bputs(text[PasswordChanged]);
    logline(LOG_NOTICE,nulstr,"changed password");

    Is that not what logline is doing?
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 17:46:25 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4102

    Yes, my bad, I see it now.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 18:39:42 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4104

    My bad. I thought I got them all.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 18:42:02 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4105

    Fixed
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 18:42:56 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4106

    Ditto fixed.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 18:53:29 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4107

    It looks like useredit.cpp doesn't check for entries in email.can so maybe I should remove that until someone requests it? As you said in an earlier note, I should be trying to replicate what is already available and not add new features.

    If the feature is added, then we should add a new line to text.dat to accommodate a new "Invalid email" string. For now, I'm removing and we can add back later.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 18:56:57 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4108

    It doesn't appear this way.

    case 'E':
    if(console.noyes(bbs.text(UseExternalEditorQ))) {
    writeln("aborted? " + console.aborted);

    When I press CTRL-C at this point, it returns console.aborted: true.

    ![image](/uploads/15cc953b284b9578ced178be8a160aa0/image.png)
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 19:01:02 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4111

    Yes, that's correct/expected. And then at the next prompt for input, it'll be automatically reverted back to false. You're not expected to need to manually reset this flag.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 19:02:43 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4112

    If I remove the -1 then if I select 2 for 7zip is gets set to tgz.
    If I select 3 for tgz then I get test. If I select 1 for zip I get 7z.

    If I set it back to -1 then 1 = zip, 2=7z, 3=tgz and 4=test, CTRL-C leaves it unchanged. The only issue is if you press enter, it doesn't return the right value. I'll look into that.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sat Sep 16 19:02:53 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4113

    Bah. Done.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sat Sep 16 19:21:38 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4115

    Oh, I see. I think the problem is that you're passing `i+1` to the calls to `uselect()` in the loop above. You don't need to do that.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:06:50 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4136

    I think you mean to use `argv` (to get the number of the user to edit) here, not use `user.number`.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:08:41 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4137

    Excessive parenthesis, instead:
    `if(system.settings&SYS_PWEDIT && !(useron.security.restrictions&UFLAG_G))`
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:09:08 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4138

    Excessive parenthesis.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:11:15 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4139

    Above, `defaultext` is initialized as a string (''), yet here you're setting it to a number. I suggest just leaving the initial value undefined.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:13:56 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4140

    I don't think this will do what you want. Instead:
    `if (user.number == useron.number)`
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:17:39 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4141

    Again, this `user == useron` comparison isn't going to do what you want. Instead, use `user.number == useron.number`.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:20:00 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4142

    I think you meant to put the closing parenthesis before the `=== 0` or something. Really, I think you meant to say:
    `if(bbs.text(MouseTerminalQ).length && console.yesno(bbs.text(MouseTerminalQ)))`
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:22:15 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4143

    Comparing the return value of `bbs.text()` to `0` here doesn't make sense. I think just removing the `== 0` should work or add `.length` as I suggested above. Whatever method you use, be consistent.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:26:05 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4144

    That should be `console.autoterm |= USER_PETSCII;`
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:28:39 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4145

    The use of whitespace is inconsistent in this script. I suggest choosing a style (for this script) and sticking to it. Based on other examples in this file, this line should have been written:
    `useron.settings |= USER_RIP;`
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:30:11 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4146

    Ditto. You're either putting spaces around operators, or you aren't. But sometimes do and sometimes not (in a brand new script) isn't good.

    When you see inconsistencies in other source/scripts, it's usually because they've been around a long time and styles have changes or different contributors have contributed with different preferences. With a brand new script, that shouldn't be the case.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:31:22 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4147

    Excessive parenthesis:
    `if(!useron.compare_ars(file_cfg.protocol[code].ars) || file_cfg.protocol[code].dlcmd.length === 0)`
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell@VERT to GitLab note in main/sbbs on Sun Sep 17 18:34:30 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4148

    I don't understand the creation/use of this additional shells[] array. main_cfg.shell is already an array. And don't appear to ever use the contents of the array after, just its length.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sun Sep 17 21:23:18 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4155

    Fixed.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sun Sep 17 21:31:41 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4156

    I think the former based on the C++ code. Not that I'm a C++ coder...
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Sun Sep 17 21:38:47 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4157

    I'm used to perl which pretty much wants parenthesis around everything.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Nigel Reed@VERT to GitLab note in main/sbbs on Mon Sep 18 10:49:15 2023
    https://gitlab.synchro.net/main/sbbs/-/merge_requests/331#note_4173

    I still can't get TYPE=ANSI. If you select No for auto detect and then select no for all the options you'll get

    [T] Terminal Mode : US-ASCII / DUMB (mono) (mouse)

    Now, go through and select Yes for auto detect, no for iCE colors, yes for mouse reporting, yes for IBM support

    [T] Terminal Mode : Auto CP437 / DUMB (color) (mouse)

    I'm still getting DUMB as the terminal type.
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net