implement a :ping command, maybe it's useful for something..

This commit is contained in:
Gunter Labes 2007-12-10 17:28:16 +00:00
parent abaa5a706d
commit 0b4824a2fb

View file

@ -2104,6 +2104,10 @@ private:
}
} else if (cmd == "theme") {
preferences::show_theme_dialog(*gui_);
} else if (cmd == "ping" && network::nconnections() != 0) {
config ping;
ping["ping"] = lexical_cast<std::string>(time(NULL));
network::send_data(ping, 0, true);
} else if((cmd == "ban" || cmd == "kick") && network::nconnections() != 0) {
config cfg;
config& ban = cfg.add_child(cmd);