searching 4 a wordreplace 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

searching 4 a wordreplace script

Started by HaL, 02 January, 2004, 11:34:31

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

HaL

hi @all

im searching 4 a wordreplace script, that replaces some words in main chat.
I know that PtokaX can do this but the HUBsoft is not on my
computer.
So i would do this per script
like this

i wrote in mainchat  fuck and it will be replaced with f*** or anything else

and the list of replaced words should be managed with some cmd?s

!addword fuck=f***
!listwords
1. fuck=f***
2. bla=blub
3.
!delword 2

i don?t know if there is allready a script that can do this
or if here is some   one who can write that script

thx 4 all your help
greetz HaL

plop

allin1 can do it and there are some more.
if you can't find a standalone script post 1 of those here and there must be some1 willing 2 make it into a standalone script.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

HaL

#2
here it is ALLIN1 script

what i need is a word replace standalone script
thx 4 all your great work


code:--------------------------------------------------------------------------------
--ConnectionCheck by aMutex 12.01.2003
--DC++ Only by Mephiska - 01.09.2003
--DC++ Max slots LUA script by aMutex 04.02.2003
--DC++ minver bot by Skrollster 6-Feb, 2003
--DC++ Upload limit kick by piglja 10-Feb, 2003
--Compiled together and verbose debug mod by D@zzler 11-feb, 2003
--Optimized a bit by Skrollster 11-feb, 2003
--MinShare by Piglja - 18/2/2003
--Anti mldonkey by JJay - 29.12.2002
--Illegalist by Ptaczek, Jan-3, 2003
--Time Bot by Piglja - 12/2/2003
--TrickerBot by Ptaczek - Dec-24,2002
--MaxShare bot maded by piglja - 16/02/03
--Antiadvertisement bot by SRJbb99 - 06/01/03
--Hub Mass Message Bot made by SRJbb99 10/01/03
--Min Upload Speed checker:
---Bugs made by piglja;-) 10-feb, 2003
---Piglja's Bugs fixed by Skrollster =)) 11-feb, 2003
---Skrollster bugs fixed by aMutex 11-feb, 2003
---someones bug fixed by aMutex 13-feb, 2003
--Puted together and modifyed a bit by Piglja;) - 18/2/2003
--Large description, isn't it?
--As usual, optimized By Skrollster 19/3/2003
--Bug fix of Skrollsters bugs By Skrollster
--Added a FakeShare detector on connection to keep particular fakers out by someone I don't remember who and edited and optimized by piglja - 11.03.03
--Removed a modem and isdn ban by piglja - 30.03.03
--Modifyed AntiAdvertisement bot and made more usefull by piglja - 29.03.03


botName = "AllIn1"
OpChatName = "OpChat"
forbiddenWords = { "mldonkey","mldc" }
maxslots = 30
minver = 0.181
lock = 10000
not1 = "www."
not2 = "http://"
not3 = "UrHubAddressHere"



badShare = { "10000000000","5368709120","10737418240","13630010000","16106127360",
"21474836480","26843545600","27000000000","32212254720","7970010000",
"37580963840","37970010000","6599201000000","65992010000000","36772010000000",
"3677201000000","42949672960","48318382080","214266156265","53687091200",
"59055800320","1747201000000","16772010000000","147720100000000","10240000000000",
"64424509440","65719010000","69793218560","75161927680","80530636800","85899345920",
"91268055040","96636764160","102005473280","102400000000","107374182400","118648471552",
"128849018880","140301549174","161061273600","174720100000","183287729356","214748364800",
"268435456000","322122547200","375809638400","397760100000","429496729600","536870912000",
"657190100000","1024000000000","183287729357","102392020337","13625783747","174719269601",
"65712999629","26993869455","140295106724","21171699199" }

Files = {
["F?T?0?7?preteen"]="Please don't share porn in here!",
["F?T?0?6?preteen"]="Please don't share porn in here!",
["F?T?0?7?andrew blake"]="Please don't share porn in here!",
["F?T?0?6?andrew blake"]="Please don't share porn in here!",
["F?T?0?7?masturbati"]="Please don't share porn in here!",
["F?T?0?6?masturbati"]="Please don't share porn in here!",
["F?T?0?7?handjob"]="Please don't share porn in here!",
["F?T?0?6?handjob"]="Please don't share porn in here!",
["F?T?0?7?incest"]="Please don't share porn in here!",
["F?T?0?7?schoolgirl"]="Please don't share porn in here!",
["F?T?0?6?schoolgirl"]="Please don't share porn in here!",
["F?T?0?7?teenage sex"]="Please don't share porn in here!",
["F?T?0?6?teenage sex"]="Please don't share porn in here!",
["F?T?0?7?-moi$lolita"]="Please don't share porn in here!",
["F?T?0?6?-moi$lolita"]="Please don't share porn in here!",
["F?F?0?1?MyList.bz2"]="Do not share unzipped DC folder here!",
["F?F?0?1?.tmp"]="Do not share temporaly files here!",
["F?F?0?1?__incomplete__"]="Do not share incompleted files here!",
["F?F?0?1?taskman.exe"]="Do not share Windows directory here!",
["F?F?0?1?msoobe.exe"]="Do not share Program Files directory here!",
["F?F?0?1?hmmapi.dll"]="Do not share Program Files directory here!",
["F?F?0?1?MyList.DcLst"]="Do not share unzipped DC folder here!",
["F?F?0?1?msimn.exe"]="Do not share Program Files directory here!",
["F?F?0?1?windowsshell.manifest"]="Do not share Windows directory here!",
["F?F?0?1?explorer.scf"]="Do not share Windows directory here!",
}

