Author: baufo
Date: Sun Sep 21 18:57:06 2008
New Revision: 29624
URL: http://svn.gna.org/viewcvs/wesnoth?rev=29624&view=rev
Log:
Let the user know whether he was kicked/banned or disconnected due to a network
error.
Modified:
trunk/src/server/server.cpp
Modified: trunk/src/server/server.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/server.cpp?rev=29624&r1=29623&r2=29624&view=diff
==============================================================================
--- trunk/src/server/server.cpp (original)
+++ trunk/src/server/server.cpp Sun Sep 21 18:57:06 2008
@@ -1309,6 +1309,7 @@
{
if
(utils::wildcard_string_match(network::ip_address(pl->first), target)) {
out << "\nKicked " <<
pl->second.name() << ".";
+ send_error(pl->first, ("You
have been banned. Reason: " + reason).c_str());
network::queue_disconnect(pl->first);
}
}
@@ -1326,6 +1327,7 @@
}
if (kick) {
out << "\nKicked " <<
pl->second.name() << ".";
+ send_error(pl->first, ("You
have been banned. Reason: " + reason).c_str());
network::queue_disconnect(pl->first);
}
}
@@ -1370,6 +1372,7 @@
if
(utils::wildcard_string_match(network::ip_address(pl->first), parameters)) {
kicked = true;
out << "Kicked " << pl->second.name()
<< ".\n";
+ send_error(pl->first, "You have been
kicked.");
network::queue_disconnect(pl->first);
}
}
@@ -1381,6 +1384,7 @@
kicked = true;
out << "Kicked " << pl->second.name()
<< " ("
<<
network::ip_address(pl->first) << ").\n";
+ send_error(pl->first, "You have been
kicked.");
network::queue_disconnect(pl->first);
}
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits