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();
  }
  public void InvokeCommand(String Command) {
    if (!Commands.containsKey(SplitCommand(Command, true)[0])) {
      Grizzly.WriteOut(Command + " is not a valid Console Command!");
      return;
    }

    Commands.get(SplitCommand(Command, true)[0]).Parse(SplitCommand(Command, false));
  }
Beispiel #3
0
 public Session GrabSession(Channel Channel) {
   if (SessionList.containsKey(Channel)) {
     return SessionList.get(Channel);
   } else {
     Grizzly.WriteOut("For some reason Grizzly tried to retrieve an empty session!!");
     return null;
   }
 }
Beispiel #4
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;
  }