trigs = {
lol="Yeah, that was funny [USER]. Haha.",
bye="See ya [USER]",
ptokax="Oh Yeah, PtokaX ",
fuck="Watch IT [USER]! One more line of code and i could kick your ass!",
["shut up"]="Make me!",
piglja="hmm, really?"
}

trigs2 = {
["dns2go"]=1,
["myftpsite"]=2,
["servebeer"]=3,
["mine.nu"]=4,
["ip.com"]=5,
["dynip"]=6,
["staticip"]=7,
["serveftp"]=8,
["ipactive"]=9,
["ip.org"]=10,
["no-ip"]=11,
["servegame"]=12,
["ath.cx"]=13,
["dyndns"]=14,
["68.67.18.75"]=15,
["clanpimp"]=16,
["idlegames"]=17,
["sytes"]=18,
["24.184.64.48"]=19,
["uni.cc"]=20,
["151.198.149.60"]=21,
["homeunix"]=22,
["24.209.232.97"]=23,
["deftonzs.com"]=24,
["24.187.50.121"]=25,
["flamenap"]=26,
["xs4all"]=27,
["no-ip"]=28,
["serveftp"]=29,
["myftp"]=30,
["d2g"]=31,
["151.198.149.60"]=32,
["24.184.64.48"]=33,
["hopto.org"]=34,
["orgdns"]=35
}

Kicked = {}

function NewUserConnected(user)
user:SendPM(botName, "Hello "..user.sName..". Welcome to "..frmHub:GetHubName() )
user:SendPM(botName, "We have such settings: ")
user:SendPM(botName, ""..maxslots.." is the maximum slots we allow,")
user:SendPM(botName, "Version "..minver.." is the oldest DC++ version we allow in this hub")
user:SendPM(botName, "If U are using BCDC++, then U should limit not less than "..lock.." kb/s by slot")
user:SendPM(botName, "Have a nice downloading:)")

if (not strfind(user.sMyInfoString,"<++")) then
SendToNick(user.sName, "<" ..botName .."> You are using unauthorized client software, please go to http://dcplusplus.sourceforge.net and download the newest version of DC++")
SendToNick(user.sName, "<" ..botName .."> Disconnecting...")
user:Disconnect()
else
_,b, dcver = strfind(user.sMyInfoString,"V%x.%x+)")
_,b, slots = strfind(user.sMyInfoString,"S%d+)",b)
_,b, bs = strfind(user.sMyInfoString,"B%x+)")
if (bs == nil) then
_,b, bs = strfind(user.sMyInfoString,"b%x+)")
if (be == nil) then
bs = 1000000
end
end

if (tonumber(slots) > maxslots) then
SendToAll( "PtokaX","" ..user.sName.. " had "..slots.." slots open, too much for here ... Max : "..maxslots.." ?")
SendToNick(user.sName, "<"..botName.."> You have "..slots.." slots open")
SendToNick(user.sName, "<"..botName.."> Please open max "..maxslots.." slots!")
SendToNick(user.sName, "<"..botName.."> Disconnects...")
user:Disconnect()
elseif (tonumber(dcver) < minver) then
SendToAll( "PtokaX","" ..user.sName.. " is using DC++ "..dcver..", too old for this hub ?")
SendToNick(user.sName, "<"..botName.."> You are using dc++ version "..dcver)
SendToNick(user.sName, "<"..botName.."> The oldest version allowed is "..minver..", you may download the latest at http://dcplusplus.sourceforge.net")
SendToNick(user.sName, "<"..botName.."> Disconnects...")
user:Disconnect()
elseif (lock > tonumber(bs)) then
SendToAll( "PtokaX","" ..user.sName.. " is using an upload limited DC++, please change the upload minimum to "..lock.." or get out of here ?")
SendToNick(user. sName, "<"..botName.."> use a not modified dc++, or use this one without a speed blocker")
SendToNick(user.sName, "<"..botName.."> you may download the latest at dc++ http://dcplusplus.sourceforge.net")
user:Disconnect()
else
local data=user.sMyInfoString
local _,_,cmd = strfind( data, "[$]+[^$]+[$]+[^$]+[$]+[^$]+[$]+([^$]+)" )
local t = tokenize(user.sMyInfoString,"$")
local num = tonumber(t[getn(t)])
if (strfind(cmd,"28.8K")) then
user:SendPM(botName,"no28.8 modem allowed in here ...")
user:Disconnect()
else

