Lee

Lua Plugin 1.3 Beta

40 posts in this topic

yes, as far as I can tell, all scripts that work in last versions of rsx and bcdc works in apex too (some small modifications might be needed depending on what startup.lua you are using)

Share this post


Link to post
Share on other sites

not all of them. or at least not the way they should. for example the matrix script in rsx++ works like a charm no matter what version of the script i use.

but it doesn't work ok in apex. at best i can trigger it but in some hubs like Geek-Op i get kicked for supplying a different nickname. my correct nick is [Vatos

matrix_script_3_versions.rar

Share this post


Link to post
Share on other sites

About matrix-3.lua ...

In your client tick option:

Settings/Advanced/Send unknown / commands to the hub

restart, load the script and type /matrix text

Share this post


Link to post
Share on other sites

ok command is sent but doesn't fix the problem. still removes the

Share this post


Link to post
Share on other sites

different API I would say. You need someone who will adjust the script. Ex I've got completely different matrix.lua for zK atm

Share this post


Link to post
Share on other sites

well, i'd say bad encoding in plugin -> client and client -> plugin way :)

Not a big surprise that, tbh..

Share this post


Link to post
Share on other sites

hehe it's a nasty bug, but i found a quite nice solution for it

every string that goes outide the core is in utf8 - no matter if this comes from adc or nmdc :) and when sending, nmdc decode it (adc leave it as is). imo best solution :)

it's already implemented in latest build of rsx++ and works like a charm in lua ^^

Share this post


Link to post
Share on other sites

solved this little issue with the ™ char, luckily it had nothing to do with string encoding, but stupid mistake anyways...

Edit: also those missing the timer that has been fixed also and was also a stupid mistake, even more so than this one...

Share this post


Link to post
Share on other sites

so if it's fixed will it be available in the next version of the plugin ?

Share this post


Link to post
Share on other sites

so if it's fixed will it be available in the next version of the plugin ?

That would be a correct assumption... and before you ask when that would be with b2 or final depending which it is that will be coming...

Share this post


Link to post
Share on other sites

every string that goes outide the core is in utf8 - no matter if this comes from adc or nmdc :) and when sending, nmdc decode it (adc leave it as is). imo best solution :)

I think so too. That mess with the different encodings in some places is really troublesome. When will you release this patch to a public?

BTW can I ask if the next idea will ever work with this? Somehow data (3-byte kanji characters) were transmitted and utf-8 encoding were restored in spite of NMDC-hub, but the only place, where they displayed correctly, was status-bar.

--// skipping superfluous code..


dcpp:setListener( "ownChatOut", "encodeUTF8",

	function( hub, text )

		DC():PrintDebug( "  ** Sent: "..text)

		if string.find( text, "[^%z\1-\127\194-\244][^\128-\191]*") then

			DC():SendHubMessage( hub:getId(), "<"..hub:getOwnNick().."> "..DC():FromUtf8(utf8_url_encode(text)).."|" )

			DC():PrintDebug( "  ** Encoded: "..text)

			return 1

		end

	end

)


dcpp:setListener( "chat", "decodeUTF8",

	function( hub, user, text )

		DC():PrintDebug( "  ** Received: "..text)

		if string.find( text, "%%([a-fA-F0-9]+)%+") then

			text = url_utf8_decode(text)

			--Displays 3-byte chars incorrectly in the main chat, (2-bytes still ok).

			DC():InjectHubMessage( hub:getId(), "<"..user._nick.."> "..text ) 

 			--Displays correctly.

			DC():PrintDebug( "  ** Decoded: "..text)

			return 1

		end

	end																			

)

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.