Lua script, tohostname

DCH++ has been abandoned, this forum serves mainly as an archive

Moderator: Moderators

Locked
idunno24
Posts: 2
Joined: 2005-01-22 15:22

Lua script, tohostname

Post by idunno24 » 2005-01-22 15:25

I'm trying to convert a lua script from ptokax, but there isnt a tohostname function. I thought the best way would be to add it to the LuaClient class, but i can't figure out how to get the function to be recognized. It just stops, even if all i do is copy a different function and rename it.

thanks
walt

Sedulus
Forum Moderator
Posts: 687
Joined: 2003-01-04 09:32
Contact:

Post by Sedulus » 2005-01-22 15:47

I'd like to point out that you don't want dns or reverse dns lookups in the worker thread as the hub would block everytime such a query was performed, resulting in major lag. ideally, one would run a separate plugin doing these lookups in a separate thread, but unfortunately nmdc dch++ doesn't do plugin intercommunication. (the correct solution I'd have in mind would involve using the setPSD and store a DnsQuery struct for every new user there. this would require some modifications, as plugins do not know eachothers PluginID currently.)
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)

idunno24
Posts: 2
Joined: 2005-01-22 15:22

Post by idunno24 » 2005-01-23 00:32

so then it seems the best option would be to rewrite that portion of it in c++, i guess it would be pretty similar to dnsbl

Locked