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?
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
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.
someone? please!
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 :)
thx... :))