PtokaX forum

Archive => Archived 4.0 boards => Request for Lua 4 scripts => Topic started by: HPbaxxter on 15 June, 2005, 19:30:40

Title: Wordreplacer with Kick
Post by: HPbaxxter on 15 June, 2005, 19:30:40
Hello all!!

Does anybody know if there is a script that replaced and kicked?
A wordreplacer with kick in short words.

I hope that someone can help me!! :)
Title:
Post by: Dessamator on 15 June, 2005, 20:23:25
be more specific ! what should it replace what are the conditions for replacing, etc etc
Title:
Post by: HPbaxxter on 16 June, 2005, 00:01:15
It must replace some words and sense.
I wanna stop some flooders in my hub, but there are no other things to stop them.
Now i will try it with a replacer, then i kick or ban de flooder (i hope so).  :]
Title:
Post by: plop on 16 June, 2005, 07:41:09
QuoteOriginally posted by HPbaxxter
It must replace some words and sense.
I wanna stop some flooders in my hub, but there are no other things to stop them.
Now i will try it with a replacer, then i kick or ban de flooder (i hope so).  :]

can you give me as much info as possible about this flooder.

plop
Title:
Post by: HPbaxxter on 18 June, 2005, 01:15:58
Ok. I`ll try to explain the situation.

The last couple off days i'm under attack of a flooder. Here you can see a small example of the mainchat when he`s in my hub:

