MentDB, The digital brain.  About me Home
Back / All functions / Server

You have some functions to control the execution of the server.
To learn more about the version of the server, and see the AI ID card.

idai firstnameai lastnamename ai nameshutdownstopversionexceeded sessionsreset exceeded sessions@exceeded sessions@reset exceeded sessionssrc countrefresh treein editor

id

Description

    To get the id of the server

admin
id
mentdb
WLMJ4JpIGAYY

ai firstname

Description

    To show the AI firstname

admin
ai firstname
mentdb
liza

ai lastname

Description

    To show the AI lastname

admin
ai lastname
mentdb
payet

name

Synonymous

    ai name

Description

    To show the AI name

admin
name
mentdb
liza payet

shutdown <identificationCode>

Description

    To stop the server (or stop)

Parameters

    identificationCode:   The identification code - string - required
admin
shutdown "ZVQNt8PJDt1h_"
mentdb
MentDB: Shutdown with successful.
Bye.

Disconnected.

stop <identificationCode>

Description

    To stop the server (or shutdown)

Parameters

    identificationCode:   The identification code - string - required
admin
stop "ZVQNt8PJDt1h_"
mentdb
MentDB: Shutdown with successful.
Bye.

Disconnected.

version

Description

    To show the version of the server

admin
version
mentdb
alpha-0.3.1

exceeded sessions

Description

    To show the number of exceeded sessions

admin
exceeded sessions
mentdb
0

reset exceeded sessions

Description

    To reset the number of exceeded sessions

admin
reset exceeded sessions
mentdb
Exceeded sessions has been reset successfully.

@exceeded sessions

Description

    To show the number of exceeded web socket sessions

admin
@exceeded sessions
mentdb
0

@reset exceeded sessions

Description

    To reset the number of exceeded web socket sessions

admin
@reset exceeded sessions
mentdb
Exceeded sessions has been reset successfully.

src count

Description

    To count the number of Java lines

admin
src count
mentdb
35679

refresh tree

Description

    To refresh the tree in the editor

admin
refresh tree
mentdb

in editor

Description

    To refresh the tree in the editor

admin
in editor {script generate update "brain.stimulate"}
mentdb
j23i88m90m76i39t04r09y35p14a96y09e57t36script update "brain.stimulate" 1 "[str],[level]" {

env set var "[fromUser]" (who;);

if (and (type is_int [level];) (>= [level] 0);) {

#Initialize the stimulation;
stimulation initialize [str];

#Get the last simulation;
include "stimulation.last" "[fromUser]" [fromUser];

env set var "[iStim]" 0;
while (and
(< [iStim] [level];)
(not equal (json select element lastStimulation "/_current_action_";) "CLOSED";);) {

#Make a stimulation;
stimulation click;

#Get the last simulation;
include "stimulation.last" "[fromUser]" [fromUser];

env incr var "[iStim]" 1;

};

stimulation get [fromUser] (- (stimulation size [fromUser];) 1);

} {

#Check the stop level;
if (case
(equal [level] "INITIALIZATION";) {true;}
(equal [level] "BASIC_SEARCH";) {true;}
(equal [level] "SEARCH_STRATEGY";) {true;}
(equal [level] "SEARCH_LOGICAL";) {true;}
(equal [level] "CHECK_RELATION";) {true;}
(equal [level] "GET_LAST_RELATION";) {true;}
(equal [level] "EXECUTE_RELATION_RS";) {true;}
(equal [level] "EXECUTE_RELATION_RA";) {true;}
(equal [level] "EXECUTE_RELATION_RL";) {true;}
(equal [level] "REDIRECTION_RELATION";) {true;}
(equal [level] "RELATION_RESPONSE";) {true;}
(equal [level] "RELATION_REDIRECTION";) {true;}
(equal [level] "CLOSED";) {true;}
{false};) {

#The stop level is valid;

#Initialize the stimulation;
stimulation initialize [str];

#Get the last simulation;
include "stimulation.last" "[fromUser]" [fromUser];

while (and
(not equal (json select element lastStimulation "/_current_action_";) [level];)
(not equal (json select element lastStimulation "/_current_action_";) "CLOSED";);) {

#Make a stimulation;
stimulation click;

#Get the last simulation;
include "stimulation.last" "[fromUser]" [fromUser];

};

stimulation get [fromUser] (- (stimulation size [fromUser];) 1);

} {

#The stop level is not valid;
exception (1) ("The stop level is not valid (INITIALIZATION | BASIC_SEARCH | SEARCH_STRATEGY | SEARCH_LOGICAL | CHECK_RELATION | GET_LAST_RELATION | EXECUTE_RELATION_RS | EXECUTE_RELATION_RA | EXECUTE_RELATION_RL | REDIRECTION_RELATION | RELATION_RESPONSE | RELATION_REDIRECTION | CLOSED).");

};

};

};




© 2012-2017 - Jimmitry Payet.