internal static void Unignore(Player player, Command cmd) { string name = cmd.Next(); if (name != null) { PlayerInfo targetInfo; if (!PlayerDB.FindPlayerInfo(name, out targetInfo)) { PlayerInfo[] infos = PlayerDB.FindPlayers(name); if (infos.Length == 1) { targetInfo = infos[0]; } else if (infos.Length > 1) { player.ManyMatchesMessage("player", infos); return; } else { player.NoPlayerMessage(name); return; } } else if (targetInfo == null) { player.NoPlayerMessage(name); return; } if (player.Unignore(targetInfo)) { player.MessageNow("You are no longer ignoring {0}", targetInfo.GetClassyName()); } else { player.MessageNow("You are not currently ignoring {0}", targetInfo.GetClassyName()); } } else { PlayerInfo[] ignoreList = player.GetIgnoreList(); if (ignoreList.Length > 0) { player.MessageNow("Ignored players: {0}", ignoreList.JoinToClassyString()); } else { player.MessageNow("You are not currently ignoring anyone."); } return; } }
internal static void Unignore( Player player, Command cmd ) { string name = cmd.Next(); if( name != null ) { PlayerInfo targetInfo; if( !PlayerDB.FindPlayerInfo( name, out targetInfo ) ) { PlayerInfo[] infos = PlayerDB.FindPlayers( name ); if( infos.Length == 1 ) { targetInfo = infos[0]; } else if( infos.Length > 1 ) { player.ManyMatchesMessage( "player", infos ); return; } else { player.NoPlayerMessage( name ); return; } } else if( targetInfo == null ) { player.NoPlayerMessage( name ); return; } if( player.Unignore( targetInfo ) ) { player.MessageNow( "You are no longer ignoring {0}", targetInfo.GetClassyName() ); } else { player.MessageNow( "You are not currently ignoring {0}", targetInfo.GetClassyName() ); } } else { PlayerInfo[] ignoreList = player.GetIgnoreList(); if( ignoreList.Length > 0 ) { player.MessageNow( "Ignored players: {0}", ignoreList.JoinToClassyString() ); } else { player.MessageNow( "You are not currently ignoring anyone." ); } return; } }