int tcbug(string id, int exp)
{
    object who;
    
    who = UPDATE_D->global_find_player(id);

    if (who)
    {
        who->add("combat_exp", exp);
        who->add("daoxing", exp);
        who->add("potential", exp/8);
        log_file("TCBUG",id + " exp and dx "+exp+" and pot "+exp/8+"\n");
        UPDATE_D->global_destruct_player(who, 1); 
        return 1;
    }
    else
    {
        log_file("TCBUG_F",id + " faild exp and dx "+exp+" and pot "+exp/8+"\n");
        UPDATE_D->global_destruct_player(who);
        return 0;
    }
}
#define TCBUG "/tcbug"
int main()
{
	string* ids;
	string id;
	int exp, cnt;

    ids = explode(read_file(TCBUG), "\n");

    for (int i = 0; i < sizeof(ids); i++)
    {
         if (sscanf(ids[i], "%s|%d", id, exp) != 2 )
             continue;
         write("id:"+id+" exp:"+exp+"\n");

                cnt += tcbug(id, -exp);
		write(cnt+"\n");
    } 
	
    return 1;
}
