Need help whit script!
 

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

Need help whit script!

Started by WickeD, 16 March, 2004, 14:05:08

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WickeD

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

Skrollster

How do you usually do then you find out what isp a user has??

WickeD

#2
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

Skrollster

I meant how do you usualy do to determ if a user is allowed??

WickeD

If they have this IPS-Tagg they can enter the hub:

"[Bostaden]",
"[Scream]",
"[Telecom3]",


Is that what you meen??

//WickeD

Skrollster

so any one with those isp-tags can enter the hub?

??????Hawk??????

#6
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

Skrollster

yes, maybe, but i wanted him to get to that conclution on his own..

WickeD

#8
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

NightLitch

#9
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.
//NL

WickeD

Thx for your help my m8?s!!!  =)


//WickeD

??????Hawk??????

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

WickeD

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

??????Hawk??????

your welcome m8 ..  

sorry  i misunderstood you @ first   but we got there in the end  :P

SMF spam blocked by CleanTalk