Ekzekutor support script

Asked by Alexey Solomin

Can support script http://phazasoft.narod.ru/ekzekutor/ I, however, and many others to run this monster on the bridge failed.

Question information

Language:
English Edit question
Status:
Solved
For:
ADCH++-PtokaX Edit question
Assignee:
No assignee Edit question
Solved by:
poy
Solved:
Last query:
Last reply:
Revision history for this message
poy (poy) said :
#1

hi,

i just tried the script and it loads correctly: it changes the hub title, sends me some info when i log in, and sends me a large user command menu.

all i had to do was extract the .rar in the directory that contains my PtokaX scripts (px/Ekzekutor) then load the script with the command: +pxadd px/Ekzekutor/Ekzekutor.lua

it all seems to work fine, although i haven't tested it much. are there specific parts of the script that are not working?

Revision history for this message
Alexey Solomin (a-rainman) said :
#2

Good day
I'm sorry, figured why not work the script randomly replaced the bridge configuration (ADCH++ runs as a service and the withdrawal was not visible at all). But now after installing the parameter has getting strange error:
Error loading file: adchpp-ptokax.lua:63: attempt to call field 'add_setting' <a nill value>

In the config it right

access.add_setting('px_port', {
 help = '[' .. full_name .. '] TCP port this hub is listening on',

 value = 412
})

ps: just in case, checked that even with all the good ways: Rename the script file and it could not load with the error "file not found".

Revision history for this message
Alexey Solomin (a-rainman) said :
#3

In any case, the script rev 88, ADCH++ 2.7.0

Revision history for this message
Best poy (poy) said :
#4

looks like your access.lua is too old or corrupted; make sure it contains the add_setting function.

Revision history for this message
Alexey Solomin (a-rainman) said :
#5

Thank you, I realized there was a problem with access.lua, I upgrade ADCH++ has not updated the list of connected script.

Perhaps this is obvious, but my problem is solved only after the prescription of all scripts from the sub-folders adds in the config Script.xml. It would be nice to add a more detailed description of installation manual.

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--Ensure that you load the scripts in this order so that they work correctly.-->
<ScriptPlugin>
  <Engine language="lua" scriptPath="Scripts/">
    <Script>access.lua</Script>
    <Script>access.bans.lua</Script>
    <Script>access.limits.lua</Script>
    <Script>access.op.lua</Script>
    <Script>access.bot.lua</Script>
    <Script>ltn12.lua</Script>
    <Script>mime.lua</Script>
    <Script>socket.lua</Script>
    <Script>socket\http.lua</Script>
    <Script>socket\ftp.lua</Script>
    <Script>socket\smtp.lua</Script>
    <Script>socket\tp.lua</Script>
    <Script>socket\url.lua</Script>
    <Script>adchpp-ptokax.lua</Script>
    <Script>history.lua</Script>
    <!--Script>motd.lua</Script-->
  </Engine>
</ScriptPlugin>

So just in case I write to spread the files from the archive:

ADCH\lfs.dll
ADCH\socket\core.dll
ADCH\mime\core.dll

ADCH\scripts\ltn12.lua
ADCH\scripts\mime.lua
ADCH\scripts\socket.lua

ADCH\scripts\socket\ftp.lua
ADCH\scripts\socket\http.lua
ADCH\scripts\socket\smtp.lua
ADCH\scripts\socket\tp.lua
ADCH\scripts\socket\url.lua

Thank you for the development and help to raise the bridge between the world NMDC and the world ADC. I really hope this will help speed up the disposal of NMDC protocol. :)

Revision history for this message
Alexey Solomin (a-rainman) said :
#6

Thanks poy, that solved my question.

Revision history for this message
poy (poy) said :
#7

it is not necessary to add all the socket scripts in Script.xml, as long as they can be found by standard paths when PtokaX scripts ask for them.

here is the structure of my binary directory:

.:
Bloom.dll alua.dll libaboost_date_time.a lua
Script.dll certs libaboost_system.a luadchpp.dll
_pyadchpp.pyd config libadchpp.a mime
aboost_date_time.dll lfs.dll libalua.a pyadchpp.py
aboost_system.dll libBloom.a libgcc_s_dw2-1.dll socket
adchpp.dll libScript.a libluadchpp.a
adchppd.exe lib_pyadchpp.a libstdc++-6.dll

./certs:
cacert.pem dhparam.pem privkey.pem trusted

./certs/trusted:

./config:
Script.xml adchpp.xml history.txt motd.txt users.txt
adchpp-ptokax.txt bans.txt logs settings.txt

./lua:
ltn12.lua mime.lua socket socket.lua

./lua/socket:
ftp.lua http.lua smtp.lua tp.lua url.lua

./mime:
core.dll

./socket:
core.dll

Revision history for this message
Alexey Solomin (a-rainman) said :
#8

Yes you are right that the inclusion of every script is redundant, really the best comment out everything without which it can operate normally. Accordingly, it will reduce the load on the hub.

Works fine
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!--Ensure that you load the scripts in this order so that they work correctly.-->
<ScriptPlugin>
  <Engine language="lua" scriptPath="Scripts/">
    <Script>access.lua</Script>
    <Script>access.bans.lua</Script>
    <Script>access.limits.lua</Script>
    <Script>access.op.lua</Script>
    <Script>access.bot.lua</Script>
    <!--Script>ltn12.lua</Script-->
    <!--Script>mime.lua</Script-->
    <Script>socket.lua</Script>
    <Script>socket\http.lua</Script>
    <!--Script>socket\ftp.lua</Script-->
    <!--Script>socket\smtp.lua</Script-->
    <!--Script>socket\tp.lua</Script-->
    <!--Script>socket\url.lua</Script-->
    <Script>adchpp-ptokax.lua</Script>
    <Script>history.lua</Script>
    <Script>motd.lua</Script>
  </Engine>
</ScriptPlugin>

Revision history for this message
grinder (gurinderu) said :
#9

Ekzekutor developer aware of the problem and adchpp is working on it.
There are problems with the lua and utf-8. If you can help, please.

Revision history for this message
poy (poy) said :
#10

hey grinder,

i would certainly be willing to make any appropriate changes in ADCH++-PtokaX if support for this script is not optimal. as you can see above, however, it seems to be working fine on my side.

it would help if you could detail the problems you are facing.

regarding encoding, i believe ADCH++-PtokaX already tries its best to handle different encodings. i actually always test it with esoteric nicks that require encoding conversions. if there is a problem on this side, feel free to explain it and i'll be happy to fix it.

Revision history for this message
Neolo (neolo7) said :
#11

Hi. I'm using rev619 of ADCH++ from svn, compiled with Ptokax bridge, all files and folders in ADCH++ root directory as described in manual, bridge loaded seems fine, but cannot load Ekzecutor bot.
I placed it in /scripts/px/ (Folder Ekzecutor and file Ekzecutor.lua, which is default from unrared file)

After command +pxadd px/Ekzekutor.lua

I facing heavy flood for a while in main chat:
...
[23:26:04] <TestHub> $To: Neolo From: $<Bot> *** Sat Oct 20 16:26:14 2012 No data for output.adchpp-ptokax.lua:1678: Error loading the module "socket" via "require"
[23:26:04] <TestHub> $To: Neolo From: $<Bot> *** Sat Oct 20 16:26:14 2012 No data for output.adchpp-ptokax.lua:1678: Error loading the module "socket" via "require"
...

and in console I see next:

2.8.1 (r0) Release running, press ctrl-c to exit...
2, 4: adchpp-ptokax.lua:1391: attempt to index field 'sub' (a nil value)
stack traceback:
 adchpp-ptokax.lua:1391: in function 'unload_script'
 adchpp-ptokax.lua:1897: in function 'call'
 adchpp-ptokax.lua:1378: in function 'load_script'
 adchpp-ptokax.lua:114: in function 'command'
 access.lua:1653: in function 'handle_plus_command'
 access.lua:1666: in function 'v'
 access.lua:1724: in function 'onReceive'
 access.lua:1744: in function <access.lua:1743>

My OS is CentOS 6, lua-socket installed via yum, folder called "socket" with "core.so" inside is located in /etc/adchpp

What's wrong with it? Thank you.

Revision history for this message
poy (poy) said :
#12

hey Neolo,

i'm not on Linux at the moment so can't test for sure; but on Windows, Ekzekutor is still working correctly for me. i extracted as specified in my first comment on this thread.

it seems your script can't load the socket module. it should have been compiled along with ADCH++; the "bin" built directory should contain mime/core.so, socket/core.so as well as an "lua" directory with lua socket files.

lua socket is not to be retrieved with yum; you want to use the version compiled with ADCH++.

Revision history for this message
Neolo (neolo7) said :
#13

I did exactly as you said. My ADCH++ compiled with yours archives for linux and I got those folders - mime, socket and lua with all stuff inside. I placed them in /etc/adchpp. Script located in /etc/adchpp/scripts/px/Ekzecutor.lua and it's folder near too (in new versions of this bot executable lua file separated from it's folder) so it's not like in a 1st post. Maybe because newer version of it, that's why I can't run it?

Revision history for this message
Neolo (neolo7) said :
#14

Anybody??