41 lines
1.1 KiB
Python
41 lines
1.1 KiB
Python
"""
|
|
Backwards-compatible wrapper for the refactored Terminal Chat application.
|
|
|
|
This file maintains the original server.py interface but imports from the new modular structure.
|
|
For new code, import directly from the specific modules (constants, models, chat_server, ui, ssh_server).
|
|
|
|
To run the application, use: python main.py
|
|
"""
|
|
|
|
# Re-export all components for backwards compatibility
|
|
from constants import USER_COLORS, COLORS
|
|
from models import Channel, DirectMessage, UserConnection
|
|
from chat_server import ChatServer
|
|
from ui import ChatHistory, TerminalChatApp
|
|
from ssh_server import start_ssh_server, SSHChatServer, handle_client
|
|
from main import start_terminal_chat, main
|
|
|
|
# Create a global chat_server instance for backwards compatibility
|
|
chat_server = ChatServer()
|
|
|
|
# Re-export for compatibility
|
|
__all__ = [
|
|
'USER_COLORS',
|
|
'COLORS',
|
|
'Channel',
|
|
'DirectMessage',
|
|
'UserConnection',
|
|
'ChatServer',
|
|
'chat_server',
|
|
'ChatHistory',
|
|
'TerminalChatApp',
|
|
'start_terminal_chat',
|
|
'start_ssh_server',
|
|
'SSHChatServer',
|
|
'handle_client',
|
|
'main',
|
|
]
|
|
|
|
if __name__ == "__main__":
|
|
main()
|