Is there a line that can bee added in a script that shows a ISP-Tagg for a user in mainchat?
Like this: "..curUser.sName.." but shows the ISP-Tagg like: Your ISP tagg is: [Telia]
Can eny one help mee whit this problem?
//WickeD
How do you usually do then you find out what isp a user has??
I want the users to get a massage i mainchat when they enter the hub that say: Your ISP-Tagg is: [Bostaden] and are allow here!
BotName = "[Bot]??Gate-Check??"
ISP = {
"[Bostaden]",
"[Scream]",
"[Telecom3]",
}
-- Main Sub
function Main()
frmHub:RegBot(BotName)
end
function NewUserConnected(curUser)
for key, value in ISP do --Loop ISP Array
if (strfind(strlower(curUser.sName), strlower(value),1,1)) then
x=1
break
else
x=0
end
end
if (x == 0) then
-- Kick user
curUser:SendData("Your [ISP]-Tagg is wrong!")
curUser:SendData("Your nickname must have your [ISP]-Tagg Before your nickname!")
curUser:SendData("Change your [ISP]-Tagg to: [Bostaden]Yournickname or what [ISP] that you now have!")
curUser:Disconnect()
end
end
//WickeD
I meant how do you usualy do to determ if a user is allowed??
If they have this IPS-Tagg they can enter the hub:
"[Bostaden]",
"[Scream]",
"[Telecom3]",
Is that what you meen??
//WickeD
so any one with those isp-tags can enter the hub?
hmmmm i think maby hes wanting something like
user connect:-
Get ip info from Whois Database
Check for coresponding isp tag
if no tag then pm user and disconnect them
??????? maby
yes, maybe, but i wanted him to get to that conclution on his own..
I use this script to check and block users whit wrong IPS-Tagg to enter my hub! And it works fine! BUT! I want the script to show a loggin massage to a user when enter the hub! That say: Welcome WickeD! Your IPS-Tagg is: [Bostaden] and are allowed in here!
That is all the help I want to whit this script! =)
BotName = "[Bot]??Gate-Check??"
ISP = {
"[Bostaden]",
"[Scream]",
"[Telecom3]",
}
-- Main Sub
function Main()
frmHub:RegBot(BotName)
end
function NewUserConnected(curUser)
for key, value in ISP do --Loop ISP Array
if (strfind(strlower(curUser.sName), strlower(value),1,1)) then
x=1
break
else
x=0
end
end
if (x == 0) then
-- Kick user
curUser:SendData("Your [ISP]-Tagg is wrong!")
curUser:SendData("Your nickname must have your [ISP]-Tagg Before your nickname!")
curUser:SendData("Change your [ISP]-Tagg to: [Bostaden]Yournickname or what [ISP] that you now have!")
curUser:Disconnect()
end
end
//WickeD
for you problem, you must most likley bind the ISP to a IP that is how I have done.
ex:
Table = {
["192.168.0.*"] = "[ROUTER]",
["127.0.0.*"] = "[LOCAL]",
}
but there is many way's.
Thx for your help my m8?s!!! =)
//WickeD
try this ( Untested )
BotName = "[Bot]??Gate-Check??"
ISP = {
"[Bostaden]",
"[Scream]",
"[Telecom3]",
}
-- Main Sub
function Main()
frmHub:RegBot(BotName)
end
function NewUserConnected(curUser)
for key, value in ISP do --Loop ISP Array
if (strfind(strlower(curUser.sName), strlower(value),1,1)) then
x=1
break
else
x=0
end
end
if (x == 0) then
-- Kick user
curUser:SendData("Your [ISP]-Tagg is wrong!")
curUser:SendData("Your nickname must have your [ISP]-Tagg Before your nickname!")
curUser:SendData("Change your [ISP]-Tagg to: [Bostaden]Yournickname or what [ISP] that you now have!")
curUser:Disconnect()
elseif (x == 1) then
curUser:SendData("Welcome "..curUser.sName.." Your IPS-Tagg is: "..value.." and are allowed in here!")
end
end
This: "..value.." is what I wanted!!! Thx a lot my m8!!!
I added that to my script and now I have all I need to my ISP script!
//WickeD
your welcome m8 ..
sorry i misunderstood you @ first but we got there in the end :P