Skip to content

Commit f78c2c8

Browse files
committed
Message to admin, if a player with an inappropriate name was denied access.
1 parent 86c40d0 commit f78c2c8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/mission/lua/callbacks.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ function mission.onPlayerTryConnect(addr, name, ucid, playerID)
7070
local name2 = Censorship.censor(name)
7171
log.write('DCSServerBot', log.DEBUG, 'Censored nickname: ' .. name2)
7272
if name ~= name2 then
73+
local msg = {
74+
command = 'sendMessage',
75+
message = 'User ' .. name .. ' (ucid=' .. ucid .. ') rejected due to inappropriate nickname.'
76+
}
77+
utils.sendBotTable(msg, dcsbot.params['mission']['channels']['admin'])
7378
return false, config['messages']['message_player_inappropriate_username']
7479
end
7580
end

0 commit comments

Comments
 (0)