• Baja argument help

    From DesotoFireflite@VERT/VALHALLA to All on Sun Feb 13 13:47:12 2022
    I have a login baja module I use to show users a local message base sub called new if a new message is present since the last time they logged in, and if there is nothing new, it does nothing. This works fine, and have been using it for years:ãã!include sbbsdefs.incã!include file_io.incã!include dir_attr.incããSETSTR "LOCAL"ãMSG_SET_GROUPãSETSTR "NEWS"ãMSG_SET_AREAãMSG_NEW_SCAN_SUBããNow, I want to improve on this since this script won't show a guest anything or a new user anything, so I improved it. Now it works as intended for guests and new users, and takes them directly to the new message base where they can read the news, or exit themselves by hitting enter. ããBut the way I have it, it also takes the other users to the news message base even if there are no new messages, so I'm sure I have my logic screwed up. It's acting like it's not getting to the secont part. Below is the new file, can someone let me know where I went wrong. Thanks in advance. ãã!include sbbsdefs.incã!include file_io.incã!include dir_attr.incããcompare_ars LASTON EQUALS 0 OR REST Gãif_trueã# If New User or Guest, go to Local News Message Base and Read News...ã SETSTR "LOCAL"ã MSG_SET_GROUPã SETSTR "NEWS"ã MSG_SET_AREAã MSG_READãif_falseã# All other users, go to Local message Base, check for new messages In News,ã# and show New Messages and if no New Messages exist, do nothing, and exit.ã SETSTR "LOCAL"ã MSG_SET_GROUPã SETSTR "NEWS"ã MSG_SET_AREAã MSG_NEW_SCAN_SUBãend_ifããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãValhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023ãValhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26ãValhalla Home Services Web! - http://bbs.valhallabbs.comãA Gamers Paradise - Over 150 Registered Online Game Doors!ãHome Of Odin's Maze Game Server!ãã--- Don't eat the yellow snow!ã þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.netã
  • From Digital Man@VERT to DesotoFireflite on Sun Feb 13 12:11:33 2022
    Re: Baja argument helpã By: DesotoFireflite to All on Sun Feb 13 2022 01:47 pmãã > But the way I have it, it also takes the other users to the news messageã > base even if there are no new messages, so I'm sure I have my logic screwedã > up. It's acting like it's not getting to the secont part. Below is the newã > file, can someone let me know where I went wrong. Thanks in advance.ã >ã > !include sbbsdefs.incã > !include file_io.incã > !include dir_attr.incã >ã > compare_ars LASTON EQUALS 0 OR REST Gã > if_trueã > # If New User or Guest, go to Local News Message Base and Read News...ã > SETSTR "LOCAL"ã > MSG_SET_GROUPã > SETSTR "NEWS"ã > MSG_SET_AREAã > MSG_READã > if_falseã > # All other users, go to Local message Base, check for new messages In News,ã > # and show New Messages and if no New Messages exist, do nothing, and exit.ã > SETSTR "LOCAL"ã > MSG_SET_GROUPã > SETSTR "NEWS"ã > MSG_SET_AREAã > MSG_NEW_SCAN_SUBã > end_ifããReplace that "if_false" with "else".ã-- ã digital man (rob)ããBreaking Bad quote #41:ãAcademy hire you right out of the womb? You guys get younger every year!ãNorco, CA WX: 84.1øF, 9.0% humidity, 6 mph ENE wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From DesotoFireflite@VERT/VALHALLA to Digital Man on Sun Feb 13 16:43:09 2022
    Re: Baja argument helpã By: Digital Man to DesotoFireflite on Sun Feb 13 2022 12:11 pmãã DM> Re: Baja argument helpã DM> By: DesotoFireflite to All on Sun Feb 13 2022 01:47 pmãã >> But the way I have it, it also takes the other users to the newsã >> message base even if there are no new messages, so I'm sure I have myã >> logic screwed up. It's acting like it's not getting to the secontã >> part. Below is the new file, can someone let me know where I wentã >> wrong. Thanks in advance. ãã >> !include sbbsdefs.incã >> !include file_io.incã >> !include dir_attr.incãã >> compare_ars LASTON EQUALS 0 OR REST Gã >> if_trueã >> # If New User or Guest, go to Local News Message Base and Read News...ã >> SETSTR "LOCAL"ã >> MSG_SET_GROUPã >> SETSTR "NEWS"ã >> MSG_SET_AREAã >> MSG_READã >> if_falseã >> # All other users, go to Local message Base, check for new messages Inã >> News, # and show New Messages and if no New Messages exist, doã >> nothing, and exit. SETSTR "LOCAL"ã >> MSG_SET_GROUPã >> SETSTR "NEWS"ã >> MSG_SET_AREAã >> MSG_NEW_SCAN_SUBã >> end_ifãã DM> Replace that "if_false" with "else".ããStill not working for the regular users, takes them right to the message base. It's like it's not seeing the second part, and giving everyone the first part.ãsee below, I changed it as you suggested.ãã!include sbbsdefs.incã!include file_io.incã!include dir_attr.incããcompare_ars LASTON EQUALS 0 OR REST Gãif_trueã# If New User or Guest, go to Local Message Base and Read News...ã SETSTR "LOCAL"ã MSG_SET_GROUPã SETSTR "NEWS"ã MSG_SET_AREAã MSG_READãelseã# All other users, go to Local message Base, check for new messages In News, # and show New Messages and if no New Messages exist, do nothing, and exit.ã SETSTR "LOCAL"ã MSG_SET_GROUPã SETSTR "NEWS"ã MSG_SET_AREAã MSG_NEW_SCAN_SUBãend_ifããI can't understand it, I've worked with Baja before, and I thought I undersood it. I'm figuring with a new user, the last on would be 0(zero), and the Guest would be a restriction of "G", hence "compare_ars LASTON EQUALS 0 OR REST G", so as a regular user with no restrictions, and laston field populated with a date, it should be false, and go to else, the second half, but it's acting like it never sees the second half with regular users, but treats them like a new user or guest. I also tried "compare_ars LASTON=0 OR REST G" and got the same results. My logic must be flawed. It may be the LASTON causing the issue, but I don't know another way of determining a new user with ars or any other method.ã ãã ããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãValhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023ãValhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26ãValhalla Home Services Web! - http://bbs.valhallabbs.comãA Gamers Paradise - Over 150 Registered Online Game Doors!ãHome Of Odin's Maze Game Server!ãã--- CAT (n.), Furry keyboard cover.ã þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.netã
  • From Digital Man@VERT to DesotoFireflite on Sun Feb 13 14:26:16 2022
    Re: Baja argument helpã By: DesotoFireflite to Digital Man on Sun Feb 13 2022 04:43 pmãã > Re: Baja argument helpã > By: Digital Man to DesotoFireflite on Sun Feb 13 2022 12:11 pmã >ã > DM> Re: Baja argument helpã > DM> By: DesotoFireflite to All on Sun Feb 13 2022 01:47 pmã >ã > >> But the way I have it, it also takes the other users to the newsã > >> message base even if there are no new messages, so I'm sure I have myã > >> logic screwed up. It's acting like it's not getting to the secontã > >> part. Below is the new file, can someone let me know where I wentã > >> wrong. Thanks in advance.ã >ã > >> !include sbbsdefs.incã > >> !include file_io.incã > >> !include dir_attr.incã >ã > >> compare_ars LASTON EQUALS 0 OR REST Gã > >> if_trueã > >> # If New User or Guest, go to Local News Message Base and Read News...ã > >> SETSTR "LOCAL"ã > >> MSG_SET_GROUPã > >> SETSTR "NEWS"ã > >> MSG_SET_AREAã > >> MSG_READã > >> if_falseã > >> # All other users, go to Local message Base, check for new messages Inã > >> News, # and show New Messages and if no New Messages exist, doã > >> nothing, and exit. SETSTR "LOCAL"ã > >> MSG_SET_GROUPã > >> SETSTR "NEWS"ã > >> MSG_SET_AREAã > >> MSG_NEW_SCAN_SUBã > >> end_ifã >ã > DM> Replace that "if_false" with "else".ã >ã > Still not working for the regular users, takes them right to the messageã > base. It's like it's not seeing the second part, and giving everyone theã > first part. see below, I changed it as you suggested.ã >ã > !include sbbsdefs.incã > !include file_io.incã > !include dir_attr.incã >ã > compare_ars LASTON EQUALS 0 OR REST Gã > if_trueã > # If New User or Guest, go to Local Message Base and Read News...ã > SETSTR "LOCAL"ã > MSG_SET_GROUPã > SETSTR "NEWS"ã > MSG_SET_AREAã > MSG_READã > elseã > # All other users, go to Local message Base, check for new messages In News,ã > # and show New Messages and if no New Messages exist, do nothing, and exit.ã > SETSTR "LOCAL"ã > MSG_SET_GROUPã > SETSTR "NEWS"ã > MSG_SET_AREAã > MSG_NEW_SCAN_SUBã > end_ifã >ã > I can't understand it, I've worked with Baja before, and I thought Iã > undersood it. I'm figuring with a new user, the last on would be 0(zero),ã > and the Guest would be a restriction of "G", hence "compare_ars LASTONã > EQUALS 0 OR REST G", so as a regular user with no restrictions, and lastonã > field populated with a date, it should be false, and go to else, the secondã > half, but it's acting like it never sees the second half with regular users,ã > but treats them like a new user or guest. I also tried "compare_ars LASTON=0ã > OR REST G" and got the same results. My logic must be flawed. It may be theã > LASTON causing the issue, but I don't know another way of determining a newã > user with ars or any other method.ããLASTON is initialized to the current date/time when a new user account is created. "LOGONS" is probably the value you want to be checking. It should be equal to 1 for a user's first logon.ããBy what you're describing, the second "else" section should *always* be executing and it's the first ("if_true") section that isn't being executed. In that case, fixing the ARS should solve that.ã-- ã digital man (rob)ããSynchronet "Real Fact" #30:ãThe COM I/O routines for Synchronet for DOS were written in ASM by Steve DeppeãNorco, CA WX: 86.6øF, 9.0% humidity, 1 mph SW wind, 0.00 inches rain/24hrsã---ã þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.netã
  • From DesotoFireflite@VERT/VALHALLA to Digital Man on Mon Feb 14 15:51:22 2022
    Re: Baja argument helpã By: Digital Man to DesotoFireflite on Sun Feb 13 2022 02:26 pmãã >> I can't understand it, I've worked with Baja before, and I thought Iã >> undersood it. I'm figuring with a new user, the last on would beã >> 0(zero), and the Guest would be a restriction of "G", henceã >> "compare_ars LASTON EQUALS 0 OR REST G", so as a regular user with noã >> restrictions, and laston field populated with a date, it should beã >> false, and go to else, the second half, but it's acting like it neverã >> sees the second half with regular users, but treats them like a newã >> user or guest. I also tried "compare_ars LASTON=0 OR REST G" and gotã >> the same results. My logic must be flawed. It may be the LASTONã >> causing the issue, but I don't know another way of determining a newã >> user with ars or any other method. ãã DM> LASTON is initialized to the current date/time when a new user account isã DM> created. "LOGONS" is probably the value you want to be checking. It shouldã DM> be equal to 1 for a user's first logon.ãã DM> By what you're describing, the second "else" section should *always* beã DM> executing and it's the first ("if_true") section that isn't beingã DM> executed. In that case, fixing the ARS should solve that.ãã"LOGONS" was the key, it's working like I want it to now. I cleaned up the code a bit, so it doesn't look as klunky, see below. Thanks for the help.ãã!include sbbsdefs.incã!include file_io.incã!include dir_attr.incããSETSTR "LOCAL"ãMSG_SET_GROUPãSETSTR "NEWS"ãMSG_SET_AREAãã compare_ars LOGONS=1 OR REST Gã if_trueã # If New User or Guest, go to Local Message Base and Read News...ã MSG_READã elseã # All other users, go to Local message Base, check for new messages In News, andã # show New Messages and if no New Messages exist, do nothing, and exit.ã MSG_NEW_SCAN_SUBã end_ifããSysOp: C.G. Learn, AKA: DesotoFirefliteãValhalla Home Services! - (Synchronet) - bbs.valhallabbs.comãValhalla II! - (GAP) - bbs.valhallabbs.com:24ãValhalla III! - (RemoteAccess) - bbs.valhallabbs.com:5023ãValhalla IIII! - (Dungeons & Dragons BBS) - bbs.valhallabbs.com:26ãValhalla Home Services Web! - http://bbs.valhallabbs.comãA Gamers Paradise - Over 150 Registered Online Game Doors!ãHome Of Odin's Maze Game Server!ãã--- Don't eat the yellow snow!ã þ Synchronet þ Valhalla Home Services þ USA þ http://valhalla.synchro.netã