Need A Small Prefix Bot pls!
 

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 A Small Prefix Bot pls!

Started by tamilzone, 04 February, 2004, 17:13:37

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

tamilzone

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

Yokozuna

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

Yokozuna

#2
Sorry, double post :-)

NightLitch

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

tamilzone

thank you very much it works good!


Vinoth

SMF spam blocked by CleanTalk