SendInfo() public method

public SendInfo ( string text ) : void
text string
return void
 public void Execute(Player player, string[] args)
 {
     if (player.GuildRank == 40)
     {
         foreach (var e in from i in RealmManager.Worlds
             where i.Key != 0
             from e in i.Value.Players
             where string.Equals(e.Value.Client.Account.Name, args[0], StringComparison.CurrentCultureIgnoreCase)
             select e)
         {
             if (e.Value.Client.Account.Guild.Rank == 40)
             {
                 player.SendInfo(e.Value.Client.Account.Name + " has been invited to ally with your guild!");
                 e.Value.Client.SendPacket(new GuildAllyRequestPacket
                 {
                     Name = player.Client.Account.Name,
                     Guild = player.Client.Account.Guild.Name
                 });
             }
             else
                 player.SendError(e.Value.Client.Account.Guild.Name + " is already one of your allys!");
         }
     }
     else
         player.SendInfo("Only founders can ally with other guilds!");
 }
        protected override bool Process(Player player, RealmTime time, string[] args)
        {
            if (!player.Guild.IsDefault)
            {
                try
                {
                    var saytext = string.Join(" ", args);

                    if (String.IsNullOrWhiteSpace(saytext))
                    {
                        player.SendHelp("Usage: /g <text>");
                        return false;
                    }
                    else
                    {
                        player.Guild.Chat(player, saytext.ToSafeText());
                        return true;
                    }
                }
                catch
                {
                    player.SendInfo("Cannot guild chat!");
                    return false;
                }
            }
            else
                player.SendInfo("You need to be in a guild to use guild chat!");
            return false;
        }
        public bool Execute(Player player, RealmTime time, string args)
        {
            if (!HasPermission(player))
            {
                player.SendInfo("You are not an Admin");
                return false;
            }

            try
            {
                string[] a = args.Split(' ');
                bool success = Process(player, time, a);
                if (success)
                player.Manager.Database.DoActionAsync(db =>
                {
                    var cmd = db.CreateQuery();
                    cmd.CommandText = "insert into commandlog (command, args, player) values (@command, @args, @player);";
                    cmd.Parameters.AddWithValue("@command", CommandName);
                    cmd.Parameters.AddWithValue("@args", args);
                    cmd.Parameters.AddWithValue("@player", $"{player.AccountId}:{player.Name}");
                    cmd.ExecuteNonQuery();
                });
                return success;
            }
            catch (Exception ex)
            {
                logger.Error("Error when executing the command.", ex);
                player.SendError("Error when executing the command.");
                return false;
            }
        }
 protected override bool Process(Player player, RealmTime time, string[] args)
 {
     if (String.IsNullOrWhiteSpace(args[0]))
     {
         player.SendInfo("Usage: /join <guild name>");
         return false;
     }
     if (!player.Invited)
     {
         player.SendInfoWithTokens("server.guild_not_invited", new KeyValuePair<string, object>[1]
         {
             new KeyValuePair<string, object>("guild", args[0])
         });
         return false;
     }
     player.Manager.Database.DoActionAsync(db =>
     {
         var gStruct = db.GetGuild(args[0]);
         if (player.Invited == false)
         {
             player.SendInfo("You need to be invited to join a guild!");
         }
         if (gStruct != null)
         {
             var g = db.ChangeGuild(player.Client.Account, gStruct.Id, 0, 0, false);
             if (g != null)
             {
                 player.Client.Account.Guild = g;
                 GuildManager.CurrentManagers[args[0]].JoinGuild(player);
             }
         }
         else
         {
             player.SendInfoWithTokens("server.guild_join_fail", new KeyValuePair<string, object>[1]
             {
                 new KeyValuePair<string, object>("error", "Guild does not exist")
             });
         }
     });
     return true;
 }
        protected override bool Process(Player player, RealmTime time, string[] args)
        {
            if (String.IsNullOrWhiteSpace(args[0]))
            {
                player.SendInfo("Usage: /invite <player name>");
                return false;
            }

            if (player.Guild[player.AccountId].Rank >= 20)
            {
                foreach (var i in player.Owner.Players.Values)
                {
                    Player target = player.Owner.GetPlayerByName(args[0]);

                    if (target == null)
                    {
                        player.SendInfoWithTokens("server.invite_notfound", new KeyValuePair<string, object>[1]
                        {
                            new KeyValuePair<string, object>("player", args[0])
                        });
                        return false;
                    }
                    if (!target.NameChosen || player.Dist(target) > 20)
                    {
                        player.SendInfoWithTokens("server.invite_notfound", new KeyValuePair<string, object>[1]
                        {
                            new KeyValuePair<string, object>("player", args[0])
                        });
                        return false;
                    }

                    if (target.Guild.IsDefault)
                    {
                        target.Client.SendPacket(new InvitedToGuildPacket()
                        {
                            Name = player.Name,
                            GuildName = player.Guild[player.AccountId].Name
                        });
                        target.Invited = true;
                        player.SendInfoWithTokens("server.invite_succeed", new KeyValuePair<string, object>[2]
                        {
                            new KeyValuePair<string, object>("player", args[0]),
                            new KeyValuePair<string, object>("guild", player.Guild[player.AccountId].Name)
                        });
                        return true;
                    }
                    else
                    {
                        player.SendError("Player is already in a guild!");
                        return false;
                    }
                }
            }
            else
            {
                player.Client.SendPacket(new TextPacket()
                {
                    BubbleTime = 0,
                    Stars = -1,
                    Name = "",
                    Text = "Members and initiates cannot invite!"
                });
            }
            return false;
        }
        public void Execute(Player player, string[] args)
        {
            if (player.Guild != "")
            {
                try
                {
                    var saytext = string.Join(" ", args);

                    foreach (var w in RealmManager.Worlds)
                    {
                        var world = w.Value;
                        if (w.Key == 0)
                            continue;
                        foreach (var i in world.Players.Where(i => i.Value.Guild == player.Guild))
                        {
                            if (string.IsNullOrEmpty(saytext))
                                player.SendHelp("Usage: /g <text>");
                            else
                            {
                                var tp = new TextPacket
                                {
                                    BubbleTime = 10,
                                    Stars = player.Stars,
                                    Name = player.ResolveGuildChatName(),
                                    Recipient = "*Guild*",
                                    Text = saytext
                                };
                                if (world.Id == player.Owner.Id) tp.ObjectId = player.Id;
                                i.Value.Client.SendPacket(tp);
                            }
                        }
                    }
                }
                catch
                {
                    player.SendInfo("Cannot guild chat!");
                }
            }
            else
                player.SendInfo("You need to be in a guild to use guild chat!");
        }
 public void Execute(Player player, string[] args)
 {
     if (player.GuildRank >= 20)
     {
         foreach (var e in from i in RealmManager.Worlds
             where i.Key != 0
             from e in i.Value.Players
             where string.Equals(e.Value.Client.Account.Name, args[0], StringComparison.CurrentCultureIgnoreCase)
             select e)
         {
             if (e.Value.Client.Account.Guild.Name == "")
             {
                 player.SendInfo(e.Value.Client.Account.Name + " has been invited to your guild!");
                 e.Value.Client.SendPacket(new InvitedToGuildPacket
                 {
                     Name = player.Client.Account.Name,
                     Guild = player.Client.Account.Guild.Name
                 });
             }
             else
                 player.SendError(e.Value.Client.Account.Name + " is already in a guild!");
         }
     }
     else
         player.SendInfo("Members and initiates cannot invite!");
 }