PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: bsalsa on 22 January, 2004, 17:40:43

Title: mod the function in the script
Post by: bsalsa on 22 January, 2004, 17:40:43
You all know the problem with odc new 5.31 tags
how do i change the function that it will allow only dc++ and odc (all versions) and pc pro (without emulating dc pro)clients?? i do not wish to allow all the other clients.
thanks for your help and support

-------- CanCerberoSection -------
function CheckPlusPlus(user)
   if strfind(user.sMyInfoString,"<++") then
      if user.bOperator then
         UserStatus = "OPerator"
         SpUserStatus = "OPerador"
      else
         UserStatus = "User"
         SpUserStatus = "Usuario"
      end
      SendToAll(Bot,"[CanCerbero]?\r\nThe "..UserStatus.." "..user.sName.." has connected to the HUB.\r\nEl "..SpUserStatus.." "..user.sName.." ha conectado al HUB.\r\n")
      CheckMyInfo(user, user.sMyInfoString)
      LoggedinUser[user.sName]=1
   else
      user:SendPM(Bot,"[CanCerbero]?\r\nWe only allow DC++ (http://dcplusplus.sourceforge.net/) or oDC++ (http://gempond.com/odc/) in this hub, so go there and download one of them. Disconnecting.....")
      LoggedinUser[user.sName]=nil
      user:Disconnect()
   end
end
Title:
Post by: NightLitch on 22 January, 2004, 18:08:51
here try this one:

function CheckPlusPlus(user)
if strfind(user.sMyInfoString,"<++") or strfind(user.sMyInfoString," if user.bOperator then
UserStatus = "OPerator"
SpUserStatus = "OPerador"
else
UserStatus = "User"
SpUserStatus = "Usuario"
end
SendToAll(Bot,"[CanCerbero]?\r\nThe "..UserStatus.." "..user.sName.." has connected to the HUB.\r\nEl "..SpUserStatus.." "..user.sName.." ha conectado al HUB.\r\n")
CheckMyInfo(user, user.sMyInfoString)
LoggedinUser[user.sName]=1
else
user:SendPM(Bot,"[CanCerbero]?\r\nWe only allow DC++ ([URL]http://dcplusplus.sourceforge.net/[/URL]) or oDC++ ([URL]http://gempond.com/odc/[/URL]) in this hub, so go there and download one of them. Disconnecting.....")
LoggedinUser[user.sName]=nil
user:Disconnect()
end
end
Title: thank you
Post by: bsalsa on 23 January, 2004, 12:20:29
cool its working but also bcdc can go in  :(
is ther a way i can block the other clients ?
thank you
Title:
Post by: plop on 24 January, 2004, 04:43:07
QuoteOriginally posted by bsalsa
cool its working but also bcdc can go in  :(
is ther a way i can block the other clients ?
thank you
bcdc++ has the same tag as dc++.
and lots of ppl have good reason 2 use that, if they show the limiter in the tag there is absolutly nothing wrong with it.
+ this script blocks the best client there is DCGUI(-qt), the only client which has protection against faking and can't even hide the limiter from the tag.

plop
Title: Thanks
Post by: bsalsa on 25 January, 2004, 08:55:59
I am going to check that out
as i saw the dcfgui has a problem in istalling
you need to install a 3 party visual basic dll + registering in another web site( and you know how much users love to register...)
for now i think the script is good and you are right
thanks for all the guys for their help
Title:
Post by: plop on 25 January, 2004, 23:49:55
QuoteOriginally posted by bsalsa
I am going to check that out
as i saw the dcfgui has a problem in istalling
you need to install a 3 party visual basic dll + registering in another web site( and you know how much users love to register...)
for now i think the script is good and you are right
thanks for all the guys for their help
it needs a developers trail edition from QT (not quicktime).
for linux/bsd this is free but for windows they ask money.
you can expect troubles if you use the latest version of QT, but it works fine if you install that and grab the dll in question from an earlyer version.
for more info you can check the dcgui forum.

plop
Title:
Post by: bsalsa on 26 January, 2004, 20:02:33
i guess you are right
i am gona try it now
thanks