nick lenght check
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

nick lenght check

Started by angelsanges, 26 January, 2004, 09:09:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

angelsanges

it is possible a script that on the connection fase checks the Nickname lenght and if it is longer than 10 characters the user is disconnected with a message?

VERMiN

Sure!


function NewUserConnected(curUser)

  if(strlen(curUser.sName) > 10) then

    SendToNick(curUser.sName,"Your nickname contain more than 10 characters.")
    curUser:Disconnect()

    end

end
The damned creator of [-MORBID-].  \" A damn fine security script \" [/COLOR]


HOMEPAGE
E-mail

angelsanges

#2
thank you!

it is true that longer nicks thakes more bandwith?

this script cecks also the Ops & Masters?

[NL]Pur

above script doesn't apply for Operators and Masters.

plop

QuoteOriginally posted by angelsanges
thank you!

it is true that longer nicks thakes more bandwith?

this script cecks also the Ops & Masters?
something big always uses more then something small.
but compaired 2 the rest of the infostring 10 is nothing.
i wouldn't worry about it 2 much, blocking anything above 15-20 looks oke 2 me.
the auto search from dc++ takes a whole lot more bandwidth.
i'm gone add the same check 2 a.i. as i've seen nicks in my logs with around 256 characters, some weirdo's around.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

angelsanges

and it is possible to modify the bot to do checks only only on normal users?

pHaTTy

QuoteOriginally posted by angelsanges
and it is possible to modify the bot to do checks only only on normal users?

that only applies for normal users ;)

hmm

note for me: good idea for a settings for G6, a varable of max length name, maybe a min length 2, nice one ;)
Resistance is futile!

plop

QuoteOriginally posted by angelsanges
and it is possible to modify the bot to do checks only only on normal users?
here you are, only unreged users are checked.
function NewUserConnected(curUser)
   if(strlen(curUser.sName) > 10) and curUser.iProfile == -1 then
      SendToNick(curUser.sName,"Your nickname contain more than 10 characters.")
      curUser:Disconnect()
   end
end


plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

angelsanges


angelsanges

function NewUserConnected(curUser)
   if(strlen(curUser.sName) > 10) and curUser.iProfile == -1 then
      SendToNick(curUser.sName,"Your nickname contain more than 10 characters.")
      curUser:Disconnect()
   end
end



it is possible to insert also a mini lenght check?

kepp

#10
function NewUserConnected(curUser) 
   if(strlen(curUser.sName) > 10) and curUser.iProfile == -1 then 
      SendToNick(curUser.sName,"Your nickname contain more than 10 characters.") 
      curUser:Disconnect()
   elseif (strlen(curUser.sName) < 4) and curUser.iProfile == -1 then
      SendToNick(curUser.sName,"Your nickname contain less than 4 characters.")
      curUser:Disconnect()
   end 
end
Guarding    

SMF spam blocked by CleanTalk