• .ssjs question

    From Scottie@VERT/THE to All on Sat Apr 19 20:38:00 2008
    i have a simple question.

    is it possible to add a piece of script to a .ssjs file that i have made to only allow age, sex, or user config restrictions/exemption?

    i have made another set of menus from an option off the leftnav and i would like to know if there was a line of script that i can insert into the sub menu(s) so that i can restrict access to those .inc pages.

    example:

    <leftnav>
    who's online
    login
    new user
    message area
    file area
    < Chatrooms > -------< chatroom1 > (general)
    -------< chatroom2 > (special) <----this would be protected
    -------< chatroom3 > (special) <----this would be protected

    if there is a way, will someone post it so that i know what to put in the
    .ssjs file?

    scottie
    the.synchro.net



    ---
    þ Synchronet þ The Electrical Connection - the.synchro.net
  • From Mindless Automaton@VERT/ELDRITCH to Scottie on Thu May 1 00:16:00 2008
    Scottie wrote:

    only allow age, sex, or user config restrictions/exemption?

    menu(s) so that i can restrict access to those .inc pages.

    lets see.. you could try something like this in leftnav.inc:

    @@JS:if(user.gender==1)'<a href="@@ftp_url@@%%ftpidx%%">File
    Libraries</a>';@@

    Which would theoretically display the File Libraries link if
    the user's gender is male or whatever 1 equals.

    The others restricts would be something like:

    (user.security.restrictions&UFLAG_G)

    (user.age>=18 && user.age<=21)

    I didn't test them out though, so you may need to mangle it some more.

    -Mindless Automaton
    ---
    þ Synchronet þ Eldritch Clockwork BBS - eldritch.darktech.org