@@ -1221,69 +1221,6 @@ bool CConsoleCommands::WhoIs(CConsole* pConsole, const char* szArguments, CClien
12211221 return false ;
12221222}
12231223
1224- bool CConsoleCommands::WhoWas (CConsole* pConsole, const char * szArguments, CClient* pClient, CClient* pEchoClient)
1225- {
1226- // Got any arguments?
1227- if (szArguments && strlen (szArguments) > 0 )
1228- {
1229- // Is the nick requested anyone?
1230- bool bAnyone = (SStringX (szArguments) == " *" );
1231-
1232- // Start iterating the whowas list
1233- CWhoWas* pWhoWas = pConsole->GetWhoWas ();
1234- if (pWhoWas->Count () > 0 )
1235- {
1236- // Start iterating the list
1237- unsigned int uiCount = 0 ;
1238- list<SWhoWasEntry>::const_iterator iter = pWhoWas->IterBegin ();
1239- for (; iter != pWhoWas->IterEnd (); iter++)
1240- {
1241- // Matches?
1242- if (bAnyone || iter->strNick .ContainsI (szArguments))
1243- {
1244- // Haven't got too many entries printed?
1245- if (++uiCount <= 20 )
1246- {
1247- // Convert the IP to a string
1248- SString strIP = LongToDottedIP (iter->ulIP );
1249-
1250- // Populate a line about him
1251- SString strName = iter->strNick ;
1252- if (iter->strAccountName != GUEST_ACCOUNT_NAME)
1253- strName += SString (" (%s)" , *iter->strAccountName );
1254- pClient->SendEcho (
1255- SString (" %s - IP:%s serial:%s version:%s" , *strName, *strIP, iter->strSerial .c_str (), iter->strPlayerVersion .c_str ()));
1256- }
1257- else
1258- {
1259- pClient->SendEcho (" ..." );
1260- return true ;
1261- }
1262- }
1263- }
1264-
1265- // No matching entries?
1266- if (uiCount == 0 )
1267- {
1268- pClient->SendEcho (" whowas: No matching nicks" );
1269- return false ;
1270- }
1271-
1272- return true ;
1273- }
1274- else
1275- {
1276- pClient->SendEcho (" whowas: The whowas list is empty" );
1277- }
1278- }
1279- else
1280- {
1281- pClient->SendEcho (" whowas: Syntax is 'whowas <nick>'" );
1282- }
1283-
1284- return false ;
1285- }
1286-
12871224bool CConsoleCommands::DebugScript (CConsole* pConsole, const char * szArguments, CClient* pClient, CClient* pEchoClient)
12881225{
12891226 // Valid parameter?
0 commit comments