V3ct0r 2,117 Report post Posted March 21, 2016 Auto-ban Credits: insider The following SQL trigger will ban a player when he enters the game, if there are already banned accounts with the same MAC-address. USE AccountServer GO CREATE TRIGGER auto_ban ON account_login AFTER UPDATE AS BEGIN IF UPDATE(last_login_mac) BEGIN DECLARE @mac varchar(50), @count int SELECT @mac = last_login_mac FROM inserted SELECT @count = COUNT(*) FROM account_login WHERE last_login_mac = @mac AND ban = 1 AND last_login_mac <> '00-00-00-00-00-00-00-00' AND last_login_mac <> '' IF @count <> 0 BEGIN ROLLBACK UPDATE account_login SET ban = 1 WHERE last_login_mac = @mac AND ban = 0 END END END How to install: Open MSSQL Management studio and press button 'New Query' on tool bar or CTRL + N. Then execute (F5) the SQL Query above: 4 Quote Some useful links / Полезные ссылки Tips for making a topic in 'Questions & Help' / Рекомендации по созданию тем в разделе "Помощь" Server Advertising Section Rules / Правила раздела "Реклама серверов" Available e-mail domains for registration / Допустимые e-mail домены для регистрации User groups / Группы пользователей User ranks / Звания пользователей "Broken" pictures on the forum / "Битые" изображения на форуме Beware of scammers! / Осторожно, мошенники! My developments / Мои разработки Mods for client and server / Моды для клиента и сервера PKOdev.NET website for Tales of Pirates Server / PKOdev.NET веб-обвязка для сервера Пиратии I do not provide any help in private messages and outside the forum. Use 'Questions & Help' section please. Thank you for understanding! Я не оказываю какую-либо помощь в личных сообщениях и вне форума. Пожалуйста, используйте раздел "Пиратия: Помощь". Благодарю за понимание! Share this post Link to post Share on other sites
Sultan 68 Report post Posted April 2, 2016 (edited) Very helpful, thanks! Just leaving this here if you wish to Disable the trigger: Run New Query with this: USE AccountServer GO ; DISABLE TRIGGER dbo.auto_ban ON dbo.account_login I believe if you want it to be enabled just change 'DISABLE' to 'ENABLE' (Untested) Edited April 2, 2016 by Sultan Quote Share this post Link to post Share on other sites