Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Text;
- using System.Collections.Generic;
- using Plus.Utilities;
- using Plus.HabboHotel.Users;
- using Plus.HabboHotel.GameClients;
- using Plus.HabboHotel.Moderation;
- using Plus.Database.Interfaces;
- namespace Plus.HabboHotel.Rooms.Chat.Commands.Moderator
- {
- class RankCommand : IChatCommand
- {
- public string PermissionRequired
- {
- get { return "command_rank"; }
- }
- public string Parameters
- {
- get { return "%pseudo% %numrank%"; }
- }
- public string Description
- {
- get { return "Rank une personne."; }
- }
- public void Execute(GameClients.GameClient Session, Rooms.Room Room, string[] Params)
- {
- if (Params.Length != 3)
- {
- Session.SendWhisper("Veuillez entre un pseudo + le numero du rank");
- return;
- }
- GameClient TargetClient = PlusEnvironment.GetGame().GetClientManager().GetClientByUsername(Params[1]);
- if (TargetClient != null)
- {
- using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
- {
- dbClient.RunQuery("UPDATE `users` SET `rank` = '" + Params[2] + "' WHERE `id` = '" + TargetClient.GetHabbo().Id + "' LIMIT 1");
- }
- Session.SendWhisper("L'utilisateur " + TargetClient.GetHabbo().Username + " à ÊtÊ rank " + Params[2] + " !");
- }
- else
- {
- Session.SendWhisper("Oups, utilisateur introuvable.");
- return;
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment