Posted December 24, 2008 The Lua Plugin comes equipped with multiple different script files that will be useful for 1.2.0 users. How it install Simply extract the rar file to the root ApexDC++ folder, so the plugins and script folders are below it. Download: New version is here. ;) Share this post Link to post Share on other sites
Posted December 24, 2008 don't see any changes after loading. Why? maybe some kind of manual will be posted here? Share this post Link to post Share on other sites
Posted December 24, 2008 don't see any changes after loading. Why? maybe some kind of manual will be posted here? If you do it correctly then the LUA plugin should tell you to restart ApexDC++ since the LUA plugin specifically is built so that it has to be present from the very start of the session (or rather startup.lua has been made in that manner). Share this post Link to post Share on other sites
Posted December 25, 2008 yep, it said about restart. I've restarted apexdc, and see to changes. Share this post Link to post Share on other sites
Posted December 25, 2008 Is there any documentation for this plugin? What exactly does it do? Share this post Link to post Share on other sites
Posted December 25, 2008 provides bcdc++ compatible scripting api Share this post Link to post Share on other sites
Posted December 25, 2008 basically, if you don't know what LUA is then this won't be of much use to you... Share this post Link to post Share on other sites
Posted December 25, 2008 andyevil , the lua plugin is a way of running lua scripts in the client. If you do not load any scripts - there will not be any difference. Share this post Link to post Share on other sites
Posted December 25, 2008 ok, just tell me how? =) I don't see anything new (I do not mean Plugins etc) about lua. How to load scripts? What is scripts api? Share this post Link to post Share on other sites
Posted December 26, 2008 possibly not doing this right, but is startup.lua even parsed? typing 'bier', '/uptime show' etc and the things that the scripts specify, don't seem to have any effect.. Share this post Link to post Share on other sites
Posted December 26, 2008 possibly not doing this right, but is startup.lua even parsed? typing 'bier', '/uptime show' etc and the things that the scripts specify, don't seem to have any effect.. [13:16:28] <ADCPortal Support Hub> (uptime.lua) /uptime [show] [13:16:29] <ADCPortal Support Hub> (adccommands.lua) /nick <nick> It is parsed... I have just commented out all the includes at the bottom of startup.lua by default... Share this post Link to post Share on other sites
Posted December 27, 2008 That's it! I've uncomented load of some scripts and yahoo! it works! thx. btw, I think you should add info about it somewhere :blushing: Share this post Link to post Share on other sites
Posted December 31, 2008 I placed the folders, then run apexdc, after that i see the Clientside lua scripting on the plugins menu, but nothing more happens. I guess, the startup.lua script start other scripts witch in the \Scripts folder, but it won't do... If i will write a new script, i had to place it to the script folder, but if i want to start it, i shoud edit the end of the startup.lua file like this? --dofile( DC():GetAppPath() .. "scripts\\myscript.lua" ) I will try to write an antispam script, because the ignore command not work on bots, and after several years of DC usage, i simply don't want to get PM's like "/fav" or advertisments... Share this post Link to post Share on other sites
Posted December 31, 2008 the "--" make the line a comment, so in order to load a script you should type the line without those... Share this post Link to post Share on other sites
Posted December 31, 2008 the "--" make the line a comment, so in order to load a script you should type the line without those... OMG, i won't see that! Tryd without te --, but nothing seems to be changed. Share this post Link to post Share on other sites
Posted January 1, 2009 Hi there guys, long see no time >.< dunno if it is reported yet but i noticed that the timer isn't working yet and for the rest keep up the good work lua is good to have in a client ;-) geetings Daywalker Share this post Link to post Share on other sites
Posted January 1, 2009 Patch you should look into the scripts folder, there is one called ignore.lua, maybe that does what you want Share this post Link to post Share on other sites
Posted January 1, 2009 Patch you should look into the scripts folder, there is one called ignore.lua, maybe that does what you want "ignore.lua -- makes possible to (un)ignore someone from the chat" It's works from an ignorelist. Witch i mentioned is scan the pm text for unwanted words like viagra,sex,fav or too mutch lines... Share this post Link to post Share on other sites
Posted January 2, 2009 There is one kind of antispam filter, witch monitorize the nubmer of lines in pm, and if the number is biger than 1, it's block the PM, and put it's sender's nick and the massage to the main chat of the sender's hub. (not sends, just you will see) When i'm usingDC++, i'm online in 25-30 hubs, that means 15 unwanted PM's. The script i uplaoaded (why can't upload .lua diretctly?) is block 12 PM from 15. Not bad for first try, but it's need some work... I think it will be good an on/off switch, max line definition "on the fly", word search (/fav). So if someboy have ideas, pls. post it. The script tested on actual version of bcdc++ EDIT: works with ApexDC++ 1.2.0b!!! - pictures included --based on lwolf's script, edited by Patch local maxline = 2 local hubtofilter = "" dcpp:setListener( "pm", "antispam", function( hub, user, text ) local ret = false if string.find(string.lower(hub:getHubName()),hubtofilter) then local sorveg = 0 if string.find(text,"\n") then local fpos = 1 local apos = 0 while fpos do apos = apos + 1 fpos = string.find(text,"\n",apos) apos = fpos sorveg = sorveg + 1 if sorveg >= maxline then ret = true hub:addLine("PM blocked from " .. DC():ToUtf8(user:getNick()) .." **" ) hub:injectChat("PM text: " .. text .." **" ) DC():PrintDebug( " ** " .. "PM blocked from " .. DC():ToUtf8(user:getNick()) .." **" ) break end end -- while end end end return ret end ) DC():PrintDebug( " ** Loaded anti-spam filter v0.1 **" ) edit: Atached file deleted, because there is the version 0.2 in the other topic... Share this post Link to post Share on other sites
Posted January 19, 2009 So... anybody have some .hlp files or how to's to luaplugin? Sample how to send msg to chat without script ... /lua hub:sendchat(os.time()); ? Share this post Link to post Share on other sites
Posted January 21, 2009 There are some scripts included with the client, the startup.lua will give you many hints, and most of the others are good for education as well. Share this post Link to post Share on other sites
Posted January 22, 2009 startup.lua contain help only for listeners. Share this post Link to post Share on other sites
Posted January 22, 2009 look in function createAdcHub( hubid ) and createNmdcHub( hubid ) Share this post Link to post Share on other sites
Posted January 24, 2009 ok so if i get this right i can use any lua script from rsx++ in apex right ? or is lua different in this one ? Share this post Link to post Share on other sites
Posted January 24, 2009 what lua version do you use for this ? **Edit : lua 5.1 (tnx Plop) Share this post Link to post Share on other sites