--- a/sources/main.cpp Fri May 15 18:36:22 2015 +0300 +++ b/sources/main.cpp Fri May 15 20:03:35 2015 +0300 @@ -48,10 +48,10 @@ return EXIT_FAILURE; } - Interface::initialize(); + Interface iface; if (argc == 3) - Interface::connect (argv[1], argv[2]); + iface.connect (argv[1], argv[2]); try { @@ -65,24 +65,24 @@ FD_ZERO (&fdset); FD_SET (0, &fdset); - { - int fd = RCONSession::get_session()->socket()->file_descriptor(); - highest = max (highest, fd); - FD_SET (fd, &fdset); - } + int fd = iface.get_session()->socket()->file_descriptor(); + highest = max (highest, fd); + FD_SET (fd, &fdset); select (highest + 1, &fdset, nullptr, nullptr, &timeout); if (FD_ISSET (0, &fdset)) + { // stdin is ready, what's incoming? - Interface::handle_input(); + iface.handle_input(); + } - RCONSession::get_session()->tick(); - Interface::render(); + iface.get_session()->tick(); + iface.render(); } } catch (const Exitception&) {} - RCONSession::get_session()->disconnect(); + iface.get_session()->disconnect(); return EXIT_SUCCESS; }