1
so that i can say all players with the name déjavu... gets automatically banned by join is it possible??
It's possible, but I wouldn't advise it.
http://failboat.me/2009/wordfilter-in-lua/
download the zip file
extract into sys/lua/ folder
edit the first 2 lines of filter.lua to
1
2
2
if not string.trim then dofile("sys/lua/string.lua") end if not table.find then dofile("sys/lua/table.lua") end
Add the following to server.lua
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
38
39
40
41
42
43
44
45
46
47
48
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
38
39
40
41
42
43
44
45
46
47
48
dofile('sys/lua/filter.lua') function alter_filter(words) 	words = words or wordlist 	local cache = "" 	for word in wordlist do 		cache = cache .. word .. ",\n" 	end 	cache = cache:sub(1, #cache-2) 	 	f_handle = open('sys/lua/badwords.txt') 	f_handle:write(cache) 	f_handle:close() end addhook("join", "filter_join") function filter_join(p) 	local name = player(p, "name") 	if filter(name) then 		parse("kick "..p) 	end end addhook("say", "filter_add") function filter_add(p, cmd) 	cmd = cmd:split() 	if cmd[1] == 'add_name' then 		table.remove(cmd, 1) 		cmd = string.join(cmd, " "):trim() 		table.insert(wordlist, cmd) 		msg2(p, cmd.." was added to the list") 	elseif cmd[1] == 'rem_name' then 		table.remove(cmd, 1) 		cmd = string.join(cmd, " "):trim() 		local p = table.find(wordlist, cmd) 		if p then 			table.remove(wordlist, p) 		else 			msg2(p, "Can not remove - Not found") 		end 	else 		return 	end 	return 1 end
Note: I wrote this on the fly so you'll have to try to debug it if anything comes up. Edit badwords.txt to get a list of unplayable names. Read the syntax for the words on
http://failboat.me/2009/wordfilter-in-lua/