Installation


This script works on servers Verlihub, PtokaX, RusHub and Eximius. At desire it is possible to add almost any localisation for any other server supporting LUA 5.1.x. Before script start it is necessary to set the necessary localisation in the script. For this purpose open script in the text editor and in the configuration block find a line:
--<<>><<>><<>> текущая версия API/Current API: <<>><<>><<>> (задать значение/set value)
Further to constant localization text value is appropriated. Variants: "rushub", "verlihub", "ptokax04" or "eximius". Thus script switching on the necessary localisation which will be loaded from kind files <localosation_name>.lua, located in bot folder.

At the adjusting distribution kit there are four variants of the menu of hub for four types of localisation (HubMenu.lua.rushub, HubMenu.lua.ptokax04, HubMenu.lua.verluhub and HubMenu.lua.eximius). Simply rename necessary to HubMenu.lua. At the first start if the file of the Hub menu is not found out, the script itself will try to find suitable file of the Hub menu and to rename it.

Also, if the system codepage does not match the encoding used by the server and displays the date the Cyrillic alphabet is distorted, then uncomment the main script correcting code encoding system date function:

original_osdate=os.date
os.date = function(...)
    local str=original_osdate(...) or ""
    if type(str)=="string" then
        for l in pairs(CodePages["utf8"] or {}) do str=str:gsub(l,CodePages["utf8"][l]) end
        return (loadstring("return \""..(str or "").."\"") or function() end)() or ""
    end
    return str
end --фикс функции даты для перекодировки юникода --unicode os.date data replacement

Set for constant DefaultLang default language value (the two characters in lowercase language present in the table EkzekutorLangs, which is supported by bot and plug-ins):

DefaultLang = "ru" -- язык по умолчанию -- default language

VerliHub

Set to constant localization value "verlihub". It will look so:

--<<>><<>><<>> текущая версия API/Current API: <<>><<>><<>> (задать значение/set value)
localization = "verlihub" -- ("rushub", "verlihub", "ptokax04", "eximius")

--<<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>>

Now pay attention to file of settings MySettings. Here are stored the basic settings of script which after the first start and at the subsequent operation remain in text file Config.cfg. It is necessary, that in the field FName the way to folder of script with files has been sets. By default this folder is Ekzekutor. There some necessary for work files are stored and in it all files and bases with which the script works are remain. So, set way to script folder (necessarily with slash on the end), for example:

["FName"]="/etc/verlihub/scripts/Ekzekutor/",  -- имя папки -- bot folder path
(this example for Unix). Also in table MySettings there are many other settings about which it will be told after. The majority of them varies through the menu and script commands.

After that the script will be ready to the first start. After start he will create files with which will work in the own folder. Also before start (if you use LuaSocket) set value to constant UseLuaSocket in top of file verlihub.lua:

UseLuaSocket = 0 -- использовать ли LuaSocket (1-да,0-нет) -- use LuaSocket (1-yes,0-no)
If sets value 1, that will be used the libraries of LuaSocket for work of some functions of script. Otherwise will be used utilities: dig, host, iconv, gunzip and curl (for Unix-systems). Utility iconv should be in any case if not used the local table of chars encoding (about it in the paragraph of settings). Necessarily install all listed utilities if do not use LuaSocket.

Also at once it is necessary to tell that in localisation VerliHub if you wish to use plugin automatic registration of users, it is necessary to establish values to variables of global configuration of the Hub autoreg_class and use_reglist_cache to 1 (or desirable class for automatic registration) and 0 accordingly (commands !set autoreg_class 1 and !set use_reglist_cache 0).


PtokaX

The bot menu is by default calculated on creation in PtokaX following profiles in decreasing order of powers (from top to down in the editor of profiles):
NetFounder, Master, Moderator, Operator, VIP, Reg. That is classes 0, 1, 2, 3, 4, 5 accordingly.
Names of profiles are not important, is important order and quantity. Create classes in such order and set it privileges. If you has standard profiles simply add lacking. Thus, the registered user should be with index 5. If at you other profiles and you do not wish to alter them according to these "defaultes" then edit files menu of Boat, Hub and available plugins (HubMenu.lua, BotMenu.lua, Menu.lua (in plugins)), having established permissions for commands according to your profiles. For editing it is possible to use plugin of menu editing. Permissions on profiles for commands of the specified localisation are in the following block in menu files:

["PROFILES"]={
["ptokax04"]={
[profile_number] = 1,
},
},
Ekzekutor will forbid to use current command for the profiles which have been not specified in this table of permissions. If the profile is present at the list, but with value 0, to user it will not be sent the menu of this command.