for key,checkWord in forbiddenWords do
if strfind(user.sMyInfoString, checkWord, 1, 1) then
SendToNick(user.sName, "<" ..botName .."> You are using unauthorized client software, please read the Rules section, Thankyou!")
SendToNick(user.sName, "<" ..botName .."> Disconnecting...")
user:Disconnect()
break
end
end

if( Kicked[user.sName] == 1 ) then
Kicked[user.sName] = nil
end

for i,v in Files do
local lngBotNr = random(1, 100000)
user:SendData("$Search Hub:"..botName..lngBotNr.." "..i)
end
end
end
end
if checkFake(user) then user:SendData("*** You seem to be using a fakeshare client")
user:Disconnect()
end
end

function DataArrival(user, data)
local s,e,cmd = strfind(data, "%b<>(%S+)")
if( strsub(data, 1, 3) == "$SR" ) then
_,_,nick = strfind( data, "\05(%S*)|$" )
if (strsub(nick, 1, strlen(botName)) == botName and Kicked[user.sName] == nil ) then
Kicked[user.sName] = 1
Reason = FindWhat(data)
SearchPat = FindWhot(data)
SendPmToOps("Illegal","*** User "..user.sName.." was kicked because of: "..Reason)
user:SendPM(botName, "U were kicked because: "..Reason)
user:Disconnect()
end

elseif (( strsub(data, 1, 1) == "<" ) or ( strsub(data, 1, 4) == "$To:" )) then
-- remove end pipe
data=strsub(data,1,strlen(data)-1)

if (strfind(strlower(data), strlower("+time"))) then
time()

elseif (strsub(data, 1, 1) == "<") then
local s,e,msg = strfind(data, "%b<>(.+)")

if(user.bOperator and msg == "massmsg") then
local s,e,msg = strfind(data, "%b<>%S+%s+(%S+)")
SendPmToAll("Hub Mass Message from "..user.sName, msg)

else
for key, value in trigs do
if( strfind( strlower(msg), key) ) then
answer, x = gsub(value, "%b[]", user.sName)
SendToAll( botName, answer )
break
end
end

if (not user.bOperator) then
for key,a in trigs2 do
if( strfind( strlower(data), key) and (strfind( strlower(data), not1))) then
return 0
elseif( strfind( strlower(data), key) and (strfind( strlower(data), not2))) then
return 0
elseif( strfind( strlower(data), key) and (strfind( strlower(data), not3))) then
return 0
elseif( strfind( strlower(data), key) ) then
SendToAll( botName, user.sName.." has been kicked because of advertising." )
user:Kick("Do not advertise here!")
return 1
end end
end
end
end
end
end


function tokenize (inString,token)
_WORDS = {}
local matcher = "([^"..token.."]+)"
gsub(inString, matcher, function (w) tinsert(_WORDS,w) end)
return _WORDS
end

function OpConnected(user)
if( Kicked[user.sName] == 1 ) then
Kicked[user.sName] = nil
end
for i,v in Files do
local lngBotNr = random(1, 100000)
user:SendData("$Search Hub:"..botName..lngBotNr.." "..i)
end
end

function FindWhat(data)
local iFind = ""
for i,v in Files do
_,_,iFind = strfind(i, "%a%?%a%?%d%?%d%?(.+)")
if( strfind(strlower(data), strlower(iFind)) ) then
return v.." Filtreets: "..data
end
end
return "Other files"
end

function FindWhot(data)
local iFind = ""
for i,v in Files do
_,_,iFind = strfind(i, "%a%?%a%?%d%?%d%?(.+)")
if( strfind(strlower(data), strlower(iFind)) ) then
return iFind
end
end
return "Other files"
end

function time()
H = date("%H")
M = date("%M")
D = date("%d")
MM = date("%m")
Y = date("%y")
Time = ("It's now "..D.."."..MM.."."..Y.." - "..H.." : "..M.."")
SendToAll("Time Bot",Time)
end

function checkFake(user)
local s, e, shared = strfind(user.sMyInfoString, "$ALL %S+ .-$ $.+.$.-$(%d+)")
return foreachi(badShare, function(id, value) if value == %shared then return id end end)
end
--------------------------------------------------------------------------------

SMF spam blocked by CleanTalk