[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!
[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!
[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!
[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!
[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!
[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!
[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!
[2005-06-15 16:53] GIMME THAT! I KNOW YOU HAVE IT!!

my question here is: is there something to stop this kind of flooders?
deflood doesn`t work with this, a doubleip script i tried doesn`t work too.
Now i thought about a wordrepace script where i can add this text and then the flooder get a kick/ban. Or an anti-advertise script where i can add this text to stop the flood soon.

I hope you understand my problem and i hope someone can give me a solution for this problem. :)
Title:
Post by: Dessamator on 18 June, 2005, 11:41:51
hmm, are u using the latest ptokax that problem should be solved by correctly setting the ptokax, deflood mainchat option !
Title:
Post by: HPbaxxter on 18 June, 2005, 12:34:33
Yeah after the flooders  I`ve set the deflood for main chat in ptokax.
But the mainchat deflood is strong now that users will be kicked when they (fast 2 times the same text in 1 sec) typen.

And other flooders (TE) you can`t stop them with deflood. They aren`t using the same mainchat mess. there`s nothing to ban them direct en stop the flood.

That`s the reason i`m looking for some script (replace of anti-advertise) with a kick/ban option.
Title:
Post by: plop on 19 June, 2005, 01:44:34
QuoteOriginally posted by HPbaxxter
Yeah after the flooders  I`ve set the deflood for main chat in ptokax.
But the mainchat deflood is strong now that users will be kicked when they (fast 2 times the same text in 1 sec) typen.

And other flooders (TE) you can`t stop them with deflood. They aren`t using the same mainchat mess. there`s nothing to ban them direct en stop the flood.

That`s the reason i`m looking for some script (replace of anti-advertise) with a kick/ban option.
nick changes need a reconnect on dc.
so you need 2 thighten the "new connections from same IP" setting a bit on deflood.

plop
Title:
Post by: HPbaxxter on 20 June, 2005, 22:34:46
Ok, i`ll try it with the settings from deflood.
But, it`s not the same IP everytime that they use to flood.
For example: they used 50 different nicks and 10 different IP`s. And they don't connect behind each other with the same IP .
Here you can see:
06/16/05 00:32:27 User zurrtea4 enters the Hub with IP: 210.120.123.152
06/16/05 00:32:29 User zurrtea5 enters the Hub with IP: 203.144.143.3
06/16/05 00:32:33 User zurrtea9 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:35 User zurrtea11 enters the Hub with IP: 210.120.123.152
06/16/05 00:32:37 User zurrtea13 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:43 User zurrtea18 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:45 User zurrtea17 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:46 User zurrtea21 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:50 User MyFeetStink enters the Hub with IP: 83.248.152.135
06/16/05 00:32:51 User zurrtea23 enters the Hub with IP: 201.130.106.145
06/16/05 00:32:51 User zurrtea24 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:52 User zurrtea22 enters the Hub with IP: 201.130.106.145
06/16/05 00:32:52 User zurrtea25 enters the Hub with IP: 203.144.143.3
06/16/05 00:32:54 User zurrtea28 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:55 User zurrtea29 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:57 User zurrtea31 enters the Hub with IP: 203.144.143.6
Title:
Post by: Dessamator on 20 June, 2005, 23:02:48
ok then i could make the script,
 but im not sure about its effectiveness, the person seems to change the spam msg . so by the end of the day u might have to add 10 or more "word replace strings" !,

try showing us the cmd log from ptokax, there must be a pattern there somewhere, meanwhile try this :

-- "Replacin n Kickin" v0.1
-- By Dessamator
tWord ={["blah"]=1} -- the word to find
sReplace= "blah2" -- word to replace with
function ChatArrival(user,data)
data=string.sub(data,1,-2)
for i,v in tWord do
if string.find(data,i) then
SendToAll(user.sName,sReplace)
user:TempBan()
return 1
end
end
end
Title:
Post by: plop on 21 June, 2005, 01:23:48
QuoteOriginally posted by HPbaxxter
Ok, i`ll try it with the settings from deflood.
But, it`s not the same IP everytime that they use to flood.
For example: they used 50 different nicks and 10 different IP`s. And they don't connect behind each other with the same IP .
Here you can see:
06/16/05 00:32:27 User zurrtea4 enters the Hub with IP: 210.120.123.152
06/16/05 00:32:29 User zurrtea5 enters the Hub with IP: 203.144.143.3
06/16/05 00:32:33 User zurrtea9 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:35 User zurrtea11 enters the Hub with IP: 210.120.123.152
06/16/05 00:32:37 User zurrtea13 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:43 User zurrtea18 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:45 User zurrtea17 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:46 User zurrtea21 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:50 User MyFeetStink enters the Hub with IP: 83.248.152.135
06/16/05 00:32:51 User zurrtea23 enters the Hub with IP: 201.130.106.145
06/16/05 00:32:51 User zurrtea24 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:52 User zurrtea22 enters the Hub with IP: 201.130.106.145
06/16/05 00:32:52 User zurrtea25 enters the Hub with IP: 203.144.143.3
06/16/05 00:32:54 User zurrtea28 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:55 User zurrtea29 enters the Hub with IP: 203.144.143.6
06/16/05 00:32:57 User zurrtea31 enters the Hub with IP: 203.144.143.6

thighning up the settings on the "new connections from same ip" does it all.
it just takes a bit longer because there are more ip's 2 ban.
just make sure you changed the default disconnect in a tempban.
from a couple hours 2 maby a day or more.

plop
Title:
Post by: HPbaxxter on 21 June, 2005, 01:27:47
Hey Dessamator.

Thanks for the script. I`ll try this.
And when the flooder comes again, I paste the command from ptokax here.  :]
Title:
Post by: plop on 21 June, 2005, 01:27:52
QuoteOriginally posted by Dessamator
ok then i could make the script,
 but im not sure about its effectiveness, the person seems to change the spam msg . so by the end of the day u might have to add 10 or more "word replace strings" !,

try showing us the cmd log from ptokax, there must be a pattern there somewhere, meanwhile try this :

the script is indeed a bit pointless this way, takes a lot of effort for something which might work.
the cmd log would be a real need here, maby there is an error in the flooder which can be abused.

plop

*edit: forgot 2 say that deflood 5 kills this flooder, and that works basicly the same way as the deflood from ptokax.
just the default settings from my deflood script are a lot meaner.
Title:
Post by: HPbaxxter on 21 June, 2005, 01:40:46
so plop can you give me the setting you think that would work on the new connection from same IP in ptokax Deflood
Tempban        10  / 60 is what i've got right now
Title:
Post by: Dessamator on 21 June, 2005, 16:30:49
QuoteOriginally posted by plop
QuoteOriginally posted by Dessamator
ok then i could make the script,
 but im not sure about its effectiveness, the person seems to change the spam msg . so by the end of the day u might have to add 10 or more "word replace strings" !,

try showing us the cmd log from ptokax, there must be a pattern there somewhere, meanwhile try this :

the script is indeed a bit pointless this way, takes a lot of effort for something which might work.
the cmd log would be a real need here, maby there is an error in the flooder which can be abused.

plop

*edit: forgot 2 say that deflood 5 kills this flooder, and that works basicly the same way as the deflood from ptokax.
just the default settings from my deflood script are a lot meaner.


hmm, so basically he just needs to adjust the deflood,

and yah the script i made is a bit pointless, its just a temporary measure, while he finds another way to solve it .
Title:
Post by: HPbaxxter on 21 June, 2005, 18:40:17
QuoteOriginally posted by Dessamator
QuoteOriginally posted by plop
QuoteOriginally posted by Dessamator
ok then i could make the script,
 but im not sure about its effectiveness, the person seems to change the spam msg . so by the end of the day u might have to add 10 or more "word replace strings" !,

try showing us the cmd log from ptokax, there must be a pattern there somewhere, meanwhile try this :

the script is indeed a bit pointless this way, takes a lot of effort for something which might work.
the cmd log would be a real need here, maby there is an error in the flooder which can be abused.

plop

*edit: forgot 2 say that deflood 5 kills this flooder, and that works basicly the same way as the deflood from ptokax.
just the default settings from my deflood script are a lot meaner.


hmm, so basically he just needs to adjust the deflood,

and yah the script i made is a bit pointless, its just a temporary measure, while he finds another way to solve it .

Grrrrrrr.
Last night again an attack and "(of course)" with another text in mainchat, so that the script doesn`t work. The doubleip script that i used gives an error in ptok so they doesn`t work too.
Only the settings for same mainchat mess in deflood has work, and all the nicks where kicked.

But.... as you told before i`ve set the cmd in ptok on and i have all the cmd of last night.
I don`t know how to show you, there are a lot of IPs in.
It`s not a good idee when i paste it here i think :P
Title:
Post by: Dessamator on 21 June, 2005, 20:59:20
well, u can send it to me or to plop, in pm , maybe to PPK too, he might find something there ,

or just remove the Ips from the log and post it here :)
Title:
Post by: plop on 21 June, 2005, 22:38:34
QuoteOriginally posted by HPbaxxter
so plop can you give me the setting you think that would work on the new connection from same IP in ptokax Deflood
Tempban        10  / 60 is what i've got right now

download deflood 5 from my website, the settings i would advice are in the settings file from that.

pls email me the cmd log, lua at plop dot nl.
i'll arrange that dessamator and ppk get there hands on it.

plop
Title:
Post by: HPbaxxter on 22 June, 2005, 00:00:16
QuoteOriginally posted by Dessamator
ok then i could make the script,
 but im not sure about its effectiveness, the person seems to change the spam msg . so by the end of the day u might have to add 10 or more "word replace strings" !,

try showing us the cmd log from ptokax, there must be a pattern there somewhere, meanwhile try this :

-- "Replacin n Kickin" v0.1
-- By Dessamator
tWord ={["blah"]=1} -- the word to find
sReplace= "blah2" -- word to replace with
function ChatArrival(user,data)
data=string.sub(data,1,-2)
for i,v in tWord do
if string.find(data,i) then
SendToAll(user.sName,sReplace)
user:TempBan()
return 1
end
end
end

I will replace more words. Where can i add that? Which place in the script. Can you give me an example with 2 different words??
Title:
Post by: Dessamator on 22 June, 2005, 09:34:05
something like this:

tWord ={
["blah"]=1,
["blah blah"]=1,
}
Title:
Post by: GeceBekcisi on 22 June, 2005, 12:21:23
It's strictly forbidden to swear in our hub; so I'll prepare a word list and start using it immediately if this script can be modified to satisfy our needs; so can this script modified so that it will warn user for the first time; TempBan for 1440 minutes in second time, TempBan for 7200 minutes in third time and finally PermBan on the final occurance?

I already modified the script as above but it only timebans without caring its which time of swearing:-- "Replacin n Kickin" v0.1
-- By Dessamator
-- Modded to satisfy my needs
tWord ={["fuck"]=1} -- the word to find
sReplace= " ( I swore and being automaticly kicked. Good-Bye! ) " -- word to replace with
function ChatArrival(curUser,data)
data=string.sub(data,1,-2)
for i,v in tWord do
if string.find(data,i) then
SendToAll(curUser.sName,sReplace)
curUser:SendData(" Swearing in our hub is strictly forbidden and you'll be automatically TempBanned when you swear|")
curUser:SendData(" for a day in first time, TempBan for 3 days in third time and finally PermBan on the final occurance |")
curUser:TimeBan(1440)
return 1
end
end
end
Title:
Post by: H?LL?L?L??nG?L on 22 June, 2005, 12:31:02
LoL hey this is a kool script :P can u option  it so as masters dont get kicked if they swear or is mainly for everyone? :]  :]
thx
Title:
Post by: HPbaxxter on 22 June, 2005, 12:56:52
QuoteOriginally posted by Dessamator
something like this:

tWord ={
["blah"]=1,
["blah blah"]=1,
}

Ok, Thanks!!
I`ll try it  :P
Title:
Post by: plop on 22 June, 2005, 16:23:56
QuoteOriginally posted by H?LL?L?L??nG?L
LoL hey this is a kool script :P can u option  it so as masters dont get kicked if they swear or is mainly for everyone? :]  :]
thx
when you replace the bad language you remove the need 2 kick.
try my wordreplacer, should fit your needs.
here you can find it (http://ptxscriptdb.psycho-chihuahua.net/download.php?view.22)

plop
Title:
Post by: Dessamator on 22 June, 2005, 16:55:50
hmm, indeed i agree with plop, but just for reference, here is a sample script :

-- "Replacin n Kickin" v0.2
-- By Dessamator
-- Modded to satisfy my needs(HPbaxxter)

tUsers ={}
tWord ={["fuck"]=1} -- the word to find
sReplace= " ( I swore and being automaticly kicked. Good-Bye! ) " -- word to replace with

function ChatArrival(curUser,data)

tAction = {
[1] = function()
curUser:SendPM(frmHub:GetHubBotName()," Swearing in our hub is strictly forbidden and you'll be automatically TempBanned when you swear"..
" for a day in first time, TempBan for 5 days in third time and finally PermBan on the final occurance ")
-- warn
end,
[2] = function()
--do stuff
end,
[3] = function()
--do stuff
end,
[4] = function()
--do stuff
--tUsers[curUser.sName] =nil
end,
}
data=string.sub(data,1,-2)
for i,v in tWord do
if string.find(data,i) then
SendToAll(curUser.sName,sReplace)
if not tUsers[curUser.sName] then
tUsers[curUser.sName] = 1
return tAction[1](),1
elseif tUsers[curUser.sName] then
SendToAll("blah" )
tUsers[curUser.sName] = tUsers[curUser.sName] + 1
return tAction[tUsers[curUser.sName]](),1
end
return 1
end

end
end


maybe u can learn from it
Title:
Post by: GeceBekcisi on 22 June, 2005, 17:16:32
Will this script flush its history of users when scripts restarted? If so, can you please modify it to save history of events?

And also " Modded to satisfy my needs (GeceBekcisi) " is better ;)
Title:
Post by: plop on 23 June, 2005, 21:43:04
not fully tested yet but this script (http://ptxscriptdb.psycho-chihuahua.net/download.php?view.59) should kill it.
thx 2 HPbaxxter for sending me the log files, i found a small error in the flooder which this script is abusing.
you could say that i found an exploit in a exploiting tool. lol

plop
Title:
Post by: HPbaxxter on 24 June, 2005, 00:07:20
QuoteOriginally posted by plop
not fully tested yet but this script (http://ptxscriptdb.psycho-chihuahua.net/download.php?view.59) should kill it.
thx 2 HPbaxxter for sending me the log files, i found a small error in the flooder which this script is abusing.
you could say that i found an exploit in a exploiting tool. lol

plop

When does this script ban neptune? when the nick is Neptune or when there is an IP of neptune?. I`ll try to test is with the nick neptune, but nothing happened :P
And the log folder is already in scripts folder. i have to make a new folder? or is this script using the standard script folder in script map?

Since i set the deflood in ptok for same mainchat mess, the flooder get a ban. That`s working correct now :)
Title:
Post by: plop on 24 June, 2005, 00:58:58
QuoteOriginally posted by HPbaxxter
When does this script ban neptune? when the nick is Neptune or when there is an IP of neptune?. I`ll try to test is with the nick neptune, but nothing happened :P
And the log folder is already in scripts folder. i have to make a new folder? or is this script using the standard script folder in script map?

Since i set the deflood in ptok for same mainchat mess, the flooder get a ban. That`s working correct now :)

it doesn't use nicks or IP's.
ruri made a mistake and i used this 2 identify it.

plop
Title:
Post by: HPbaxxter on 24 June, 2005, 01:10:30
QuoteOriginally posted by plop
QuoteOriginally posted by HPbaxxter
When does this script ban neptune? when the nick is Neptune or when there is an IP of neptune?. I`ll try to test is with the nick neptune, but nothing happened :P
And the log folder is already in scripts folder. i have to make a new folder? or is this script using the standard script folder in script map?

Since i set the deflood in ptok for same mainchat mess, the flooder get a ban. That`s working correct now :)

it doesn't use nicks or IP's.
ruri made a mistake and i used this 2 identify it.

plop

Ok,
so i can`t test it :P.
And what`s your reaction on my question about the log folder?
Title:
Post by: HPbaxxter on 24 June, 2005, 01:45:47
By the way plop,
I get an error in ptokax when i used deflood5.
this one: Syntax D:\Program Files\Wouter ptokax\Wouter`s Hub\Ptokax16.09 Robo10.01b 29-03-05\scripts\deflood5.0_comp.lua too old: read version 4.0; expected at least 5.0

You know what to do??
Title:
Post by: plop on 24 June, 2005, 07:12:49
QuoteOriginally posted by HPbaxxter
By the way plop,
I get an error in ptokax when i used deflood5.
this one: Syntax D:\Program Files\Wouter ptokax\Wouter`s Hub\Ptokax16.09 Robo10.01b 29-03-05\scripts\deflood5.0_comp.lua too old: read version 4.0; expected at least 5.0

You know what to do??

deflood 5 is made for ptokax Testdrive, and therefor it's LUA 5.
on ptokax 0.3.3.x it's useless 2 run anyway as ppk stuffed it all inside ptokax itself.

the log folder is the same.

plop