本文整理汇总了C#中global.PopFixedString方法的典型用法代码示例。如果您正苦于以下问题:C# global.PopFixedString方法的具体用法?C# global.PopFixedString怎么用?C# global.PopFixedString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类global
的用法示例。
在下文中一共展示了global.PopFixedString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Handle
public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
{
using(DatabaseClient dbClient = Essential.GetDatabase().GetClient())
{
string username = Event.PopFixedString();
string password = Event.PopFixedString(); //TODO: Hash undso..
dbClient.AddParamWithValue("username", username);
string currentpassword = "";
try
{
currentpassword = dbClient.ReadString("SELECT password FROM users WHERE [email protected]");
}
catch { }
if (currentpassword == "")
{ Session.SendMessage(new ServerMessage(Outgoing.InvalidUsername)); return; }
if (currentpassword != password)
{ Session.SendMessage(new ServerMessage(Outgoing.InvalidPassword)); return; }
ServerMessage asdf = new ServerMessage(12345);
asdf.AppendBoolean(true);
asdf.AppendString("Hi");
asdf.AppendInt32(1337);
asdf.AppendUInt(12345);
Session.SendMessage(asdf);
Session.tryLogin(dbClient.ReadString("SELECT auth_ticket FROM users WHERE [email protected]"));
}
}
示例2: Handle
public void Handle(HabboHotel.GameClients.GameClient Session, global::Essential.Messages.ClientMessage Event)
{
if (!Session.GetHabbo().HasFuse("acc_supporttool"))
return;
uint num = Event.PopWiredUInt();
string text = Event.PopFixedString();
int num2 = Event.PopWiredInt32();
Console.WriteLine(num + " " + text + " " + num2);
string string_ = string.Concat(new object[]
{
"User: ",
num,
", Message: ",
text,
", Time: ",
num2
});
Essential.GetGame().GetModerationTool().MuteUser(Session, num, text, num2);
Essential.GetGame().GetClientManager().StoreCommand(Session, "ModTool - Mute User", string_);
}