search names
 

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

search names

Started by AMediaMan, 04 January, 2004, 05:42:53

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

AMediaMan

hello everyone, i hope the holidays went good for you all

heres my question. I'm looking for a script that will ban search names or bots before they get into the hub. I use
PtokaX td 4 any help would be cool.

                             Thnx, AMediaMan

kepp

BadNames = {"name","name1","name2","name3","name4","name5"}


function NewUserConnected(user)
      for key, i in BadNames do
         if strfind(user.sName,BadNames) then
            SendToNick(user.sName, "Your name is not allowed in here\r\nDisconnecting...")
            user:Disconnect()
         end
    end
end

^^ ?
Guarding    

AMediaMan

Thnx Kepp it seems to work but is there anyway to make it less specific..... like say not just the name search but anyone with search in their name. say like AMediaMan_search without having to have the AMediaMan in it or any other bot or something lol



               thnx, AMediaMan

NightLitch

#3
here try this one AMediaMan:

-- Modified by: NightLitch 2004

BadNames = {"name","name1","name2","name3","name4","name5"}


function NewUserConnected(user)
	if checkNicks(curUser) then
		curUser:SendData(BotName," *** You are using a bad nick!")
		curUser:Disconnect()
		return 1
	end
end

function checkNicks(curUser)
	for key,nick in BadNames do
		if strfind(strlower(curUser.sName), strlower(nick),1,1) then
			return 1
		end
	end
end

Hope It works...
//NL

AMediaMan

NightLitch saves the day again lol thnx man seems to be working fine.


                     thnx much, AMediaMan






PtokaX is number 1

           PS. any word on a td 5 or am i slow lol

SMF spam blocked by CleanTalk