Set to constant localization value "ptokax04". It will look so:

--<<>><<>><<>> текущая версия API/Current API: <<>><<>><<>> (задать значение/set value)
localization = "ptokax04" -- ("rushub", "verlihub", "ptokax04", "eximius")

--<<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>>

Now pay attention to file of settings MySettings. Here are stored the basic settings of script which after the first start and at the subsequent operation remain in text file Config.cfg. It is necessary, that in the field FName the way to folder of script with files has been sets. By default this folder is Ekzekutor. There some necessary for work files are stored and in it all files and bases with which the script works are remain. So, set way to script folder (necessarily with slash on the end), for example:

["FName"]="C:/Server/", -- имя папки -- bot folder path
It is not necessarily to sets the folder path. It is necessary to arrange bot folder in the same folder, where also script. By default at the first start the script will try to find folder Ekzekutor in folder for scripts server and itself will register the path (if configuration file does not exists). Also in table MySettings there are many other settings about which it will be told after. The majority of them varies through the menu and script commands.

After that the script will be ready to the first start. After start he will create files with which will work in the own folder. Also before start (if you non use LuaSocket) set value to constant UseLuaSocket in top of file ptokax04.lua:

UseLuaSocket = 0 -- использовать ли LuaSocket (1-да,0-нет) -- use LuaSocket (1-yes,0-no)
If sets value 1, that will be used the libraries of LuaSocket for work of some functions of script. Otherwise will be used utilities: dig, host, iconv, gunzip and curl (for Unix-systems). Utility iconv should be in any case if not used the local table of chars encoding (about it in the paragraph of settings). Necessarily install all listed utilities if do not use LuaSocket.

At once it is necessary to notice that in localisation PtokaX Bot used the LuaSocket 2.0.2 (PXLuaSocket-2.0.2.rar in the script distribution kit). Files and folders of this package from archive should be placed in folder with an executive file of server PtokaX.exe (to unpack archive about folder with server) or in the libs folder.

Pay attention to script UnknownCommandBlock_PtokaX.lua, which has in the distribution kit. This is "cutter". It is necessary not to pass unknown commands in chat (as in Verlihub). This script should settle down at the very end of the list of scripts (with the lowest priority). Commands which should pass cutter, are brought in the table of exceptions exeptions inside the script.

Eximius

The bot menu is by default calculated on creation in Eximius following profiles in decreasing order of powers (from top to down in the editor of profiles):
hubowner, master, moderator, operator, vip, reg, user. That is classes 0, 1, 2, 3, 4, 5, 6 accordingly.
Names of profiles are not important, is important order and quantity. Create classes in such order and set it privileges. If you has standard profiles simply add lacking. Thus, the registered user should be with index 5. If at you other profiles and you do not wish to alter them according to these "defaultes" then edit files menu of Boat, Hub and available plugins (HubMenu.lua, BotMenu.lua, Menu.lua (in plugins)), having established permissions for commands according to your profiles. For editing it is possible to use plugin of menu editing. Permissions on profiles for commands of the specified localisation are in the following block in menu files:

["PROFILES"]={
["eximius"]={
[profile_number] = 1,
},
},
Ekzekutor will forbid to use current command for the profiles which have been not specified in this table of permissions. If the profile is present at the list, but with value 0, to user it will not be sent the menu of this command.

Set to constant localization value "eximius". It will look so:

--<<>><<>><<>> текущая версия API/Current API: <<>><<>><<>> (задать значение/set value)
localization = "eximius" -- ("rushub", "verlihub", "ptokax04", "eximius")

--<<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>>

Now pay attention to file of settings MySettings. Here are stored the basic settings of script which after the first start and at the subsequent operation remain in text file Config.cfg. It is necessary, that in the field FName the way to folder of script with files has been sets. By default this folder is Ekzekutor. There some necessary for work files are stored and in it all files and bases with which the script works are remain. So, set way to script folder (necessarily with slash on the end), for example:

["FName"]="C:/Server/",  -- имя папки -- bot folder path
It is not necessarily to sets the folder path. It is necessary to arrange bot folder in the same folder, where also script. By default at the first start the script will try to find folder Ekzekutor in folder for scripts server and itself will register the path, it configuration file does not exists. Also in table MySettings there are many other settings about which it will be told after. The majority of them varies through the menu and script commands.

After that the script will be ready to the first start. After start he will create files with which will work in the own folder.

Pay attention to script UnknownCommandBlock_Eksimius.lua, which has in the distribution kit. This is "cutter". It is necessary not to pass unknown commands in chat (as in Verlihub). This script should settle down at the very end of the list of scripts (with the lowest priority). КCommands which should pass cutter, are brought in the table of exceptions exeptions inside the script.

