Command Check

Results 1 to 1 of 1
  1. #1
    Enthusiast Hablet is offline
    MemberRank
    Apr 2012 Join Date
    28Posts

    Command Check

    Could anyone just check the following for me, would be greatly appreciated. If you recognise any errors / reason for them to not be functional your help would be appreciated. If not, please let me know they're good to go.

    Code:
    case "mute":
                            {
                                if (!this.Session.GetHabbo().GotCommand("mute"))
                                {
                                    return true;//308F;
                                }
                                string str10 = null;
                                GameClient client8 = null;
                                Room room43 = this.Session.GetHabbo().CurrentRoom;
                                str10 = Params[1];
                                client8 = MercuryEnvironment.GetGame().GetClientManager().GetClientByUsername(str10);
                                if ((client8 != null) && (client8.GetHabbo() != null))
                                {
                                    if (client8.GetHabbo().Rank >= 4)
                                    {
                                        this.Session.SendNotif("You are not allowed to (un)mute that user.");
                                        return true;
                                    }
                                    MercuryEnvironment.GetGame().GetModerationTool().LogStaffEntry(this.Session.GetHabbo().Username, client8.GetHabbo().Username, "Mute", "Muted user");
                                    client8.GetHabbo().Mute();
                                    return true;//308F;
                                }
                                this.Session.SendNotif("User could not be found.");
                                return true;
                            }
    Code:
      case "update_catalog":
                        case "reload_catalog":
                        case "recache_catalog":
                        case "refresh_catalog":
                        case "update_catalogue":
                        case "reload_catalogue":
                        case "recache_catalogue":
                        case "refresh_catalogue":
                        case "refreshcata":
                            if (this.Session.GetHabbo().GotCommand("refresh_catalogue"))
                            {
                                using (IQueryAdapter adapter8 = MercuryEnvironment.GetDatabaseManager().getQueryreactor())
                                {
                                    MercuryEnvironment.GetGame().GetCatalog().Initialize(adapter8);
                                }
                                MercuryEnvironment.GetGame().GetClientManager().QueueBroadcaseMessage(new ServerMessage(Outgoing.PublishShopMessageComposer));
                            }
                            return true;
    Don't post if you have nothing relevant to add to the topic.




Advertisement