Check nick names in Ptokax
 

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

Check nick names in Ptokax

Started by Peura, 04 August, 2004, 07:20:57

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Peura

Ptokax has nick check... it use COUNTRY_CODE check... but i would like it to check user nick like this....

[10Mbit];[5Mbit];[1Mbit];[0.5Mbit];[0.2Mbit]

How i can to this?

Snooze

have a look at this script by nErBoS


--Requested by Manonmoon72
--Show Country Prefix Accept by (uk-kingdom)pH?tt?
--Made by nErBoS

showacceptions = 1	--1 will show country codes they can use
sRedAddy = "1.1.1."	--Address that users will be redirect if not have the allowed prefix

countrycode = {
	"[UK]",
	"[USA]",
	"[PT]",
}	--Write in this Table The Country Code Accepted in your Hub

sBot = "Country-Code"

function Main()
	frmHub:RegBot(sBot)
end

function NewUserConnected(user, data)
	if (CheckCountryCode(user) == 0) then
		user:SendData(sBot, "You don't have a Country Code or a Strange Country Code.")
		user:SendData(sBot, "Please write in your nick your Country Code. eg [Country_Code]your_nick")
		if (showacceptions == 1) then
			local cod = "\n\n"
			user:SendData(sBot, "Current country codes accepted are as follows: ")
			for country,code in countrycode do
				cod = cod.."\t"..code.."\n"
			end
			user:SendData(sBot,cod)
		end
		user:SendData(sBot,"Rederecting...")
		user:SendData("$ForceMove "..sRedAddy.."|")
	end
end

function CheckCountryCode(user)
	local found = 0
	for i=1, getn(countrycode) do
		if (strsub(strlower(user.sName),1,strlen(countrycode[i])) == strlower(countrycode[i])) then
			found = 1
			break
		end
	end
	return found
end

Peura

QuoteOriginally posted by Snooze
have a look at this script by nErBoS


--Requested by Manonmoon72
--Show Country Prefix Accept by (uk-kingdom)pH?tt?
--Made by nErBoS

showacceptions = 1	--1 will show country codes they can use
sRedAddy = "1.1.1."	--Address that users will be redirect if not have the allowed prefix

countrycode = {
	"[UK]",
	"[USA]",
	"[PT]",
}	--Write in this Table The Country Code Accepted in your Hub

sBot = "Country-Code"

function Main()
	frmHub:RegBot(sBot)
end

function NewUserConnected(user, data)
	if (CheckCountryCode(user) == 0) then
		user:SendData(sBot, "You don't have a Country Code or a Strange Country Code.")
		user:SendData(sBot, "Please write in your nick your Country Code. eg [Country_Code]your_nick")
		if (showacceptions == 1) then
			local cod = "\n\n"
			user:SendData(sBot, "Current country codes accepted are as follows: ")
			for country,code in countrycode do
				cod = cod.."\t"..code.."\n"
			end
			user:SendData(sBot,cod)
		end
		user:SendData(sBot,"Rederecting...")
		user:SendData("$ForceMove "..sRedAddy.."|")
	end
end

function CheckCountryCode(user)
	local found = 0
	for i=1, getn(countrycode) do
		if (strsub(strlower(user.sName),1,strlen(countrycode[i])) == strlower(countrycode[i])) then
			found = 1
			break
		end
	end
	return found
end

This script is great...! THX

one more thing... how i can change it like that it wont check vip users.

Peura

someone? please!

nErBoS

#4
Hi,

Done...

--Requested by Manonmoon72
--Show Country Prefix Accept by (uk-kingdom)pH?tt?
--Made by nErBoS

showacceptions = 1	--1 will show country codes they can use
sRedAddy = "1.1.1."	--Address that users will be redirect if not have the allowed prefix

countrycode = {
	"[UK]",
	"[USA]",
	"[PT]",
}	--Write in this Table The Country Code Accepted in your Hub

sBot = "Country-Code"

function Main()
	frmHub:RegBot(sBot)
end

function NewUserConnected(user)
	if (user.iProfile ~= 2 and CheckCountryCode(user) == 0) then
		user:SendData(sBot, "You don't have a Country Code or a Strange Country Code.")
		user:SendData(sBot, "Please write in your nick your Country Code. eg [Country_Code]your_nick")
		if (showacceptions == 1) then
			local cod = "\n\n"
			user:SendData(sBot, "Current country codes accepted are as follows: ")
			for country,code in countrycode do
				cod = cod.."\t"..code.."\n"
			end
			user:SendData(sBot,cod)
		end
		user:SendData(sBot,"Rederecting...")
		user:SendData("$ForceMove "..sRedAddy.."|")
	end
end

function CheckCountryCode(user)
	local found = 0
	for i=1, getn(countrycode) do
		if (strsub(strlower(user.sName),1,strlen(countrycode[i])) == strlower(countrycode[i])) then
			found = 1
			break
		end
	end
	return found
end

Best regards, nErBoS

Back to my vacations :)
--## nErBoS Spot ##--

Peura

thx...  :))

SMF spam blocked by CleanTalk