本文整理汇总了C#中Azure.HabboHotel.GameClients.Interfaces.GameClient.SendWhisper方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.SendWhisper方法的具体用法?C# GameClient.SendWhisper怎么用?C# GameClient.SendWhisper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Azure.HabboHotel.GameClients.Interfaces.GameClient
的用法示例。
在下文中一共展示了GameClient.SendWhisper方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
try
{
Azure.GetGame()
.GetBanManager()
.BanUser(user, session.GetHabbo().UserName, 788922000.0, string.Join(" ", pms.Skip(2)),
true, false);
}
catch
{
Writer.Writer.LogException("Error while banning");
}
return true;
}
示例2: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetHabboForName(pms[0]);
if (user == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
{
adapter.SetQuery("DELETE FROM users_bans WHERE value = @name");
adapter.AddParameter("name", user.UserName);
adapter.RunQuery();
Azure.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, user.UserName, "Unban",
string.Format("User has been Unbanned [{0}]", pms[0]));
return true;
}
}
示例3: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null || user.GetHabbo() == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
try
{
user.GetConnection().Dispose();
Azure.GetGame()
.GetModerationTool()
.LogStaffEntry(session.GetHabbo().UserName, user.GetHabbo().UserName, "dc",
string.Format("Disconnect User[{0}]", pms[1]));
}
catch
{
}
return true;
}
示例4: Execute
public override bool Execute(GameClient session, string[] pms)
{
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (client.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
int time;
if (!int.TryParse(pms[1], out time))
{
session.SendWhisper(Azure.GetLanguage().GetVar("enter_numbers"));
return true;
}
client.GetHabbo().FloodTime = Azure.GetUnixTimeStamp() + Convert.ToInt32(pms[1]);
var serverMessage = new ServerMessage(LibraryParser.OutgoingRequest("FloodFilterMessageComposer"));
serverMessage.AppendInteger(Convert.ToInt32(pms[1]));
client.SendMessage(serverMessage);
return true;
}
示例5: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (user == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (user.GetHabbo().Rank >= session.GetHabbo().Rank)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
var userName = pms[0];
var rank = pms[1];
using (var adapter = Azure.GetDatabaseManager().GetQueryReactor())
{
adapter.SetQuery("UPDATE users SET [email protected] WHERE [email protected] LIMIT 1");
adapter.AddParameter("user", userName);
adapter.AddParameter("rank", rank);
adapter.RunQuery();
}
session.SendWhisper(Azure.GetLanguage().GetVar("user_rank_update"));
return true;
}
示例6: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
var user = room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
if (user == null) return true;
if (room.RoomData.DisablePull)
{
session.SendWhisper("Realizar Pull Foi Desativado pelo Dono do Quarto");
return true;
}
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (client.GetHabbo().Id == session.GetHabbo().Id)
{
session.SendWhisper(Azure.GetLanguage().GetVar("command_pull_error_own"));
return true;
}
var user2 = room.GetRoomUserManager().GetRoomUserByHabbo(client.GetHabbo().Id);
if (user2 == null) return true;
if (user2.TeleportEnabled)
{
session.SendWhisper(Azure.GetLanguage().GetVar("command_error_teleport_enable"));
return true;
}
if (PathFinder.GetDistance(user.X, user.Y, user2.X, user2.Y) > 2)
{
session.SendWhisper(Azure.GetLanguage().GetVar("command_pull_error_far_away"));
return true;
}
if ((user.RotBody % 2) != 0) user.RotBody--;
switch (user.RotBody)
{
case 0:
user2.MoveTo(user.X, user.Y - 1);
break;
case 2:
user2.MoveTo(user.X + 1, user.Y);
break;
case 4:
user2.MoveTo(user.X, user.Y + 1);
break;
case 6:
user2.MoveTo(user.X - 1, user.Y);
break;
}
return true;
}
示例7: Execute
public override bool Execute(GameClient session, string[] pms)
{
var userName = pms[0];
var userSession = Azure.GetGame().GetClientManager().GetClientByUserName(userName);
if (userSession == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (session.GetHabbo().Rank <= userSession.GetHabbo().Rank)
{
session.SendNotif(Azure.GetLanguage().GetVar("user_is_higher_rank"));
return true;
}
if (userSession.GetHabbo().CurrentRoomId < 1)
{
session.SendNotif(Azure.GetLanguage().GetVar("command_kick_user_not_in_room"));
return true;
}
var room = Azure.GetGame().GetRoomManager().GetRoom(userSession.GetHabbo().CurrentRoomId);
if (room == null) return true;
room.GetRoomUserManager().RemoveUserFromRoom(userSession, true, false);
userSession.CurrentRoomUserId = -1;
if (pms.Length > 1)
{
userSession.SendNotif(
string.Format(Azure.GetLanguage().GetVar("command_kick_user_mod_default") + "{0}.",
string.Join(" ", pms.Skip(1))));
}
else userSession.SendNotif(Azure.GetLanguage().GetVar("command_kick_user_mod_default"));
return true;
}
示例8: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
if (!session.GetHabbo().CurrentRoom.RoomMuted)
{
session.SendWhisper("Room isn't muted.");
return true;
}
session.GetHabbo().CurrentRoom.RoomMuted = false;
/*
var message = new ServerMessage();
message.Init(LibraryParser.OutgoingRequest("AlertNotificationMessageComposer"));
message.AppendString("Room is now UnMuted.");
message.AppendString("");
room.SendMessage(message);*/
room.SendMessage(GameClient.GetBytesNotif("Este quarto foi des-selenciado."));
Azure.GetGame()
.GetModerationTool().LogStaffEntry(session.GetHabbo().UserName, string.Empty,
"Room Unmute", "Room UnMuted");
return true;
}
示例9: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
if (room.RoomMuted)
{
session.SendWhisper("Room is already muted.");
return true;
}
session.GetHabbo().CurrentRoom.RoomMuted = true;
/*
var message = new ServerMessage(LibraryParser.OutgoingRequest("AlertNotificationMessageComposer"));
message.AppendString(string.Format("The room was muted due to:\r{0}", string.Join(" ", pms)));
message.AppendString(string.Empty);
room.SendMessage(message);*/
room.SendMessage(GameClient.GetBytesNotif(
$"Este quarto foi silenciado pelo motivo:\r{string.Join(" ", pms)}"));
Azure.GetGame()
.GetModerationTool().LogStaffEntry(session.GetHabbo().UserName, string.Empty,
"Room Mute", "Room muted");
return true;
}
示例10: Execute
public override bool Execute(GameClient session, string[] pms)
{
var room = session.GetHabbo().CurrentRoom;
var user = room.GetRoomUserManager().GetRoomUserByHabbo(session.GetHabbo().Id);
if (user == null) return true;
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (client.GetHabbo().Id == session.GetHabbo().Id)
{
session.SendWhisper(Azure.GetLanguage().GetVar("command_pull_error_own"));
return true;
}
var user2 = room.GetRoomUserManager().GetRoomUserByHabbo(client.GetHabbo().Id);
if (user2 == null) return true;
if (user2.TeleportEnabled)
{
session.SendWhisper(Azure.GetLanguage().GetVar("command_error_teleport_enable"));
return true;
}
if ((user.RotBody % 2) != 0) user.RotBody--;
switch (user.RotBody)
{
case 0:
user2.MoveTo(user.X, user.Y - 1);
break;
case 2:
user2.MoveTo(user.X + 1, user.Y);
break;
case 4:
user2.MoveTo(user.X, user.Y + 1);
break;
case 6:
user2.MoveTo(user.X - 1, user.Y);
break;
}
return true;
}
示例11: Execute
public override bool Execute(GameClient session, string[] pms)
{
uint speed;
if (uint.TryParse(pms[0], out speed)) session.GetHabbo().CurrentRoom.GetRoomItemHandler().SetSpeed(speed);
else session.SendWhisper(Azure.GetLanguage().GetVar("command_setspeed_error_numbers"));
return true;
}
示例12: Execute
public override bool Execute(GameClient session, string[] pms)
{
var user = session.GetHabbo()
.CurrentRoom.GetRoomUserManager()
.GetRoomUserByHabbo(pms[0]);
if (user == null) session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
else user.Frozen = !user.Frozen;
return true;
}
示例13: Execute
public override bool Execute(GameClient session, string[] pms)
{
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null || client.GetHabbo() == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
if (client.GetHabbo().Rank >= 4)
{
session.SendWhisper("You are not allowed to mute that user.");
}
Azure.GetGame()
.GetModerationTool().LogStaffEntry(session.GetHabbo().UserName, client.GetHabbo().UserName,
"Unmute", "Unmuted user");
client.GetHabbo().UnMute();
return true;
}
示例14: Execute
public override bool Execute(GameClient session, string[] pms)
{
var mode = pms[0];
pms = pms.Skip(1).ToArray();
switch (mode.ToLower())
{
case "info":
{
if (pms.Length == 0) session.SendWhisper("Usage :developer info [items/user/users/cache]");
else return GetInfo(session, pms);
break;
}
case "set":
{
if (pms.Length < 2) session.SendWhisper("Usage :developer set [item/baseItem] id");
else return Set(session, pms);
break;
}
case "copy":
{
return Copy(session);
}
case "paste":
{
return Paste(session);
}
case "delete":
{
return Delete(session);
}
default:
{
session.SendWhisper("Usage :developer [info/set/copy/paste/delete]");
break;
}
}
return true;
}
示例15: Execute
public override bool Execute(GameClient session, string[] pms)
{
var client = Azure.GetGame().GetClientManager().GetClientByUserName(pms[0]);
if (client == null)
{
session.SendWhisper(Azure.GetLanguage().GetVar("user_not_found"));
return true;
}
int amount;
if (!int.TryParse(pms[1], out amount))
{
session.SendWhisper(Azure.GetLanguage().GetVar("enter_numbers"));
return true;
}
client.GetHabbo().Credits += amount;
client.GetHabbo().UpdateCreditsBalance();
client.SendNotif(string.Format(Azure.GetLanguage().GetVar("staff_gives_credits"),
session.GetHabbo().UserName, amount));
return true;
}