_ban_time after kick
 

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

_ban_time after kick

Started by Thor, 07 September, 2006, 10:10:08

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thor

This script is modify the kick to timeban as verli do.
--Kick as in Verli: !kick user reason _ban_ time unit
--Hungarista 2oo6
--1.00 version

sBot = frmHub:GetHubBotName()

function ChatArrival(curUser,data)
data = string.sub(data,1,string.len(data)-1)
	if curUser.bOperator then
		if string.find(data,"%b<>%s!kick") then
		local s,e,nick,reason,stime,sdate = string.find(data,"%b<>%s!kick%s(%S+)%s*(.*)%s*_ban_%s*(%d+)%s*(%S+)")
		user = GetItemByName(nick)
		if user == nil then curUser:SendData(sBot,"No user on hub "..nick.."") return 1 end
		if stime == nil and sdate  == nil then
		user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_5m")
		user:TimeBan(5)
		curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
		"and he is being Banned For: 5mins 0sec")
		end
			if sdate == "s" then
			user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_"..stime..""..sdate.."")
			user:Disconnect()
			curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
			"and he is being Banned For: 0mins "..stime.."sec")
			elseif sdate == "m" then
			user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_"..stime..""..sdate.."")
			curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
			"and he is being Banned For: 0hours "..stime.."min") 
			user:TimeBan(stime)
			elseif sdate == "h" then
			user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_"..stime..""..sdate.."")
			curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
			"and he is being Banned For: 0days "..stime.."hour") 
			user:TimeBan(stime*60)
			elseif sdate == "d" then
			user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_"..stime..""..sdate.."")
			curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
			"and he is being Banned For: "..stime.."day")
			user:TimeBan(stime*60*24)
			elseif sdate == "w" then
			user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_"..stime..""..sdate.."")
			curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
			"and he is being Banned For: "..stime.."week") 
			user:TimeBan(stime*60*24*7)
			elseif sdate == "M" then
			user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_"..stime..""..sdate.."")
			curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
			"and he is being Banned For: "..stime.."Month")
			user:TimeBan(stime*60*24*7*4)
			elseif sdate == "y" then
			user:SendPM(sBot,"<"..curUser.sName.."> You are being kicked because: "..reason.."_ban_"..stime..""..sdate.."")
			curUser:SendData(sBot,"Kicked user "..user.sName.." IP: "..user.sIP.." .. ;)\r\n"..
			"and he is being Banned For: "..stime.."year")
			user:TimeBan(stime*60*24*7*4*12)
			else curUser:SendData(sBot,"No parameter "..sdate..". Avaible parameters are:\r\n"..
			"s - secundum\r\n"..
			"m - minute\r\n"..
			"h - hour\r\n"..
			"d - day\r\n"..
			"w - week\r\n"..
			"M - month\r\n"..
			"y - year\r\n")
			end
		return 1
		end
	else curUser:SendData(sBot,"You are not allowed to use this command!")
	return 1
	end
end

6Marilyn6Manson6


SMF spam blocked by CleanTalk