PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: Scooby_Doo on 29 May, 2004, 12:07:13

Title: Tags
Post by: Scooby_Doo on 29 May, 2004, 12:07:13
hi there all
a script for people that log into the room - but with no TAGs as to what software they are using as cant tell with no tag!!!
Title:
Post by: plop on 29 May, 2004, 17:07:29
try dc++k CDM, that can detect there client even if they don't show a tag.

plop
Title: in PtokaX.ini
Post by: Herodes on 29 May, 2004, 19:22:25
I found these lines in PtokaX.ini
...
[RulesAndFilters]
DenyDCPP=0
DenyNMDC=0
DenyDCPPNoTag=0                   < -- would this work ok and troublefree for this matter ?
OpsMustObeyPermissions=0
...
Title:
Post by: Sudds on 29 May, 2004, 21:19:24
The deny no tag just doesnt let u in without a tag however most clients will fake a tag and also most mac clients dont use tags.
Sudds
Title:
Post by: plop on 30 May, 2004, 19:11:31
QuoteOriginally posted by Sudds
The deny no tag just doesnt let u in without a tag however most clients will fake a tag and also most mac clients dont use tags.
Sudds
only nmdc V1 for the mac doesn't have a tag, dcgui-qt and nmdc V2 have a tag.

plop
Title: Oopsss!!
Post by: Shurlock on 01 June, 2004, 02:26:30
Perhaps the following little script will do the job for you as it works for me.
Of course: replace ####### with your hubname.

code:
---------------------------------
-- TAG or disconnect
-- By: Shurlock
-- Logs users without tag in folder scripts/text and disconnects

file_notag = "text/notag.txt"

function NewUserConnected(curUser)
   if not strfind(curUser.sMyInfoString,"<++") then
          JotItDown(curUser)
          curUser:SendPM("Admittance to ######## demands a description tag. You will be disconnected.")
          curUser:Disconnect()
  end
end

function JotItDown(curUser)
   appendto(file_notag)
   write("\n"..date("%d").."-"..date("%m").."-"..date("%y").."\tUsername: "..curUser.sName.." ")
   writeto()
end
-------------------------------

Title:
Post by: plop on 01 June, 2004, 04:32:08
QuoteOriginally posted by Shurlock
Perhaps the following little script will do the job for you as it works for me.
Of course: replace ####### with your hubname.

code:
---------------------------------
-- TAG or disconnect
-- By: Shurlock
-- Logs users without tag in folder scripts/text and disconnects

file_notag = "text/notag.txt"

function NewUserConnected(curUser)
   if not strfind(curUser.sMyInfoString,"<++") then
          JotItDown(curUser)
          curUser:SendPM("Admittance to ######## demands a description tag. You will be disconnected.")
          curUser:Disconnect()
  end
end

function JotItDown(curUser)
   appendto(file_notag)
   write("\n"..date("%d").."-"..date("%m").."-"..date("%y").."\tUsername: "..curUser.sName.." ")
   writeto()
end
-------------------------------


ever notiched that not all tags start with <++ ??
your script is dicriminating all non dc++ clients. lol
beside that the + is magic so you would need 2 excape it, currently the script looks for 1 or more < and then it looses it's way.
what 2 do with the 2nd +.
ptokax can check if a client has a tag and disconnect if not, just like herodes notiched.

plop
Title:
Post by: Shurlock on 04 June, 2004, 03:15:48
Hi Plop,


Thanks for a reply that really woke me up!
As I am but a 'newby', I have a few questions though...

your script is dicriminating all non dc++ clients. lol    

I wonder if (a lot of!!) people realize which clients are trust-worthy and which not. I personally have lost sight in the world of 'faking' clients. So... within my hub only DC++, oDC and DCGUI are allowed. Wrong?

beside that the + is magic so you would need 2 excape it, .......

My thought was that, if delimited, it would be searched as a string, thus not acting as part of a syntax. Wrong?

The PtoKax option is something I had not noticed and will be applying as of now.  (I'm ashamed for not noticing!)

Hope you'll not be angry with me for mistakes that are made by 'beginners'.

I would appreciate  you responding  to this, as I honestly wish to learn!

Thanks in advance!

Regards!!!!