VIP commands
 

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

VIP commands

Started by DarkElf, 29 February, 2004, 16:54:10

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DarkElf

Hi, i need a simple script wich give some commands to VIP users..

the commands are: mass message, kick (5min ban), disconnect, and if possible the vipchat

thanks :D
Please sorry my bad english, i'm learning it :-D

\\100Gb ][ MeGaShArE @ I?? - ?u?i?N Owner [/I]
100gb.ifs-fusion.net:666 Only EliTe ShArE min 100gb
-={ I?? - ?u?i?N }=- N??Owner

nErBoS

#1
Hi,

Hope it helps...

--Requested by DarkElf
--Made by nErBoS

Bot = "VIP-Script"

function Main()
frmHub:RegBot(Bot)
end

function NewUserConnected(user, data)

end

function DataArrival(user, data)

if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
	data=strsub(data,1,strlen(data)-1)
	s,e,cmd = strfind(data,"%b<>%s+(%S+)")
		if (cmd=="!mm") then 
			if (user.iProfile == 2 or user.bOperator) then
			local s,e,msg = strfind(data,"%b<>%s+%S+%s+(.*)")
			if (msg == nil or msg == "") then
				user:SendPM(Bot, "Syntax error, !mm , must write a message.")
			else
				SendPmToAll(Bot, msg)
			end
			else
			user:SendPM(Bot, "You don't have permission to use this command.")
			end
			return 1
		elseif(cmd=="!vipkick") then
			if (user.iProfile == 2 or user.bOperator) then
			local s,e,kicked,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
			if (kicked == nil) then
				user:SendPM(Bot, "Syntax error, !vipkick  , must have a nick to kicked.")
			else
				if(GetItemByName(kicked) == nil) then
					user:SendPM(Bot, "There isn't any user with the nick "..kicked.." online.")
				else
				local usr = GetItemByName(kicked)
				if (reason == nil) then
					user:SendPM(Bot, "Syntax error, !vipkick  , must have a reason.")
				else
					if(usr.bOperator) then
						user:SendPM(Bot, "You can't kick a Operator.")
					else
						SendToAll(Bot, user.sName" has kicked "..usr.sName.." because: "..reason)
						usr:SendPm(Bot, "You have been kicked because: "..reason)
						usr:TimeBan(5)
					end
				end
				end
			end
			else
			user:SendPM(Bot, "You don't have permission to use this command.")
			end
			return 1
		elseif(cmd=="!vipdct") then
			if (user.iProfile == 2 or user.bOperator) then
			local s,e,whoto,reason = strfind(data,"%b<>%s+%S+%s+(%S+)%s+(.*)")
			if (kicked == nil) then
				user:SendPM(Bot, "Syntax error, !vipdct  , must have a nick to disconnect.")
			else
				if(GetItemByName(whoto) == nil) then
					user:SendPM(Bot, "There isn't any user with the nick "..kicked.." online.")
				else
				local usr = GetItemByName(whoto)
				if (reason == nil) then
					user:SendPM(Bot, "Syntax error, !vipdct  , must have a reason.")
				else
					if(usr.bOperator) then
						user:SendPM(Bot, "You can't disconnect a Operator.")
					else
						SendToAll(Bot, user.sName" has disconnected "..usr.sName.." because: "..reason)
						usr:SendPm(Bot, "You have been disconnected because: "..reason)
						usr:Disconnect()
					end
				end
				end
			end
			else
			user:SendPM(Bot, "You don't have permission to use this command.")
			end
			return 1
		end
end
end

About the VIP-Chat make a search in the forum and you will find one.

Best regards, nErBoS
--## nErBoS Spot ##--

BlazeXxX

Would this clash in with robocop script ? because i want to give some special function to VIPs, but would this kick function mess up the security of the hub?

nErBoS

Hi,

If the commands have the same name and prefix it will create conflicts, if not there is no problem i think.

About securtiy the kick doesn?t let vips kick any kind of op but the others does.

Best regards, nErBoS
--## nErBoS Spot ##--

SMF spam blocked by CleanTalk