Time ban in 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

Time ban in kick

Started by Alexinno, 07 September, 2006, 08:31:31

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alexinno

Hello ppl!
Is there any way to include time ban in kick reason ?
for example
<x> is kicking Y because: ..... ban_2w
and that user get baned for 2 weeks ,something like verli does
i think it would be a very usefull :)

Thor

Check here: http://forum.ptokax.org/index.php?topic=6345.0
It was requested in the hungarian LUA forum a long time ago, so i did that script.
But i never understand why operators don't use the help :P
!timeban <nick/hr:mn/reason>         - Timeban user with a reason
To do one more raw command...

Alexinno

because the inbuild kick is quicker than other kick/ban command :P
Thank you fot this script, it's really nice

Alexinno

yeah well it's not working with client inbuild kick
if i replace this
string.find(data,"%b<>%s!kick%s(%S+)%s*(.*)%s*_ban_%s*(%d+)%s*(%S+)")

with
string.find(data,"%b<>%s$kick%s(%S+)%s*(.*)%s*_ban_%s*(%d+)%s*(%S+)")


will work ?

Thor

You are welcome, but if you do an usercommand, there is also fast (to inbuild !tempban command):
Type: Chat Context: User menu Command: !tempban %[nick] %[line:Time and reason]
And you write into Time and reason: 10m You has been kicked for 10m
But, if with script is better to you, use it :) The laziest men are the programmers as we know, but it seems hubowners also ;D
Quote from: Alexinno on 07 September, 2006, 19:46:44
yeah well it's not working with client inbuild kick
if i replace this
string.find(data,"%b<>%s!kick%s(%S+)%s*(.*)%s*_ban_%s*(%d+)%s*(%S+)")

with
string.find(data,"%b<>%s$kick%s(%S+)%s*(.*)%s*_ban_%s*(%d+)%s*(%S+)")


will work ?
No, it won't work, you shold use then an another function called KickArrival :)

Alexinno

like this ?
--Kick as in Verli: !kick user reason _ban_ time unit
--Hungarista 2oo6
--1.00 version

sBot = frmHub:GetHubBotName()

function KickArrival(user,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.."")
....

Alexinno

Mutor thx for the reply .. but i'm not a scripter and i really don't understand how should i do it :(
or is there any way to do this time ban in $Kick reason :|

SMF spam blocked by CleanTalk