[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth src/server/game.cpp src/server/server.c...
From: |
Isaac Clerencia |
Subject: |
[Wesnoth-cvs-commits] wesnoth src/server/game.cpp src/server/server.c... |
Date: |
Thu, 21 Jul 2005 16:19:15 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Isaac Clerencia <address@hidden> 05/07/21 20:19:15
Modified files:
src/server : game.cpp server.cpp
po/wesnoth-editor: fr.po
po/wesnoth-tdh : fr.po
Log message:
dos2unix
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/server/game.cpp.diff?tr1=1.40&tr2=1.41&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/server/server.cpp.diff?tr1=1.84&tr2=1.85&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/po/wesnoth-editor/fr.po.diff?tr1=1.32&tr2=1.33&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/po/wesnoth-tdh/fr.po.diff?tr1=1.37&tr2=1.38&r1=text&r2=text
Patches:
Index: wesnoth/po/wesnoth-editor/fr.po
diff -u wesnoth/po/wesnoth-editor/fr.po:1.32
wesnoth/po/wesnoth-editor/fr.po:1.33
--- wesnoth/po/wesnoth-editor/fr.po:1.32 Wed Jul 20 12:53:23 2005
+++ wesnoth/po/wesnoth-editor/fr.po Thu Jul 21 20:19:15 2005
@@ -1,10 +1,10 @@
-# French translations for the Battle for Wesnoth editor
-# vim:set encoding=utf-8:
-# Traduction anglaise de l'éditeur de Battle for Wesnoth.
-# Copyright (C) 2004 THE Battle for Wesnoth'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the Battle for Wesnoth
package.
-# French Wesnoth translation team <address@hidden>, 2004.
-#
+# French translations for the Battle for Wesnoth editor
+# vim:set encoding=utf-8:
+# Traduction anglaise de l'éditeur de Battle for Wesnoth.
+# Copyright (C) 2004 THE Battle for Wesnoth'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the Battle for Wesnoth
package.
+# French Wesnoth translation team <address@hidden>, 2004.
+#
msgid ""
msgstr ""
"Project-Id-Version: Battle for Wesnoth 0.8.4-CVS\n"
Index: wesnoth/po/wesnoth-tdh/fr.po
diff -u wesnoth/po/wesnoth-tdh/fr.po:1.37 wesnoth/po/wesnoth-tdh/fr.po:1.38
--- wesnoth/po/wesnoth-tdh/fr.po:1.37 Wed Jul 20 12:53:24 2005
+++ wesnoth/po/wesnoth-tdh/fr.po Thu Jul 21 20:19:15 2005
@@ -1,13 +1,13 @@
-# #-#-#-#-# wesnoth-tdh.po (wesnoth-tdh) #-#-#-#-#
-# translation of wesnoth-tdh.po to French
-# Language french translations for Battle for Wesnoth package
-# vim:set encoding=utf-8:
-# Traduction anglaise du package Battle for Wesnoth.
-# Copyright (C) 2004 THE Battle for Wesnoth'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the Battle for Wesnoth
package.
-# French Wesnoth translation team <address@hidden>, 2004.
-# Yann Dirson <address@hidden>, 2004.
-#
+# #-#-#-#-# wesnoth-tdh.po (wesnoth-tdh) #-#-#-#-#
+# translation of wesnoth-tdh.po to French
+# Language french translations for Battle for Wesnoth package
+# vim:set encoding=utf-8:
+# Traduction anglaise du package Battle for Wesnoth.
+# Copyright (C) 2004 THE Battle for Wesnoth'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the Battle for Wesnoth
package.
+# French Wesnoth translation team <address@hidden>, 2004.
+# Yann Dirson <address@hidden>, 2004.
+#
msgid ""
msgstr ""
"Project-Id-Version: Battle for Wesnoth 0.7.11-CVS\n"
Index: wesnoth/src/server/game.cpp
diff -u wesnoth/src/server/game.cpp:1.40 wesnoth/src/server/game.cpp:1.41
--- wesnoth/src/server/game.cpp:1.40 Wed Jul 20 22:33:39 2005
+++ wesnoth/src/server/game.cpp Thu Jul 21 20:19:15 2005
@@ -1,4 +1,4 @@
-/* $Id: game.cpp,v 1.40 2005/07/20 22:33:39 Sirp Exp $ */
+/* $Id: game.cpp,v 1.41 2005/07/21 20:19:15 isaaccp Exp $ */
/*
Copyright (C) 2003-5 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -232,7 +232,7 @@
side_controllers_[side_index] = "ai";
sides_taken_[side_index] = true;
}
- else if((**sd)["controller"] == "human") {
+ else if((**sd)["controller"] == "human") {
sides_.insert(std::pair<network::connection,size_t>(players_.front(),side_index));
sides_taken_[side_index] = true;
side_controllers_[side_index] = "human";
Index: wesnoth/src/server/server.cpp
diff -u wesnoth/src/server/server.cpp:1.84 wesnoth/src/server/server.cpp:1.85
--- wesnoth/src/server/server.cpp:1.84 Wed Jul 20 22:33:39 2005
+++ wesnoth/src/server/server.cpp Thu Jul 21 20:19:15 2005
@@ -1,4 +1,4 @@
-/* $Id: server.cpp,v 1.84 2005/07/20 22:33:39 Sirp Exp $ */
+/* $Id: server.cpp,v 1.85 2005/07/21 20:19:15 isaaccp Exp $ */
/*
Copyright (C) 2003-5 by David White <address@hidden>
Part of the Battle for Wesnoth Project http://www.wesnoth.org/
@@ -27,7 +27,7 @@
#include "input_stream.hpp"
#include "metrics.hpp"
#include "serialization/parser.hpp"
-#include "player.hpp"
+#include "player.hpp"
#include "proxy.hpp"
#include <algorithm>
@@ -123,12 +123,12 @@
input_stream& input_;
- metrics metrics_;
-
- const config& cfg_;
-
- std::set<std::string> accepted_versions_;
- std::map<std::string,config> redirected_versions_;
+ metrics metrics_;
+
+ const config& cfg_;
+
+ std::set<std::string> accepted_versions_;
+ std::map<std::string,config> redirected_versions_;
std::map<std::string,config> proxy_versions_;
bool is_ip_banned(const std::string& ip);
@@ -160,14 +160,14 @@
redirected_versions_[*j] = **i;
}
}
-
- const config::child_list& proxies = cfg_.get_children("proxy");
- for(config::child_list::const_iterator p = proxies.begin(); p !=
proxies.end(); ++p) {
- const std::vector<std::string>
versions(utils::split((**p)["version"]));
- for(std::vector<std::string>::const_iterator j =
versions.begin(); j != versions.end(); ++j) {
- proxy_versions_[*j] = **p;
- }
- }
+
+ const config::child_list& proxies = cfg_.get_children("proxy");
+ for(config::child_list::const_iterator p = proxies.begin(); p !=
proxies.end(); ++p) {
+ const std::vector<std::string>
versions(utils::split((**p)["version"]));
+ for(std::vector<std::string>::const_iterator j =
versions.begin(); j != versions.end(); ++j) {
+ proxy_versions_[*j] = **p;
+ }
+ }
join_lobby_response_.add_child("join_lobby");
}
@@ -379,9 +379,9 @@
}
}
- if(e.socket) {
- if(proxy::is_proxy(e.socket)) {
- proxy::disconnect(e.socket);
+ if(e.socket) {
+ if(proxy::is_proxy(e.socket)) {
+ proxy::disconnect(e.socket);
}
e.disconnect();
}
@@ -402,9 +402,9 @@
}
void server::process_data(const network::connection sock, config& data,
config& gamelist)
-{
- if(proxy::is_proxy(sock)) {
- proxy::received_data(sock,data);
+{
+ if(proxy::is_proxy(sock)) {
+ proxy::received_data(sock,data);
}
//if someone who is not yet logged in is sending
//login details
@@ -420,51 +420,51 @@
}
void server::process_login(const network::connection sock, const config& data,
config& gamelist)
-{
- //see if client is sending their version number
- const config* const version = data.child("version");
- if(version != NULL) {
- const std::string& version_str = (*version)["version"];
-
- if(accepted_versions_.count(version_str)) {
- std::cerr << "player joined using accepted version " <<
version_str << ": telling them to log in\n";
- network::send_data(login_response_,sock);
- } else {
- const std::map<std::string,config>::const_iterator i =
redirected_versions_.find(version_str);
- if(i != redirected_versions_.end()) {
- std::cerr << "player joined using version " <<
version_str << ": redirecting them to "
- << i->second["host"] << ":" <<
i->second["port"] << "\n";
- config response;
- response.add_child("redirect",i->second);
- network::send_data(response,sock);
- } else {
- const
std::map<std::string,config>::const_iterator i =
proxy_versions_.find(version_str);
-
- if(i != proxy_versions_.end()) {
- std::cerr << "player joined using
version " << version_str << ": connecting them by proxy to "
- << i->second["host"] << ":"
<< i->second["port"] << "\n";
-
-
proxy::create_proxy(sock,i->second["host"],lexical_cast_default<int>(i->second["port"],15000));
- } else {
-
- std::cerr << "player joined using
unknown version " << version_str << ": rejecting them\n";
- config response;
- if(accepted_versions_.empty() == false)
{
- response["version"] =
*accepted_versions_.begin();
- } else if(redirected_versions_.empty()
== false) {
- response["version"] =
redirected_versions_.begin()->first;
- } else {
- std::cerr << "this server
doesn't accept any versions at all\n";
- response["version"] = "null";
- }
-
- network::send_data(response,sock);
- }
- }
- }
-
- return;
- }
+{
+ //see if client is sending their version number
+ const config* const version = data.child("version");
+ if(version != NULL) {
+ const std::string& version_str = (*version)["version"];
+
+ if(accepted_versions_.count(version_str)) {
+ std::cerr << "player joined using accepted version " <<
version_str << ": telling them to log in\n";
+ network::send_data(login_response_,sock);
+ } else {
+ const std::map<std::string,config>::const_iterator i =
redirected_versions_.find(version_str);
+ if(i != redirected_versions_.end()) {
+ std::cerr << "player joined using version " <<
version_str << ": redirecting them to "
+ << i->second["host"] << ":" <<
i->second["port"] << "\n";
+ config response;
+ response.add_child("redirect",i->second);
+ network::send_data(response,sock);
+ } else {
+ const
std::map<std::string,config>::const_iterator i =
proxy_versions_.find(version_str);
+
+ if(i != proxy_versions_.end()) {
+ std::cerr << "player joined using
version " << version_str << ": connecting them by proxy to "
+ << i->second["host"] << ":"
<< i->second["port"] << "\n";
+
+
proxy::create_proxy(sock,i->second["host"],lexical_cast_default<int>(i->second["port"],15000));
+ } else {
+
+ std::cerr << "player joined using
unknown version " << version_str << ": rejecting them\n";
+ config response;
+ if(accepted_versions_.empty() == false)
{
+ response["version"] =
*accepted_versions_.begin();
+ } else if(redirected_versions_.empty()
== false) {
+ response["version"] =
redirected_versions_.begin()->first;
+ } else {
+ std::cerr << "this server
doesn't accept any versions at all\n";
+ response["version"] = "null";
+ }
+
+ network::send_data(response,sock);
+ }
+ }
+ }
+
+ return;
+ }
const config* const login = data.child("login");
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Wesnoth-cvs-commits] wesnoth src/server/game.cpp src/server/server.c...,
Isaac Clerencia <=