Beispiel #1
0
  public void KillSession(Channel Channel) {
    Session mSession = GrabSession(Channel);

    try {
      mSession.GrabHabbo().RefreshMessenger(false);
    } catch (SQLException e) {
    }

    if (mSession.GrabActor().InRoom()) {
      mSession.LeaveRoom();
    }

    SessionList.remove(Channel);

    // if (!mSession.RecievedPolicy)
    // {
    Grizzly.GrabDatabase()
        .RunFastQuery(
            "UPDATE server_users SET online = '0' WHERE id = '" + mSession.GrabHabbo().ID + "'");
    // }

    Grizzly.WriteOut(
        "Killed communication with " + mSession.GrabIP() + " [" + mSession.GrabID() + "]");

    mSession.GrabChannel().disconnect();

    mSession = null;

    System.gc();
  }
Beispiel #2
0
  public Session CreateSession(Channel Channel) {
    Session mSession = new Session(Channel, (SessionList.size() + 1));

    SessionList.put(Channel, mSession);

    Grizzly.WriteOut(
        "Started communication with " + mSession.GrabIP() + " [" + mSession.GrabID() + "]");

    return mSession;
  }