Main script inner functions


Exceptions

Exceptions serve for entering of users in the list which will not be processed by antifloor, antiadvertising and will not be checked by gear of triggers and autoreplacements. The list of these users stored in file TableName in the Bot's folder. Nick-exceptions available in table TableName[nick].
To add the user in exceptions, it is necessary by command !exceptions+ <nick>. To remove the user from exceptions possible by command !exceptions- <nick>. The list of all users in an exception by command !exceptions.

Restarting on error occured

This function allows to reboot script after occurrence of any error in a script. Thus the report on the arisen error is sent to the Op-chat. Enable/disable this function possible by command !ekzekutor_restartonerror.

Last chat messages log

This function serves for storing of last messages of chat and their sending in PM or chat to entering users. The quantity of remembered messages is adjusted by command !lastmsgcount <count>. Enable/disable this function possible by command !lastmsgchat <type>. The type of sending of messages: 0 - Chat, 1 - PM, 0 - off. To see last messages it is possible also by command !getlastmsg.

Hot reboot

Reboots options and all tables of script (hot reboot). By command !ekzekutor_reload in chat or !reload in PM.

Information greeting

In the given script there is possibility to deduce to the user at connection the information which maintenance is set by script in folder welcome. The script name corresponds to the name of current localisation. If in this folder there is no script with the name of the necessary localisation (with extention addition .lua), then is deduced nothing. The greeting can sends to chat or PM to the user. Switching mode of sending is made by command !welcometype <type>. Type can be 1 (Chat) or 2 (PM). If type sets to 0 function will be disable. File format:

function getwelcomemessage(curUser)
    ...
    return "text"
end

Possible set individual welcomeinfo files for classes with name localisation_lang.lua, where localisation - current server type, lang - language. This file checks before checking the main welcomeinfo file and if exists it proceed. File format:

function (curUser)
    ...
    return "text"
end

Text files

This function serves for conclusion to the user of the text from the text file which name coincides with the command entered by the user (with extention addition .txt). Text files should be stored in folder txt. When the entered command corresponds to the name of one of available text files, in PM contents of this file are sent to the user. Enable/disable this function possible by command !txtseek <type>. The type of sending of text file can be 1 - Chat, 2 - PM, 0 - off. In the text possible use multilingual insertions as in the menu files: gl{Type_index}, described in the multilingual Bot's features.

Imperceptible gag (maskgag)

This function is "gag", only difference from usual "gag" that "maskgagged" the user does not guess that it is not audible. From its party all looks so that simply nobody pays to it of attention and to it do not answer (effectively against inadequate users with the dynamic IP-address). It is possible to specify as nick, and the IP-address for entering into the list of maskgaged. Thus it is possible to include possibility to operators of the Hub to hear such users, And also possibility to disconnect audibility the muffled users the general chat (thus they have an impression that simply all are silent also anybody with them does not communicate). The list of the muffled is stored in file MaskGagged. To muffle the user on the set number of minutes it is possible by command !maskgag <nick/IP> <minutes>. To remove maskgag from the user it is possible by command !unmaskgag <nick/IP>. To look the list muffled it is possible by command !maskgags. Enable/disable mode of audibility operators of the Hub muffled it is possible by command !oplistengag. Enable/disable an audibility mode muffled the general chat it is possible by command !mglisten.

Shell and LUA console

Function allows chief managers of the Hub to get access to the system console or interpreter LUA through PM to Bot. Be thus attentive, if use the system console, As if you start the program which will not return management (will not come to the end right after start) the script will expect return of management and will be "based". If the program (service) returns the text in standard stream of IO it will be sent in PM to the user. At LUA-console use the text entered by the user is passed through interpreter LUA. If any text in standard IO it goes in PM to the user comes back. That function was active, it is necessary, that to constant isShellEnable in the block of options of script text value has been appropriated. This text is the password for access to this function. If empty value is set (""), then console function will be disabled. For start system consoles need to be entered in PM to the Bot command !shell <password>. For LUA-console start it is necessary to enter !lua <password>. For end of work with the console it is necessary to enter command !stop. The command shell function can not work on windows OS due functional limitations of these systems.

Commands aliaces

Function serves for creation to commands of the Bot of pseudonyms. Each command can have some pseudonyms for choice administrations. Pseudonyms are stored in file cmdAliasesTable. If the command which is set as pseudonym for any command the Bot checks this command as command for which the current command is pseudonym is used. To add pseudonym for the chosen command it is possible by command !setcmdalias <command> <alias>. To remove pseudonym for command it is possible by command !delcmdalias <alias>. To look the list of all pseudonyms for commands it is possible by command !cmdaliases.

Allowed nick letters

It is the list of symbols which are resolved for nicks (it is used, for example, by a plugin with nicks checking). To look the list it is possible by command !allowchars without the parameters. To add a symbol in the list allowes it is possible by command !allowchars + <symbol>. To remove a symbol from the list allowes it is possible by command !allowchars - <symbol>.

Time and date in the list of users

Function serves for display at the top of the users list of current time and date. In script in the table clockFormat the format of display hours and date is set. Enable/disable this function possible by command !isclock.

First run date (birthday)

At the first start the Bot marks time and brings mark when it has been started the first time in file of options. The mark represents number of seconds, the past from "the epoch" beginning (01.01.1970). To look date of the first start it is possible by command !birthday.

Insert your own code

You can add your own code to the files in Bot's folder, which are processed at startup. File MyCodePreLoad.lua loaded before loading plugins and file MyCodePostLoad.lua loadind after. It is convenient to add their own functions, override the values of variables, replace the functions on their own and etc.

Continuously menu sending by request

By default sets the menu sending mode by request by clicking on the appropriate item in the user menu, the text of which is specified in the file of language localization Bot_lang.lua. Sending made portionly. Portion size is defined in constant iMenuDividerFactor. Sending mode for Bot and Hub menus sets in constants isSendBotMenu and isSendHubMenu. If value sets to -1 corresponding menu is not sent. Value 1 mean immediate sent at the login (not recommended for large menu mean increased traffic and possible clients disruptions). Value 0 means sending by request. Constant isMixMenus defines the mix of the Bot and Hub menus in one point for sending (1 - yes, 0 - no). If active multilingual features in the menu query, you must specify the language (2 characters), if the user has not saved his language.

Multilingual functions

Bot has possibility to work with users in their own language individually. Language of registered users, if plugin types of accounts is active, stored. Default language sets in constant DefaultLang in the form of two lowercase letters. This language should be supported by all the language localization files and appear in the table with list of languages EkzekutorLangs. Change/define own language by command !lang <lang>. Activity multilingual functions are defined in constant isMultilingual (1 - active, 0 - default language only). Text in different languages for Bot is in the file Bot_lang.lua; for Hub - Hub_lang.lua; for plugins - in plugin's folder in the file Text_lang.lua.


<<< back | print | To main...
PhazaSoft© Ekzekutor©
Hosted by uCoz