Forum

> > CS2D > Scripts > If name contains s.a then kick reason s.o
Forums overviewCS2D overview Scripts overviewLog in to reply

English If name contains s.a then kick reason s.o

9 replies
To the start Previous 1 Next To the start

old If name contains s.a then kick reason s.o

Bobakrome
User Off Offline

Quote
I tried to make a script that if the name contains: OTR9ID or NoPain

Then kicked by reason "Your clan isn't allowed there"

I tried something but didnt succseed

Spoiler >

old Re: If name contains s.a then kick reason s.o

Apache uwu
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
addhook("join","_join")
addhook("name","_name")

blockedStrings={
	"OTR9ID",
	"NoPain",
}

for key,str in ipairs(blockedStrings) do
	blockedStrings[key]=string.lower(str)
end

function _join(id)
	if inString(player(id,"name"),blockedStrings) then
		kickDelay(id)
	end
end

function _name(id,oldname,newname)
	if inString(newname,blockedStrings) then
		parse("kick "..id.." \"Your clan isn't allowed here.\"")
	end
end

function inString(str,unacceptable)
	str=string.lower(str)
	for _,unaccept in ipairs(unacceptable) do
		if str.find(str,unaccept)~=nil then
			return true
		end
	end
	return false
end

function kickDelay(id)
	timer(100,"parse","kick "..id.." \"Your clan isn't allowed here.\"")
end

Like this?

old Re: If name contains s.a then kick reason s.o

Bobakrome
User Off Offline

Quote
Idk i will see anyway i saw all your mods and they are awesome , ur one of best scripters. but can you make the rocket turret , when you are killed to type "Rocket Turret" and can you make a launcher like bazooka at normal turret, i mean i got sprites

EDIT -- In deathmatch mode attacks just cts..

old Re: If name contains s.a then kick reason s.o

HEROin
User Off Offline

Quote
Will it work if they change something in clanname?
For example:
before OTR9ID
after O.T.R.9I.D.
Old method: change name join spectators and ban them one by one or find moderators(more easy and I think every server need atleast 2 mods).

old Re: If name contains s.a then kick reason s.o

Apache uwu
User Off Offline

Quote
user HEROin has written
Will it work if they change something in clanname?
For example:
before OTR9ID
after O.T.R.9I.D.
Old method: change name join spectators and ban them one by one or find moderators(more easy and I think every server need atleast 2 mods).


Hmm well that's how most systems are bypass-able:

such as a swear filter, "fu.ck" or "f uck" or any "dead" characters could be used. You either need to use regexp or get some mods that are on 24/7 (or fit that time frame)
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview