using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Kernel;
using WinNamespace;
using WinNamespace.HabboHotel.Rooms;
using WinNamespace.Storage;
using WinNamespace.HabboHotel.GameClients;
using WinNamespace.Messages;
using WinNamespace.Core;
using WinNamespace.HabboHotel.Items;
using WinNamespace.HabboHotel.Users;
using WinNamespace.HabboHotel.Users.Authenticator;
namespace Hang.HabboHotel.Misc
{
static class ChatCommandHandler
{
internal static bool Parse(GameClient Session, string Input)
{
string[] Params = Input.Split(' ');
string TargetUser = null;
GameClient TargetClient = null;
Room TargetRoom = Session.GetHabbo().CurrentRoom;
RoomUser TargetRoomUser = null;
try
{
if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
{
switch (Params[0])
{
#region Room owner commands
case "pickall":
TargetRoom = Session.GetHabbo().CurrentRoom; ;
if (TargetRoom != null && TargetRoom.CheckRights(Session, true))
{
List<RoomItem> RemovedItems = TargetRoom.RemoveAllFurniture(Session);
Session.GetHabbo().GetInventoryComponent().AddItemArray(RemovedItems);
Session.GetHabbo().GetInventoryComponent().UpdateItems(false); //ARGH!
return true;
}
return false;
//case "changedoor":
// TargetRoom = Session.GetHabbo().CurrentRoom; ;
// if (TargetRoom.ModelName != "custom")
// {
// try
// {
// int x = int.Parse(Params[1]);
// int y = int.Parse(Params[2]);
// int Height = int.Parse(Params[3]);
// using (DatabaseClient MySQL = UberEnvironment.GetDatabase().GetClient())
// {
// MySQL.ExecuteQuery("UPDATE room_models_customs SET doorx = '" + x + "', doory = '" + y + "', height = '" + Height + "' WHERE roomid = '" + TargetRoom.RoomId + "' LIMIT 1;");
// }
// }
// catch
// {
// Session.SendNotif("Use NUMBERS ONLY!");
// }
// }
// else
// Session.SendNotif("Your model is not custom");
// return true;
// return false;
case "unload":
TargetRoom = Session.GetHabbo().CurrentRoom; ;
//TargetRoom.SaveFurniture();
WinENV.GetGame().GetRoomManager().UnloadRoom(TargetRoom);
return true;
case "disablediagonal":
TargetRoom = Session.GetHabbo().CurrentRoom;
if (TargetRoom.DiagonalEnabled)
TargetRoom.DiagonalEnabled = false;
else
TargetRoom.DiagonalEnabled = true;
return true;
case "setmax":
TargetRoom = Session.GetHabbo().CurrentRoom;
try
{
int MaxUsers = int.Parse(Params[1]);
if (MaxUsers > 100 && Session.GetHabbo().Rank == 1)
Session.SendNotif("You do not have authorization to raise max users to above 100.");
else
{
using (DatabaseClient MySQL = WinENV.GetDatabase().GetClient())
MySQL.query("UPDATE rooms SET users_max = " + MaxUsers + " WHERE id = " + TargetRoom.RoomId);
WinENV.GetGame().GetRoomManager().UnloadRoom(TargetRoom);
}
}
catch
{
return false;
}
//TargetRoom.SaveFurniture();
//UberEnvironment.GetGame().GetRoomManager().UnloadRoom(TargetRoom);
return true;
#endregion
}
}
if (Session.GetHabbo().Rank > 1)
{
switch (Params[0].ToLower())
{
#region Staff Commands
case "update_catalogue":
if (Session.GetHabbo().HasFuse("fuse_sysadmin"))
{
using (DatabaseClient MySQL = WinENV.GetDatabase().GetClient())
{
WinENV.GetGame().GetCatalog().Initialize(MySQL);
}
WinENV.GetGame().GetCatalog().InitCache();
WinENV.GetGame().GetClientManager().BroadcastMessage(new ServerMessage(441));
return true;
}
return false;
case ":update_items":
if (Session.GetHabbo().HasFuse("fuse_sysadmin"))
{
using (DatabaseClient MySQL = WinENV.GetDatabase().GetClient())
{
WinENV.GetGame().GetItemManager().LoadItems(MySQL);
}
Session.SendNotif("Items Updated.");
return true;
}
return false;
case "coords":
TargetRoom = WinENV.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (TargetRoom == null)
{
return false;
}
TargetRoomUser = TargetRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (TargetRoomUser == null)
{
return false;
}
Session.SendNotif("X: " + TargetRoomUser.X + " - Y: " + TargetRoomUser.Y + " - Z: " + TargetRoomUser.Z + " - Rot: " + TargetRoomUser.RotBody + ", sqState: " + TargetRoom.GetGameMap[TargetRoomUser.X, TargetRoomUser.Y].ToString());
return true;
case "override":
TargetRoom = WinENV.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (TargetRoom != null && TargetRoom.CheckRights(Session, true) || Session.GetHabbo().Rank >= 4)
{
if (TargetRoom == null)
{
return false;
}
TargetRoomUser = TargetRoom.GetRoomUserByHabbo(Session.GetHabbo().Id);
if (TargetRoomUser == null)
{
return false;
}
if (TargetRoomUser.AllowOverride)
{
TargetRoomUser.AllowOverride = false;
Session.SendNotif("Camminata sui furni disabbilitata.");
}
else
{
TargetRoomUser.AllowOverride = true;
Session.SendNotif("Camminata sui furni abbilitata.");
}
TargetRoom.GenerateMaps();
return true;
}
return false;
case "coins":
if (Session.GetHabbo().HasFuse("fuse_sysadmin"))
{
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
if (TargetClient != null)
{
int creditsToAdd;
if (int.TryParse(Params[2], out creditsToAdd))
{
TargetClient.GetHabbo().Credits = TargetClient.GetHabbo().Credits + creditsToAdd;
TargetClient.GetHabbo().UpdateCreditsBalance();
TargetClient.SendNotif(Session.GetHabbo().Username + " has awarded you " + creditsToAdd.ToString() + " credits!");
Session.SendNotif("Credit balance updated successfully.");
return true;
}
else
{
Session.SendNotif("Please send a valid amount of credits.");
return true;
}
}
else
{
Session.SendNotif("User could not be found.");
return true;
}
}
return false;
case "pixels":
if (Session.GetHabbo().Rank >= 4)
{
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
if (TargetClient != null)
{
int creditsToAdd;
if (int.TryParse(Params[2], out creditsToAdd))
{
TargetClient.GetHabbo().ActivityPoints = TargetClient.GetHabbo().ActivityPoints + creditsToAdd;
TargetClient.GetHabbo().UpdateActivityPointsBalance(true);
TargetClient.SendNotif(Session.GetHabbo().Username + " has awarded you " + creditsToAdd.ToString() + " Pixels!");
Session.SendNotif("Pixels balance updated successfully.");
return true;
}
else
{
Session.SendNotif("Please send a valid amount of pixels.");
return true;
}
}
else
{
Session.SendNotif("User could not be found.");
return true;
}
}
return false;
case "ha":
// Hotel Alert :ha <message>
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
string Notice = Input.Substring(3);
ServerMessage HotelAlert = new ServerMessage(808); HotelAlert.Init(808);
HotelAlert.AppendStringWithBreak("Notizia dallo Staff Dell'Hotel");
HotelAlert.AppendStringWithBreak(Notice + "\r\n-" + Session.GetHabbo().Username);
WinENV.GetGame().GetClientManager().BroadcastMessage(HotelAlert);
return true;
}
return false;
case "freeze":
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
RoomUser Target = Session.GetHabbo().CurrentRoom.GetRoomUserByHabbo(Params[1]);
if (Target != null)
{
Target.Freezed = (Target.Freezed != true);
}
return true;
}
return false;
case "enabled":
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
int EffectID = int.Parse(Params[1]);
Session.GetHabbo().GetAvatarEffectsInventoryComponent().ApplyEffect(EffectID);
}
return false;
case "roommute":
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
if (Session.GetHabbo().CurrentRoom.RoomMuted)
Session.GetHabbo().CurrentRoom.RoomMuted = false;
else
Session.GetHabbo().CurrentRoom.RoomMuted = true;
return true;
}
return false;
case "setspeed":
{
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
try
{
Session.GetHabbo().CurrentRoom.SetSpeed(int.Parse(Params[1]));
}
catch { Session.SendNotif("Numbers only!"); }
return true;
}
return false;
}
case "masscredits":
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
try
{
int CreditAmount = int.Parse(Params[1]);
WinENV.GetGame().GetClientManager().GiveAllOnlineCredits(CreditAmount);
}
catch
{
Session.SendNotif("Input must be a number");
}
return true;
}
return false;
case "globalcredits":
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
try
{
int CreditAmount = int.Parse(Params[1]);
WinENV.GetGame().GetClientManager().GiveAllOnlineCredits(CreditAmount);
using (DatabaseClient MySQL = WinENV.GetDatabase().GetClient())
MySQL.query("UPDATE users SET credits = credits + " + CreditAmount);
}
catch
{
Session.SendNotif("Input must be a number");
}
return true;
}
return false;
case "roombadge":
{
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
if (Session.GetHabbo().CurrentRoom == null)
return false;
for (int i = 0; i < Session.GetHabbo().CurrentRoom.UserList.Length; i++)
{
try
{
RoomUser User = Session.GetHabbo().CurrentRoom.UserList
;
if (User == null)
continue;
if (User.IsBot)
continue;
if (User.GetClient() == null)
continue;
if (User.GetClient().GetHabbo() == null)
continue;
User.GetClient().GetHabbo().GetBadgeComponent().GiveBadge(Params[1], true);
}
catch (Exception e)
{
Session.SendNotif("Error: " + e.ToString());
}
}
return true;
}
return false;
}
case "massbadge":
{
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
WinENV.GetGame().GetClientManager().GiveAllOnlineBadge(Params[1]);
return true;
}
return false;
}
case "userinfo":
{
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
string username = Params[1];
bool UserOnline = true;
if (string.IsNullOrEmpty(username))
{
Session.SendNotif("Inserisci L'username");
return true;
}
GameClient tTargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(username);
Habbo User;
if (tTargetClient == null)
{
UserOnline = false;
User = Authenticator.GetHabboViaUsername(username);
}
else
User = tTargetClient.GetHabbo();
if (User == null)
{
Session.SendNotif("Unable to find user " + Params[1]);
return true;
}
StringBuilder RoomInformation = new StringBuilder();
if (User.CurrentRoom != null)
{
RoomInformation.Append(" - ROOM INFORMATION FOR ROOMID: " + User.CurrentRoom.RoomId + " - \r");
RoomInformation.Append("Owner: " + User.CurrentRoom.Owner + "\r");
RoomInformation.Append("Room name: " + User.CurrentRoom.Name + "\r");
RoomInformation.Append("Users in room: " + User.CurrentRoom.UserCount + "/" + User.CurrentRoom.UsersMax);
}
Session.SendNotif("User information for user: " + username + ":\r" +
"Rank: " + User.Rank + " \r" +
"User online: " + UserOnline.ToString() + " \r" +
"UserID: " + User.Id + " \r" +
"Visiting room: " + User.CurrentRoomId + " \r" +
"User motto: " + User.Motto + " \r" +
"User credits: " + User.Credits + " \r" +
"User muted: " + User.Muted.ToString() + "\r" +
"\r\r" +
RoomInformation.ToString());
return true;
}
return false;
}
case "hal":
{
// Hotel Alert pluss link :hal <link> <message>
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
string Link = Params[1];
Input = Input.Substring(3).Replace(Link, "");
string Message = Input;
ServerMessage nMessage = new ServerMessage(161);
nMessage.AppendStringWithBreak("Notice from Hotel Management:\r\n" + Message + "\r\n-" + Session.GetHabbo().Username);
nMessage.AppendStringWithBreak(Link);
WinENV.GetGame().GetClientManager().BroadcastMessage(nMessage);
return true;
}
return false;
}
case "shutdown":
{
// Hotel Alert pluss link :hal <link> <message>
if (Session.GetHabbo().HasFuse("fuse_admin"))
{
Logging.LogCriticalException("User " + Session.GetHabbo().Username + " Spegne Il Server " + DateTime.Now.ToString());
Task ShutdownTask = new Task(WinENV.PreformShutDown);
ShutdownTask.Start();
return true;
}
return false;
}
case "givebadge":
if (Session.GetHabbo().HasFuse("fuse_sysadmin"))
{
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
if (TargetClient != null)
{
TargetClient.GetHabbo().GetBadgeComponent().GiveBadge(WinENV.FilterInjectionChars(Params[2]), true);
return true;
}
else
{
Session.SendNotif("User: " + Params[1] + " could not be found in the database.\rPlease try your request again.");
return false;
}
}
return false;
case "invisible":
if (Session.GetHabbo().HasFuse("fuse_ban"))
{
if (Session.GetHabbo().SpectatorMode)
{
Session.GetHabbo().SpectatorMode = false;
Session.SendNotif("Spectator mode disabled. Reload the room to apply changes.");
}
else
{
Session.GetHabbo().SpectatorMode = true;
Session.SendNotif("Spectator mode enabled. Reload the room to apply changes.");
}
return true;
}
return false;
case "ban":
if (Session.GetHabbo().HasFuse("fuse_ban"))
{
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
if (TargetClient == null)
{
Session.SendNotif("User not found.");
return true;
}
if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank)
{
Session.SendNotif("You are not allowed to ban that user.");
return true;
}
int BanTime = 0;
try
{
BanTime = int.Parse(Params[2]);
}
catch (FormatException) { }
if (BanTime <= 600)
{
Session.SendNotif("Ban time is in seconds and must be at least than 600 seconds (ten minutes). For more specific preset ban times, use the mod tool.");
}
WinENV.GetGame().GetBanManager().BanUser(TargetClient, Session.GetHabbo().Username, BanTime, MergeParams(Params, 3), false);
return true;
}
return false;
case "superban":
if (Session.GetHabbo().HasFuse("fuse_superban"))
{
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
if (TargetClient == null)
{
Session.SendNotif("User not found.");
return true;
}
if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank)
{
Session.SendNotif("You are not allowed to ban that user.");
return true;
}
WinENV.GetGame().GetBanManager().BanUser(TargetClient, Session.GetHabbo().Username, 360000000, MergeParams(Params, 2), false);
return true;
}
return false;
case "roomkick":
if (Session.GetHabbo().HasFuse("fuse_roomkick"))
{
TargetRoom = WinENV.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (TargetRoom == null)
{
return false;
}
bool GenericMsg = true;
string ModMsg = MergeParams(Params, 1);
if (ModMsg.Length > 0)
{
GenericMsg = false;
}
for (int i = 0; i < TargetRoom.UserList.Length; i++)
{
RoomUser RoomUser = TargetRoom.UserList;
if (RoomUser == null)
continue;
if (RoomUser.GetClient().GetHabbo().Rank >= Session.GetHabbo().Rank)
{
continue;
}
if (!GenericMsg)
{
RoomUser.GetClient().SendNotif("You have been kicked by an moderator: " + ModMsg);
}
TargetRoom.RemoveUserFromRoom(RoomUser.GetClient(), true, GenericMsg);
}
return true;
}
return false;
case "roomalert":
if (Session.GetHabbo().HasFuse("fuse_roomalert"))
{
TargetRoom = WinENV.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
if (TargetRoom == null)
{
return false;
}
string Msg = MergeParams(Params, 1);
for (int i = 0; i < TargetRoom.UserList.Length; i++)
{
RoomUser User = TargetRoom.UserList;
if (User == null)
continue;
User.GetClient().SendNotif(Msg);
}
return true;
}
return false;
case "mute":
if (Session.GetHabbo().HasFuse("fuse_mute"))
{
TargetUser = Params[1];
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(TargetUser);
if (TargetClient == null || TargetClient.GetHabbo() == null)
{
Session.SendNotif("Could not find user: " + TargetUser);
return true;
}
if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank)
{
Session.SendNotif("You are not allowed to (un)mute that user.");
return true;
}
TargetClient.GetHabbo().Mute();
return true;
}
return false;
case "unmute":
if (Session.GetHabbo().HasFuse("fuse_mute"))
{
TargetUser = Params[1];
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(TargetUser);
if (TargetClient == null || TargetClient.GetHabbo() == null)
{
Session.SendNotif("Could not find user: " + TargetUser);
return true;
}
//if (TargetClient.GetHabbo().Rank >= Session.GetHabbo().Rank) FUCK YOU!
//{
// Session.SendNotif("You are not allowed to (un)mute that user.");
// return true;
//}
TargetClient.GetHabbo().Unmute();
return true;
}
return false;
case "alert":
if (Session.GetHabbo().HasFuse("fuse_alert"))
{
TargetUser = Params[1];
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(TargetUser);
if (TargetClient == null)
{
Session.SendNotif("Could not find user: " + TargetUser);
return true;
}
TargetClient.SendNotif(MergeParams(Params, 2), Session.GetHabbo().HasFuse("fuse_admin"));
return true;
}
return false;
case "softkick":
case "kick":
if (Session.GetHabbo().HasFuse("fuse_kick"))
{
TargetUser = Params[1];
TargetClient = WinENV.GetGame().GetClientManager().GetClientByHabbo(TargetUser);
if (TargetClient == null)
{
Session.SendNotif("Could not find user: " + TargetUser);
return true;
}
if (Session.GetHabbo().Rank <= TargetClient.GetHabbo().Rank)
{
Session.SendNotif("You are not allowed to kick that user.");
return true;
}
if (TargetClient.GetHabbo().CurrentRoomId < 1)
{
Session.SendNotif("That user is not in a room and can not be kicked.");
return true;
}
TargetRoom = WinENV.GetGame().GetRoomManager().GetRoom(TargetClient.GetHabbo().CurrentRoomId);
if (TargetRoom == null)
{
return true;
}
TargetRoom.RemoveUserFromRoom(TargetClient, true, false);
if (Params.Length > 2)
{
TargetClient.SendNotif("A moderator has kicked you from the room for the following reason: " + MergeParams(Params, 2));
}
else
{
TargetClient.SendNotif("A moderator has kicked you from the room.");
}
return true;
}
return false;
#endregion
}
}
switch (Params[0].ToLower())
{
#region General Commands
case "commands":
String allowedCommands = "Your Commands:\r";
if (Session.GetHabbo().Rank >= 7)
{
allowedCommands += //":update_inventory\r" +
// ":update_bots\r" +
// ":update_catalog\r" +
// ":idletime - Lag?\r" +
// ":t - Debugging\r" +
// ":refresh_publics\r" +
":unload <room id>\r" +
":shutdown - Shuts down the emu and saves everything\r" +
":coins/:credits <name> <amount>\r" +
":reload_catalog\r" +
":masscredits <count> Gives credits to all online\r" +
":globalcredits <count> Gives credits to everyone in the db\r" +
":roombadge <badgeID> Gives badge to all in room\r" +
":massbadge <badgeID> Gives badge to all online users\r" +
":userinfo <username> Gets userinfo for username\r" +
// ":update_defs\r" +
":givebadge <name> <badge code>\r";
// ":bustest - For teh lulz\r";
}
if (Session.GetHabbo().Rank >= 6)
{
allowedCommands +=
":handitem/:food/:eat/:drink <id>\r" +
":ha <message>\r" +
":hal <URL> <message>" +
":superban <user> <reason>\r" +
":roomkick <reason>\r";
}
if (Session.GetHabbo().Rank >= 5)
{
allowedCommands += ":ban <user> <time> <reason>\r" +
":roomalert <message>\r" +
":alert <user> <message>\r" +
":mute <user>\r" +
":unmute <user>\r" +
":kick <user> [reason]\r" +
":roommute - mutes/unmutes the room";
}
allowedCommands += ":whoson/:whosonline/:online - Who's online\r" +
":pickall - Pick up all furni\r" +
":unload - Unloads the room for fixing teleports\r" +
":commands - This Dialog\r" +
":about - Server Information\r" +
":override - Walking Override\r" +
//":changedoor <door x> <door y> <door height> - Changes the door for your custom model\r" +
":coords - Shows the coords\r" +
":disablediagonal - Disable diagonal walking in the room\r" +
":setmax <count> Updates maximum allowed users in the room\r" +
":empty - Clears Inventory";
Session.SendMotd(allowedCommands);
return true;
case "info":
case "details":
case "about":
DateTime Now = DateTime.Now;
TimeSpan TimeUsed = Now - WinENV.ServerStarted;
Session.SendMotd("Last Servidor v.2.0.0.\r\r"
+ " - BomBoEmu -, \r\r\rServer status:" +
"Server uptime: " + TimeUsed.Days + " day(s), " + TimeUsed.Hours + " hour(s) and " + TimeUsed.Minutes + " minute(s)\r" +
"Users online: " + WinENV.GetGame().GetClientManager().ClientCount + "\r" +
"Rooms loaded: " + WinENV.GetGame().GetRoomManager().LoadedRoomsCount + "\r" +
"Database connections: " + WinENV.GetDatabase().ConnectionCount + "\r" +
"Rooms made: " + RoomManager.CreatedRoomsCount + "\r" +
//"Active cycle threads: " + Room.LiveThreads + "\r" +
//"Room items: " + RoomItems + "\r" +
//"Hand items: " + HandItems + "\r" +
//"Furniture total: " + Total + "\r" +
"");
return true;
case "roominfo":
{
StringBuilder Reply = new StringBuilder();
for (int i = 0; i < Session.GetHabbo().CurrentRoom.UserList.Length; i++)
{
RoomUser User = Session.GetHabbo().CurrentRoom.UserList;
if (User == null)
continue;
Reply.Append("UserID/name: " + User.HabboId + " RoomUID: " + User.InternalRoomID + " PrivateID: " + User.VirtualId + " IsBot:" + User.IsBot.ToString() + " X: "
+ User.X + " Y: " + User.Y + " Z: " + User.Z + " \r\r");
}
Session.SendNotif(Reply.ToString());
return true;
}
case "empty":
if (Params.Length > 1 && Session.GetHabbo().HasFuse("fuse_sysadmin"))
{
GameClient Client = WinENV.GetGame().GetClientManager().GetClientByHabbo(Params[1]);
if (Client != null) //User online
{
Client.GetHabbo().GetInventoryComponent().ClearItems();
Session.SendNotif("Inventory cleared! (Database and cache)");
}
else //Offline
{
using (DatabaseClient MySQL = WinENV.GetDatabase().GetClient())
{
MySQL.AddParamWithValue("usrname", Params[1]);
int UserID = int.Parse(MySQL.query_string("SELECT id FROM users WHERE username = @Usrname"));
MySQL.query("DELETE FROM user_items WHERE user_id = '" + UserID + "';");
Session.SendNotif("Inventory cleared! (Database)");
}
}
}
else
{
Session.GetHabbo().GetInventoryComponent().ClearItems();
Session.SendNotif("Inventory cleared!");
}
return true;
case "whosonline":
case "online":
foreach (ServerMessage Message in WinENV.GetGame().GetClientManager().GenerateUsersOnlineList())
Session.SendMessage(Message);
return true;
#endregion
}
}
catch { }
return false;
}
internal static string MergeParams(string[] Params, int Start)
{
StringBuilder MergedParams = new StringBuilder();
for (int i = 0; i < Params.Length; i++)
{
if (i < Start)
{
continue;
}
if (i > Start)
{
MergedParams.Append(" ");
}
MergedParams.Append(Params);
}
return MergedParams.ToString();
}
}
}