- "SELECT charId FROM characters WHERE `account_name`= " + _user+" AND `online`=1";
You could, for example, do:
- "SELECT charId FROM characters WHERE `account_name`= " + _user;
then loop over the resultset:
- L2World w = L2World.getInstance();
- L2PcInstance tmp;
- while (rset.next())
- {
- tmp = w.getPlayer(rset.getInt("charId"));
- if ((tmp != null) && !tmp.getClient().isDetached())
- {
- tmp.logout();
- }
- }
Sucks that l2j doesn't have an Account object, would help in this case.
