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 :)
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...
because the inbuild kick is quicker than other kick/ban command :P
Thank you fot this script, it's really nice
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 ?
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 :)
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.."")
....
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 :|