//------------------------------------------------------------ // BadNames v3.0 // by Don // // Description: // This will kick a player who joins with a name that has a // character that is not in the bnallowed list or changes their // name during the game. // // Requirements: // ES 1.0 and ES Tools // http://forums.mattie.info/cs/forums/viewtopic.php?p=72409 // // Installation: // Save this file as es_badnames.txt in // cstrike/addons/eventscripts/badnames // Make sure you have either ES Tools installed. // Set the 2 variables for your liking. // put the following in your autoexec.cfg // es_load badnames // Restart your server. // //-------------------------------------------------------------- block load { // Put all the characters you allow in this list. es_xsetinfo bnallowed "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890!@#$%^&*()-+_=?.{}[]|\;:/<>" // Set this to how many seconds to wait before kicking user. es_xsetinfo bnkickdelay 5 // No need to edit below this line, // ------------------------------------------------------------ es_xsetinfo esbadnames_ver 3.0 es_makepublic esbadnames_ver es_xsetinfo bnstringok 0 es_xsetinfo bnokname 0 es_xsetinfo bnchkbad 0 es_xsetinfo bnchkid 0 es_xsetinfo bntempvar 0 } event player_connect { es est_isonly bnstringok event_var(name) server_var(bnallowed) if (server_var(bnstringok) = 0) do { es_tell event_var(userid) Your name contains a banned character es_delayed server_var(bnkickdelay) kickid event_var(userid) banned character in username } } event player_changename { es est_isonly bnstringok event_var(newname) server_var(bnallowed) if (server_var(bnstringok) = 0) do { es_tell event_var(userid) Your name contains a banned character. Change it and log back on. es_delayed server_var(bnkickdelay) kickid event_var(userid) banned character in username } }