Pastebiniä käytetään pidempien tekstien säilömiseen jotka pitää laittaa talteen tai joita esim. ei voi sanoa irkissä tms kätevästi ilman hirveää floodimista. Lyhykäisiä tunnisteita saa arvaamalla satunnaisesti selville, joten ei kannata pasteta mitään erityisen yksityistä.
Tekstiä mahtuu maksimissaan 64 kilotavua per paste eli älä ihmettele jos tosi pitkät pastet katkeaa, jos taas TOSI isoja pasteja tunkkaa tänne niin tulee jopa virhe eikä paste mene edes läpi. Myäskään viagra- tai cialis-sanoja sisältäviä pasteja ei hyväksytä, sillä erinäiset spämmibotit puskevat niitä vähän väliä.
Pasten nimi (vapaaehtoinen):
Värjäys: ABAPActionScriptActionScript 3AdaANTLRANTLR With ActionScript TargetANTLR With C# TargetANTLR With CPP TargetANTLR With Java TargetANTLR With ObjectiveC TargetANTLR With Perl TargetANTLR With Python TargetANTLR With Ruby TargetApacheConfAppleScriptaspx-csaspx-vbAsymptoteautohotkeyAwkBase MakefileBashBash SessionBatchfileBBCodeBefungeBlitzMaxBooBrainfuckBroCC#C++c-objdumpCFEngine3cfstatementCheetahClojureCMakeCoffeeScriptColdfusion HTMLCommon LispCoqcpp-objdumpCSSCSS+Django/JinjaCSS+Genshi TextCSS+MakoCSS+MyghtyCSS+PHPCSS+RubyCSS+SmartyCythonDd-objdumpDarcs PatchDartDebian Control fileDebian SourcelistDelphiDiffDjango/JinjaDTDDuelDylaneCECLElixirElixir iex sessionEmbedded RagelERBErlangErlang erl sessionEvoqueFactorFancyFantomFelixFortranFSharpGASGenshiGenshi TextGettext CatalogGherkinGLSLGnuplotGoGoodData-CLGosuGosu TemplateGroffGroovyHamlHaskellhaXeHTMLHTML+CheetahHTML+Django/JinjaHTML+EvoqueHTML+GenshiHTML+MakoHTML+MyghtyHTML+PHPHTML+SmartyHTML+VelocityHTTPHybrisINIIoIokeIRC logsJadeJavaJava Server PageJavaScriptJavaScript+CheetahJavaScript+Django/JinjaJavaScript+Genshi TextJavaScript+MakoJavaScript+MyghtyJavaScript+PHPJavaScript+RubyJavaScript+SmartyJSONKotlinLighttpd configuration fileLiterate HaskellLLVMLogtalkLuaMakefileMakoMAQLMasonMatlabMatlab sessionMiniDModelicaModula-2MoinMoin/Trac Wiki markupMOOCodeMoonScriptMuPADMXMLMyghtyMySQLNASMNemerleNewLispNewspeakNginx configuration fileNimrodNumPyobjdumpObjective-CObjective-JOCamlOctaveOocOpaOpenEdge ABLPerlPHPPL/pgSQLPostgreSQL console (psql)PostgreSQL SQL dialectPostScriptPOVRayPowerShellPrologPropertiesProtocol BufferPyPy LogPythonPython 3Python 3.0 TracebackPython console sessionPython TracebackRagelRagel in C HostRagel in CPP HostRagel in D HostRagel in Java HostRagel in Objective C HostRagel in Ruby HostRaw token dataRConsoleREBOLRedcodereStructuredTextRHTMLRubyRuby irb sessionSSassScalaScalate Server PageScamlSchemeScilabSCSSSmalltalkSmartySnobolSQLsqlite3conSquidConfStandard MLsystemverilogTclTcshTeaTeXText onlyUrbiScriptValaVB.netVelocityverilogvhdlVimLXMLXML+CheetahXML+Django/JinjaXML+EvoqueXML+MakoXML+MyghtyXML+PHPXML+RubyXML+SmartyXML+VelocityXQueryXSLTYAML
From f795d56c67ec5a4399688b1d88ca26101e5c802d Mon Sep 17 00:00:00 2001 From: Perttu Ahola <celeron55@gmail.com> Date: Tue, 6 Aug 2013 09:04:53 +0300 Subject: [PATCH] Clean up server's log messages and give a better error to client when it's player is in use --- src/server.cpp | 45 ++++++++++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/src/server.cpp b/src/server.cpp index f5f6645..6ec22fb 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -1810,14 +1810,13 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) if(datasize < 2+1+PLAYERNAME_SIZE) return; - verbosestream<<"Server: Got TOSERVER_INIT from " - <<peer_id<<std::endl; + verbosestream<<"Server: Got TOSERVER_INIT from "<<addr_s<<std::endl; // Do not allow multiple players in simple singleplayer mode. // This isn't a perfect way to do it, but will suffice for now. if(m_simple_singleplayer_mode && m_clients.size() > 1){ - infostream<<"Server: Not allowing another client to connect in" - <<" simple singleplayer mode"<<std::endl; + infostream<<"Server: Not allowing another client ("<<addr_s + <<") to connect in simple singleplayer mode"<<std::endl; DenyAccess(peer_id, L"Running in simple singleplayer mode."); return; } @@ -1839,9 +1838,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) { actionstream<<"Server: A mismatched client tried to connect from " <<addr_s<<std::endl; - infostream<<"Server: Cannot negotiate " - "serialization version with peer " - <<peer_id<<std::endl; + infostream<<"Server: Cannot negotiate serialization version with " + <<addr_s<<std::endl; DenyAccess(peer_id, std::wstring( L"Your client's version is not supported.\n" L"Server version is ") @@ -1879,7 +1877,7 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) net_proto_version = max_net_proto_version; } - verbosestream<<"Server: "<<peer_id<<" Protocol version: min: " + verbosestream<<"Server: "<<addr_s<<": Protocol version: min: " <<min_net_proto_version<<", max: "<<max_net_proto_version <<", chosen: "<<net_proto_version<<std::endl; @@ -1888,8 +1886,8 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) if(net_proto_version < SERVER_PROTOCOL_VERSION_MIN || net_proto_version > SERVER_PROTOCOL_VERSION_MAX) { - actionstream<<"Server: A mismatched client tried to connect from "<<addr_s - <<std::endl; + actionstream<<"Server: A mismatched client tried to connect from " + <<addr_s<<std::endl; DenyAccess(peer_id, std::wstring( L"Your client's version is not supported.\n" L"Server version is ") @@ -1957,14 +1955,14 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) if(!isSingleplayer() && strcasecmp(playername, "singleplayer") == 0) { - actionstream<<"Server: Player with an invalid name " + actionstream<<"Server: Player with the name \"singleplayer\" " <<"tried to connect from "<<addr_s<<std::endl; DenyAccess(peer_id, L"Name is not allowed"); return; } infostream<<"Server: New connection: \""<<playername<<"\" from " - <<m_con.GetPeerAddress(peer_id).serializeString()<<std::endl; + <<addr_s<<" (peer_id="<<peer_id<<")"<<std::endl; // Get password char given_password[PASSWORD_SIZE]; @@ -2041,9 +2039,9 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) } if(given_password != checkpwd){ - actionstream<<"Server: "<<playername<<" supplied invalid password" - <<" (peer_id="<<peer_id<<")"<<std::endl; - DenyAccess(peer_id, L"Invalid password"); + actionstream<<"Server: "<<playername<<" supplied wrong password" + <<std::endl; + DenyAccess(peer_id, L"Wrong password"); return; } @@ -2053,10 +2051,19 @@ void Server::ProcessData(u8 *data, u32 datasize, u16 peer_id) // If failed, cancel if(playersao == NULL) { - errorstream<<"Server: peer_id="<<peer_id - <<": failed to emerge player"<<std::endl; - DenyAccess(peer_id, L"Could not allocate player. You" - " may need to wait for a timeout."); + RemotePlayer *player = + static_cast<RemotePlayer*>(m_env->getPlayer(playername)); + if(player && player->peer_id != 0){ + errorstream<<"Server: "<<playername<<": Failed to emerge player" + <<" (player allocated to an another client)"<<std::endl; + DenyAccess(peer_id, L"An another client is connected with this " + "name. If your client closed unexpectedly, try again in " + "a minute."); + } else { + errorstream<<"Server: "<<playername<<": Failed to emerge player" + <<std::endl; + DenyAccess(peer_id, L"Could not allocate player."); + } return; } -- 1.7.12