hi i have a problem i want that only with the my hub prefix enter the hub at the sart! when the connect to my hub like this
You don't have the right prfeix pls change it and come in!
can any one help me i have try in RULES AND BOTS in ptoka x it dosen't work
i have write : [[iThaYaM]]
in nickname rule
and the hub prefix must be [iThaYaM]
can anyone help me pls thx
Try this:
BOTNAME = "PrefixChecker"
PREFIX = { "[iThaYaM]" }
function Main()
frmHub:RegBot(BOTNAME)
end
function NewUserConnected(curUser)
for check,prefix in PREFIX do
if not strfind(curUser.sName,prefix,1,1) then
curUser:SendPM(BOTNAME,"You were DISCONNECTED by "..BOTNAME.." - Reason: You don't have the right prefix, please change it and come in")
curUser:Disconnect()
end
end
end
Hope I understood you right, if not, let me know.
Yokozuna
Sorry, double post :-)
here you go:
--Simple ISP Check by NightLitch
BotName = "NXS-3"
ISP = { "[1Mbit]" , "[2Mbit]" , "[5Mbit]" , }
function NewUserConnected(curUser)
if Badisp(curUser,data) then
else
curUser:SendData(BotName," *** You are using an unauthorized ISP !")
curUser:Disconnect()
return 1
end
end
function Badisp(curUser)
for key,isps in ISP do
if strfind(strlower(curUser.sName), strlower(isps),1,1) then
return 1
end
end
end
simple and neat...
thank you very much it works good!
Vinoth