PtokaX forum

Development Section => Your Developing Problems => Topic started by: Stravides on 12 February, 2004, 17:58:39

Title: Tagmania :)
Post by: Stravides on 12 February, 2004, 17:58:39
OK, so there are the programs that disallow non tagged peeps into the hubs, but what I would like to create with a lotta help from you chaps n chapesses is a bot that will look at the users on a predefined schedule and report

> Hubs
> Slots
> Ratio

if they are above the predefined maxes..  I can look at tteh tags, but what I want to catch are the tagless...

Firstly IS this possible, secondly where do I start...  I have Smeagol running beautifully thanks to you all, I just want to make him a little more functional.  I would firstly like to run this code external to Smeagol then I will adapt and assimilate it into the Smeagol Collective.

The reason that I ask this is that I have asked the certain miscreants on our hub that are not sharing their Tags, or others that say that as they use Linux DC Original that they dont have tags..  Can I get their tot hubs etc ???

Many Many thanks in Advance... Initially your ideas on the feasibility of this ....

Title:
Post by: NightLitch on 13 February, 2004, 01:30:16
Well that depends, the newest Neo Modus 2 v. 2.20 Has a trigger to not show tag BUT! the tag is registered in hubsoft(MyInfostring) anyway.

But what I want to know is HOW GeneralBot to NMDCHUB can sense old NMDC1 ??? on hubs & Slots...

I can't help you on this issue. If there is no tag nothing can be checked. execpt above then.

Anyone other disagree with me ???

/NL
Title:
Post by: NotRabidWombat on 13 February, 2004, 07:16:11
This is how you can tell if the client it NeoModus
function DataArrival(curUser, sData)
if(strsub(sData, 1, 7) == "$MyINFO") then
if(curUser.iVersion == nil) then
curUser:SendPM("test", "Your client is stupid");
curUser:Disconnect();
return;
end

if(strfind(curUser.iVersion, "^1.0091$") and curUser.bOperator == nil) then
-- the . is a magic char on purpose
curUser:SendData("$GetNetInfo|");
end
end

if(strsub(sData, 1, 8) == "$NetInfo") then
local info = strsub(sData, 9, -1);
local s, e, slots, hubs, mode, cap = strfind(sData, "^%$NetInfo (%d+)%$(%d+)%$(%w)%$*(%d*)%|$");

if(s == nil)
then curUser:Disconnect();-- the search failed, incorrect NetInfo
elseif(cap == "") then
curUser:SendData("Hub-Security", "Please download the latest Neo Modus Client");
curUser:Disconnect();
else
slots = tonumber(slots) or 0;
hubs = tonumber(hubs) or -1; -- second value is for invalid number
cap = tonumber(cap) or -1; -- second value is for invalid number

-- do what you want with the rest of the stuff above
-- slots: duh
-- hubs: all open hubs (even if OP and even if the user isn't connected :-\ )
-- mode: A or P
-- cap: kB/sec upload cap

end

return 1;
end

return 0;
end
NeoModus 2.x supports $GetNetInfo. This script was made before the latest release (I had requested I fix for the hubs problem) and things may have changed. Just a general idea of how to discover NeoModus information even if they disable the tag.
Actually, using this method to discover the information is superior to DC++.
A) The end user never sees it and therefore is less likely to try to find a way around (I know security through obscurity is a falacy, but this would solve some problems)
B) Saves bandwidth because this useless information is not sent to EVERY other user when they request MyINFO.

So good job John Hess. :-D

-NotRabidWombat

-NotRabidWombat
Title:
Post by: NightLitch on 13 February, 2004, 13:55:19
Check out the new NMDC2 2.20, I don't need that script, already have it from ya. :-)

Some Settings is removed.

OR do you trying to tell me it takes NMDCv1 and 2 with that. ???

/NL
Title:
Post by: Stravides on 13 February, 2004, 14:02:55
I'm using Ptokax td4, and dc++ 306, i dont really wann achange this config as i'm happy with it.. was just wondering if there was a command to get the details from the users like the tag, but queried value instead...

Am I being too vague ?
Title:
Post by: NightLitch on 13 February, 2004, 14:32:18
You want to know hubs,slots, etc. that is easy to script.
but clients without tags can't be checked becouse the don't send a complete MyInfoString.

/NL
Title:
Post by: Stravides on 13 February, 2004, 16:42:57
yea thats what I was getting at...  there must be some variable that populates myinfo, and was just wondering if you knew what they were :)

ie my info is sent by the client, but it is generated from other vars...  so would it be possible for the script to requrest these ars separately, or does the masking completely mask ??

Many thanks sorry to be a pain
Title:
Post by: Stravides on 28 February, 2004, 00:34:42
anyone ?