• Birthday...

    From Bill McGarrity@1:266/404 to All on Sun Apr 15 01:22:13 2018
    Hiya gang...

    When it's a user's birthday, I know Synch sends them a message wishing them Happy Birthday. That msg, must be within a text file somwhere. Can anyone
    tell me where to find the file or is it hardwired?

    Thanks..

    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: 6697
    Radio: radio.tequilamockingbirdonline.net:8010/live
    --- SBBSecho 3.04-Win32
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
  • From Digital Man@1:103/705 to Bill McGarrity on Sat Apr 14 22:42:26 2018
    Re: Birthday...
    By: Bill McGarrity to All on Sun Apr 15 2018 01:22 am

    Hiya gang...

    When it's a user's birthday, I know Synch sends them a message wishing them Happy Birthday. That msg, must be within a text file somwhere. Can anyone tell me where to find the file or is it hardwired?

    It's the "HappyBirthday" line in the ctrl/text.dat file.

    digital man

    Synchronet "Real Fact" #89:
    Rob played drums on the album "Weedpuller" available for digital purchase/stream
    Norco, CA WX: 67.3oF, 20.0% humidity, 0 mph S wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.04-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Bill McGarrity@1:266/404 to Digital Man on Sun Apr 15 01:48:39 2018
    Re: Birthday...
    By: Digital Man to Bill McGarrity on Sat Apr 14 2018 22:42:26

    Hiya Rob...

    It's the "HappyBirthday" line in the ctrl/text.dat file.

    OK.. great. So there is no way I can replace that with an ansi file... it's text based only?

    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: 6697
    Radio: radio.tequilamockingbirdonline.net:8010/live
    --- SBBSecho 3.04-Win32
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
  • From echicken@1:103/705 to Bill McGarrity on Sun Apr 15 01:46:32 2018
    Re: Birthday...
    By: Bill McGarrity to All on Sun Apr 15 2018 01:22:13

    When it's a user's birthday, I know Synch sends them a message wishing them Happy Birthday. That msg, must be within a text file somwhere. Can anyone tell me where to find the file or is it hardwired?

    There is a '329 HappyBirthday' in text.dat which appears to be colorized Happy Birthday text.

    You can also set an external program to Execute on Event 'Birthday' via scfg, so presumably that would get triggered (during logon?) on the user's configured birthday.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    * Synchronet * electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Bill McGarrity@1:266/404 to echicken on Sun Apr 15 02:13:27 2018
    Re: Birthday...
    By: echicken to Bill McGarrity on Sun Apr 15 2018 01:46:32

    Hiya echicken...

    There is a '329 HappyBirthday' in text.dat which appears to be
    colorized Happy Birthday text.

    Yes, Rob just explained that...

    You can also set an external program to Execute on Event 'Birthday'
    via scfg, so presumably that would get triggered (during logon?) on
    the user's configured birthday.

    I was thinking about this as well. I'll have to look a little deeper into
    it. Maybe whip up something like the "date" adder to the logon.js file.

    Thanks...

    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: 6697
    Radio: radio.tequilamockingbirdonline.net:8010/live
    --- SBBSecho 3.04-Win32
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
  • From Bill McGarrity@1:266/404 to echicken on Sun Apr 15 02:19:34 2018
    Re: Birthday...
    By: echicken to Bill McGarrity on Sun Apr 15 2018 01:46:32

    Hiya echicken....

    Would something like this work?

    var birthfile = user.birthday + format("birthday.asc",;
    if(file_exists(birthfile))
    console.printfile(birthfile)


    ????

    Thanks..

    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: 6697
    Radio: radio.tequilamockingbirdonline.net:8010/live
    --- SBBSecho 3.04-Win32
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
  • From Digital Man@1:103/705 to Bill McGarrity on Sat Apr 14 23:38:09 2018
    Re: Birthday...
    By: Bill McGarrity to Digital Man on Sun Apr 15 2018 01:48 am

    Re: Birthday...
    By: Digital Man to Bill McGarrity on Sat Apr 14 2018 22:42:26

    Hiya Rob...

    It's the "HappyBirthday" line in the ctrl/text.dat file.

    OK.. great. So there is no way I can replace that with an ansi file... it's text based only?

    You could use the TYPE or INCLUDE @-codes to have SBBS display a text/ANSI file: http://wiki.synchro.net/custom:atcodes#external_content


    digital man

    Synchronet/BBS Terminology Definition #6:
    BinkP = BinkD Protocol
    Norco, CA WX: 64.9oF, 24.0% humidity, 0 mph SW wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.04-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From echicken@1:103/705 to Bill McGarrity on Sun Apr 15 03:38:17 2018
    Re: Birthday...
    By: Bill McGarrity to echicken on Sun Apr 15 2018 02:19:34

    Would something like this work?

    var birthfile = user.birthday + format("birthday.asc",;

    ^ This line would produce an error. 'format' isn't really needed here. The trailing comma and lack of a closing bracket would make the script fail to compile.

    if(file_exists(birthfile))
    console.printfile(birthfile)

    If you want to display a particular .asc/.ans file on the user's birthday, then I think DM's suggestion (@-codes in text.dat to display a file) would be best, and would take the place of these two lines of JS.

    If I wanted to do something more, I would create a script in my mods directory, then set it up as an external program via scfg, and have it Execute on Event - Birthday. Here we'll subtract the user's birthdate from the current date (in milliseconds), and then find out how many years old they are:

    console.printfile(system.text_dir + 'birthday.asc');
    var now = new Date().getTime();
    var ubd = new Date(user.birthdate).getTime();
    var age = Math.floor((now - ubd) / (1000 * 60 * 60 * 24 * 365.25)); console.putmsg('You are ' + age + ' years old!');

    (Date.getTime() returns a timestamp in milliseconds; 'age' is the current time, minus the user's birthdate, divided by the number of milliseconds in a year.)

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    * Synchronet * electronic chicken bbs - bbs.electronicchicken.com
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Daryl Stout@1:103/705 to DIGITAL MAN on Sun Apr 15 07:48:00 2018
    Rob,

    When it's a user's birthday, I know Synch sends them a message wishing th Happy Birthday. That msg, must be within a text file somwhere. Can anyone tell me where to find the file or is it hardwired?

    It's the "HappyBirthday" line in the ctrl/text.dat file.

    And, I can vouch that it showed up for mine. :)

    Daryl

    ---
    * OLX 1.53 * Typhoon Rips Through Cemetery; Hundreds Dead.
    * Synchronet * DoveNet: The Thunderbolt BBS - wx1der.dyndns.org
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Bill McGarrity@1:266/404 to echicken on Sun Apr 15 12:09:00 2018
    echicken wrote to Bill McGarrity on 04-15-18 03:38 <=-

    Re: Birthday...
    By: Bill McGarrity to echicken on Sun Apr 15 2018 02:19:34

    Would something like this work?

    var birthfile = user.birthday + format("birthday.asc",;

    ^ This line would produce an error. 'format' isn't really needed here.
    The trailing comma and lack of a closing bracket would make the script fail to compile.

    Was late last night... that , should have been a ) but I see your point.

    if(file_exists(birthfile))
    console.printfile(birthfile)

    If you want to display a particular .asc/.ans file on the user's
    birthday, then I think DM's suggestion (@-codes in text.dat to display
    a file) would be best, and would take the place of these two lines of
    JS.

    If I wanted to do something more, I would create a script in my mods directory, then set it up as an external program via scfg, and have it Execute on Event - Birthday. Here we'll subtract the user's birthdate from the current date (in milliseconds), and then find out how many
    years old they are:

    console.printfile(system.text_dir + 'birthday.asc');
    var now = new Date().getTime();
    var ubd = new Date(user.birthdate).getTime();
    var age = Math.floor((now - ubd) / (1000 * 60 * 60 * 24 * 365.25)); console.putmsg('You are ' + age + ' years old!');

    (Date.getTime() returns a timestamp in milliseconds; 'age' is the
    current time, minus the user's birthdate, divided by the number of milliseconds in a year.)

    Thanks for the input! I would like to do something more towards your example. Now, if and when I get this js project done, can I comment out (or remove) the Happy Birthday line in the text.dat file or will it play havoc?

    Thanks..


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)
  • From Bill McGarrity@1:103/705 to Digital Man on Sun Apr 15 12:09:00 2018
    Digital Man wrote to Bill McGarrity on 04-14-18 22:42 <=-

    Re: Birthday...
    By: Bill McGarrity to All on Sun Apr 15 2018 01:22 am

    Hiya gang...

    When it's a user's birthday, I know Synch sends them a message wishing them Happy Birthday. That msg, must be within a text file somwhere. Can anyone tell me where to find the file or is it hardwired?

    It's the "HappyBirthday" line in the ctrl/text.dat file.

    Thank you!!


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    * Synchronet * TequilaMockingbird Online - Toms River, NJ
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to Bill McGarrity on Sun Apr 15 14:44:37 2018
    Re: Birthday...
    By: Bill McGarrity to echicken on Sun Apr 15 2018 12:09 pm

    Thanks for the input! I would like to do something more towards your example. Now, if and when I get this js project done, can I comment out (or remove) the Happy Birthday line in the text.dat file or will it play havoc?

    You can't comment-out or remove lines from the text.dat (generally speaking), but setting the line to an emptry string ("") should do the trick. Your script can also change that text.dat item dynamically (without touching the text.dat file) by using the bbs.replace_text() function. See http://synchro.net/docs/jsobjs.html for details - and load('text.js') to get the variable names for each text.dat line loaded into your script.

    digital man

    This Is Spinal Tap quote #34:
    We'd love to stand around and chat, but we've gotta sit down in the lobby Norco, CA WX: 79.0oF, 18.0% humidity, 4 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.04-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Bill McGarrity@1:266/404 to Digital Man on Sun Apr 15 19:11:00 2018
    Digital Man wrote to Bill McGarrity on 04-15-18 14:44 <=-

    Re: Birthday...
    By: Bill McGarrity to echicken on Sun Apr 15 2018 12:09 pm

    Thanks for the input! I would like to do something more towards your example. Now, if and when I get this js project done, can I comment out (or remove) the Happy Birthday line in the text.dat file or will it play havoc?

    You can't comment-out or remove lines from the text.dat (generally speaking), but setting the line to an emptry string ("") should do the trick. Your script can also change that text.dat item dynamically
    (without touching the text.dat file) by using the bbs.replace_text() function. See http://synchro.net/docs/jsobjs.html for details - and load('text.js') to get the variable names for each text.dat line loaded into your script.

    Thank you sir! Things are starting to become easier now that I am somewhat learning the inner workings.

    If I can remember correctly, the text part (line 329) gets displayed before the script I'm running as a logon event under 'birthday' therefore, it will be displayed. I think I'm better off putting in an empty string.


    --

    Bill

    Telnet: tequilamockingbirdonline.net
    Web: bbs.tequilamockingbirdonline.net
    FTP: ftp.tequilamockingbirdonline.net:2121
    IRC: irc.tequilamockingbirdonline.net Ports: 6661-6670 SSL: +6697
    Radio: radio.tequilamockingbirdonline.net:8010/live


    ... Look Twice... Save a Life!!! Motorcycles are Everywhere!!!
    --- MultiMail/Win32 v0.50
    * Origin: TequilaMockingbird Online - Toms River, NJ (1:266/404)