By default in the Hub menu "native" commands of server are not added. The menu of the server is used. If there is desire to make the Hub menu separately in the menu fill this file by rules of creation of files of the menu.

RusHub

For work in this localisation Ekzekutor uses auxiliary scripts. For system of registration and profiles used script FirstRusHubBot.lua (should be in folder scripts) - author Nickolya, page: http://mydc.ru/topic2878.html?hl=FirstRusHubBot. For ban system used script BanManager.lua (should be in folder scripts) and module Ban.lua (should be in folder libs) - author Wariner (fixes by Setuper), page: http://mydc.ru/topic2885.html?hl=BanManager. These scripts should be loaded before Ekzekutor (the start priority is established in file scripts.xml).
The bot menu is by default calculated on creation in FirstRusHubBot.lua script following profiles in decreasing order of powers:
administrator, master, moderator, operator, VIP, user, guest. That is classes 0, 1, 2, 3, 4, 5, -1 accordingly. This is profiles table example:

tProfiles = {
    [0] = {
        tNames = {"administrator", "administrator"},
        bHaveKey = true,
    },
    [1] = {
        tNames = {"master", "master"},
        bHaveKey = true,
    },
    [2] = {
        tNames = {"moderator", "moderator"},
        bHaveKey = true,
    },
    [3] = {
        tNames = {"operator", "operator"},
        bHaveKey = true,
    },
    [4] = {
        tNames = {"VIP", "VIP"},
    },
    [5] = {
        tNames = {"user", "user"},
    },
    [-1] = {
        tNames = {"guest", "guest"},
    },
}

Names of profiles are not important, is important order and quantity. Create classes in such order and set it privileges. If you has standard profiles simply add lacking. Thus, the registered user should be with index 5. If at you other profiles and you do not wish to alter them according to these "defaultes" then edit files menu of Boat, Hub and available plugins (HubMenu.lua, BotMenu.lua, Menu.lua (in plugins)), having established permissions for commands according to your profiles. For editing it is possible to use plugin of menu editing. Permissions on profiles for commands of the specified localisation are in the following block in menu files:

["PROFILES"]={
["ptokax04"]={
[profile_number] = 1,
},
},
Ekzekutor will forbid to use current command for the profiles which have been not specified in this table of permissions. If the profile is present at the list, but with value 0, to user it will not be sent the menu of this command.

Set to constant localization value "rushub". It will look so:

--<<>><<>><<>> текущая версия API/Current API: <<>><<>><<>> (задать значение/set value)
localization = "rushub" -- ("rushub", "verlihub", "ptokax04", "eximius")

--<<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>><<>>

Now pay attention to file of settings MySettings. Here are stored the basic settings of script which after the first start and at the subsequent operation remain in text file Config.cfg. It is necessary, that in the field FName the way to folder of script with files has been sets. By default this folder is Ekzekutor. There some necessary for work files are stored and in it all files and bases with which the script works are remain. So, set way to script folder (necessarily with slash on the end), for example:

["FName"]="C:/Server/", -- имя папки -- bot folder path
It is not necessarily to sets the folder path. It is necessary to arrange bot folder in the same folder, where also script. By default at the first start the script will try to find folder Ekzekutor in folder for scripts server and itself will register the path, if configuration file does not exists. Also in table MySettings there are many other settings about which it will be told after. The majority of them varies through the menu and script commands.
After that the script will be ready to the first start. After start he will create files with which will work in the own folder. Also before start (if you not use LuaSocket) set value to constant UseLuaSocket in top of file rushub.lua:
UseLuaSocket = 0 -- использовать ли LuaSocket (1-да,0-нет) -- use LuaSocket (1-yes,0-no)
If sets value 1, that will be used the libraries of LuaSocket for work of some functions of script. Otherwise will be used utilities: dig, host, iconv, gunzip and curl (for Unix-systems). Utility iconv should be in any case if not used the local table of chars encoding (about it in the paragraph of settings). Necessarily install all listed utilities if do not use LuaSocket.

At once it is necessary to notice that in localisation RusHub Bot used the LuaSocket 2.0.2 (luasocket_2.0.2.rar in the script distribution kit). Files and folders of this package from archive should be placed in folder libs.

Pay attention to script UnknownCommandBlock_RusHub.lua, which has in the distribution kit. This is "cutter". It is necessary not to pass unknown commands in chat (as in Verlihub). This script should settle down at the very end of the list of scripts (with the lowest priority). Commands which should pass cutter, are brought in the table of exceptions exeptions inside the script.

<<< back | print | To main...
PhazaSoft© Ekzekutor©