Kick & warn 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

Kick & warn script.

Started by Jaakko, 30 August, 2007, 11:50:20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jaakko

I need a script that kicks user if he has been warned 3 times, and after 3 kicks will automagically ban him for 6 hours.
Protection for profiles would be nice, but isn't necessary.

Profiles:
[-1] = 0, -- unreg
[0] = 1, -- admin
[1] = 1, -- master
[2] = 1, -- operator
[3] = 0, -- vip
[4] = 0, -- reg

CrazyGuy

I made this script, but i can't find it back  :-\
I know it's being used in a hub, I'll ask the owner to attach it.

-SkA-

ChatArrival = function(User,Data)
	local _,_,cmd,sNick,sReason = string.find(Data, "%b<>%s%p(%S+)%s(%S+)%s(.*)|")
	if (cmd) and (cmd =="warn") then
		local Prof = GetProfilePermissions(User.iProfile)
		if (Prof.bKick) then
			if (sReason) then
				local Victim = GetItemByName(sNick)
				if Victim then
					if (Victim.iProfile == -1) or (Victim.iProfile > User.iProfile) then
						Victim:SendPM(frmHub:GetHubBotName(), "You have been warned by "..User.sName.." because: "..sReason)
						SendToAll(frmHub:GetHubBotName(), sNick.." has been warned because: "..sReason)
					else
						User:SendData(frmHub:GetHubBotName(), "Forget it, "..sNick.." is more powerful than you.")
					end
				else
					User:SendData(frmHub:GetHubBotName(), sNick.." is not online")
				end
			else
				User:SendData(frmHub:GetHubBotName(),"Please specify a reason")
			end
		else
			User:SendData(frmHub:GetHubBotName(), "You are not allowed to use this command")
		end
		return 1
	end
end

OpConnected = function(User)
	local Prof = GetProfilePermissions(User.iProfile)
	if (Prof.bKick) then
		User:SendData("$UserCommand 1 3 "..frmHub:GetHubName().."\\Warn$<%[mynick]> !warn %[nick] %[line:Reason]&#124;|")
	end
end
???:::??x??em?-N????:::??? ?wN??

BrianzaLand Blog" style="border:0

SMF spam blocked by CleanTalk