diff --git a/pandatool/src/text-stats/textMonitor.cxx b/pandatool/src/text-stats/textMonitor.cxx index 2310a63458..24ac330f3a 100644 --- a/pandatool/src/text-stats/textMonitor.cxx +++ b/pandatool/src/text-stats/textMonitor.cxx @@ -40,6 +40,29 @@ got_hello() { << get_client_hostname() << "\n"; } +//////////////////////////////////////////////////////////////////// +// Function: TextMonitor::got_bad_version +// Access: Public, Virtual +// Description: Like got_hello(), this is called when the "hello" +// message has been received from the client. At this +// time, the client's hostname and program name will be +// known. However, the client appears to be an +// incompatible version and the connection will be +// terminated; the monitor should issue a message to +// that effect. +//////////////////////////////////////////////////////////////////// +void TextMonitor:: +got_bad_version(int client_major, int client_minor, + int server_major, int server_minor) { + nout + << "Rejected connection by " << get_client_progname() + << " from " << get_client_hostname() + << ". Client uses PStats version " + << client_major << "." << client_minor + << ", while server expects PStats version " + << server_major << "." << server_minor << ".\n"; +} + //////////////////////////////////////////////////////////////////// // Function: TextMonitor::new_data // Access: Public, Virtual diff --git a/pandatool/src/text-stats/textMonitor.h b/pandatool/src/text-stats/textMonitor.h index 76afdf5351..60a0c7061b 100644 --- a/pandatool/src/text-stats/textMonitor.h +++ b/pandatool/src/text-stats/textMonitor.h @@ -22,6 +22,8 @@ public: virtual string get_monitor_name(); virtual void got_hello(); + virtual void got_bad_version(int client_major, int client_minor, + int server_major, int server_minor); virtual void new_data(int thread_index, int frame_number); virtual void lost_connection(); virtual bool is_thread_safe();