master
Raw Download raw file
 1// ________                                                _________
 2// \________\--------___       ___         ____----------/_________/
 3//     \_______\----\\\\\\   //_ _ \\    //////-------/________/
 4//         \______\----\\|| (( ~|~ )))  ||//------/________/
 5//             \_____\---\\ ((\ = / ))) //----/_____/
 6//                  \____\--\_)))  \ _)))---/____/
 7//                        \__/  (((     (((_/
 8// ヾღ彡                   |  -)))  -  ))
 9// =================================================================
10// is_a_user_made_library.js
11// -----------------------------------------------------------------
12// author:  @archangel
13// SEC LVL: 4 
14// Chars:   ?
15// Descr:   @lib is a user-made library of usefull scripts.
16//          It is by no mean to be blindly trusted. Allways use
17//          scripts.get_level before calling a user script and make
18//          sure that you know the dangers of each security level.
19//          All source code is available at 
20// Syntax:  is_a_user_made_library
21// =================================================================
22
23function (context, args)
24{
25    // we'll wrap the analytics in a try-catch, so that a failure during recording doesn't break the rest of the script
26    try
27    {
28        if (#s.scripts.get_level({name:"soron.arch_data"}) == 4 && #s.scripts.get_level({name:"ada.haxfax"}) == 4) //check SEC LVL
29        {
30            // Those calls are for logging purposes. Check dtr.man{page:"soron.arch_data"} and dtr.man{page:"ada.haxfax"} in-game for more info.
31            #s.soron.arch_data({log:{c:context}});
32            #s.ada.haxfax({log:{c:context}});
33        }
34    }
35    catch (e)
36    {
37        // oh well, we can live with this. Congrats, user-who-is-not-tracked!
38    }
39
40    if(#s.scripts.get_level({name:"dtr.man"}) == 4)
41        return #s.dtr.man({page:"lib.is_a_user_made_library"});
42    else
43        return ""
44}