"nick"
 

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

"nick"

Started by texas71, 14 March, 2004, 23:17:11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

texas71

hi guy?s !

I have been trying do add this script in to the hub but it will not work ????

I am running PtokaX 0.3.2.6 TestDrive 4 for the hub

BotName = "?ISP?"
ISP =
[bbb];
[telia];
[bostream];
[sunet];
[10Mbit];
[2Mbit];
[0,5Mbit];
[5Mbit];
[Bitnet];
[ComHem];
[Spray];
[Tele2];
[Xstream];
[1Mbit];

-- 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
curUser:SendPM(BotName, "Welcome to [Broadband?] Network")
x=1
break
else
x=0
end
end

if (x == 0) then
-- Kick user
curUser:SendPM(BotName, "")
curUser:SendPM(BotName, "your nick should be[BBB] or [Sunet].")
curUser:SendPM(BotName, "change your name to [BBB] then you welcome back")
curUser:SendPM(BotName, "")
curUser:Disconnect()
end

end

when I add this one
bbb];
[telia];
[bostream];
[sunet];
[10Mbit];
[2Mbit];
[0,5Mbit];
[5Mbit];
[Bitnet];
[ComHem];
[Spray];
[Tele2];
[Xstream];
[1Mbit];

it will not work for me ???

I do hope some one can help me with this problem ...

Stravides

u need to form a table....

this works

BotName = "?ISP?" 
ISP = {
["bbb"]=1, 
["telia"]=1, 
["bostream"]=1, 
["sunet"]=1, 
["10Mbit"]=1, 
["2Mbit"]=1, 
["0,5Mbit"]=1, 
["5Mbit"]=1, 
["Bitnet"]=1, 
["ComHem"]=1, 
["Spray"]=1, 
["Tele2"]=1, 
["Xstream"]=1, 
["1Mbit"]=1, 
}


-- Main Sub 
function Main() 
	frmHub:RegBot(BotName) 
end 

function senddetails(curUser)
		curUser:SendPM(BotName, "") 
		curUser:SendPM(BotName, "your nick should be[BBB] or [Sunet].") 
		curUser:SendPM(BotName, "change your name to [BBB] then you welcome back") 
		curUser:SendPM(BotName, "") 
end

function NewUserConnected(curUser) 

	for key, value in ISP do --Loop ISP Array 
		if (strfind(strlower(curUser.sName), strlower(value),1,1)) then 
			curUser:SendPM(BotName, "Welcome to [Broadband?] Network") 
			x=1 
			break 
		else 
			x=0 
		end 
	end 

	if (x == 0) then -- Kick user 
		senddetails(curUser)
		curUser:Disconnect()
	end 

end
Stravides
For RPG Books, Mp3 & Videos
We host trivia  and the ever failing Smeagolbot

Skrollster

#2
Can some one please delete this thread, it is dublicated:

http://board.univ-angers.fr/action.php?action=getlastboard&threadid=1598&boardid=13

Stravides

If you want to give a list of available options just replace with this script... its working on my test hub...

BotName = "?ISP?" 
ISP = {
["bbb"]=1, 
["telia"]=1, 
["bostream"]=1, 
["sunet"]=1, 
["10Mbit"]=1, 
["2Mbit"]=1, 
["0,5Mbit"]=1, 
["5Mbit"]=1, 
["Bitnet"]=1, 
["ComHem"]=1, 
["Spray"]=1, 
["Tele2"]=1, 
["Xstream"]=1, 
["1Mbit"]=1, 
}
message=""

-- Main Sub 
function Main() 
	frmHub:RegBot(BotName) 
end 

function senddetails(curUser)
	message	= "\r\n\r\n"..
	"Please change your name to include one of the \r\n"..
	"following prefixes and then you are welcome to return:"..				
	"\r\n"
	
	for key, value in ISP do
		message=message.."["..key.."]".."\r\n"
	end	
	curUser:SendPM(BotName, message) 
	curUser:Disconnect()
end

function NewUserConnected(curUser) 

	for key, value in ISP do --Loop ISP Array 
		if (strfind(strlower(curUser.sName), strlower(value),1,1)) then 
			curUser:SendPM(BotName, "Welcome to [Broadband?] Network") 
			x=1 
			break 
		else 
			x=0 
		end 
	end 

	if (x == 0) then -- Kick user 
		senddetails(curUser)

	end 

end
Stravides
For RPG Books, Mp3 & Videos
We host trivia  and the ever failing Smeagolbot

[UC]Dennis

can someone change the script an little bit?

i would like the users to stay connected , but the get an pm  "please put your country in front of your name like [UK]Jimbo "


????


thank you verrrry much :P

nEgativE

#5
Hi there, i tried this nice script on 3.3.0 beta.. i think it did not worked for me :( could someone check it ? plzz, tks. Plz..

SMF spam blocked by CleanTalk