Ejemplo n.º 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();
  }
Ejemplo n.º 2
0
  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));
  }
Ejemplo n.º 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;
   }
 }
Ejemplo n.º 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;
  }