My C-D moderator plugin recently stopped kicking No C-D'rs since I updated the new ver of C-D or since a recent steam update. It used to kick a flagged player as soon as C-D added No C-D to their name. Here's what I have:
Edit: After a little testing it looks as if client_infochanged no longer gets called when C-D changes a players name. Is this maybe because C-D runs without metamod now? I revised the plugin and it's working again so no worries.
Code:
public client_infochanged(id)
{
new newname[9],oldname[9],authid[32]
new buffer[2], oldnamefull[32]
//new customdir[128]
//new rulesfile[128]
get_user_info(id, "name", newname,8)
get_user_name(id,oldname,8)
get_user_name(id,oldnamefull,31)
get_user_authid(id,authid,31)
//get_customdir(customdir, sizeof(customdir))
//format(rulesfile, sizeof(rulesfile), "%s/motd2.txt", customdir)
//When C-D changes a players name for not having C-D
//this will check the vault to see if the player was kicked before
//by the plugin. If so then they get kicked again and again until they have it.
if (!equali(newname,oldname))
{
if ( equali(newname,"[No C-D]") || equali(newname,"[Old C-D") )
{
get_vaultdata(authid, buffer, 1)
if( equal(buffer,"1") )
{
//motdshown[id] = 1
//show_motd ( id , rulesfile , "Cheating-Death Required" )
server_cmd( "kick #%i %s" , get_user_userid(id) ,"You will be kicked until you have Cheating-Death [www.unitedadmins.com/cdeath.php]" )
client_print(0,print_chat,"%s kicked for returning to server without C-D after being kicked.",oldnamefull)
}
}
}
}