本文整理汇总了C#中GoldTree.HabboHotel.GameClients.GameClient.method_7方法的典型用法代码示例。如果您正苦于以下问题:C# GameClient.method_7方法的具体用法?C# GameClient.method_7怎么用?C# GameClient.method_7使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GoldTree.HabboHotel.GameClients.GameClient
的用法示例。
在下文中一共展示了GameClient.method_7方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: method_2
public void method_2(GameClient Session, string string_0, double double_0, string string_1, bool bool_0)
{
if (!Session.GetHabbo().isJuniori)
{
ModerationBanType enum4_ = ModerationBanType.USERNAME;
string text = Session.GetHabbo().Username;
string object_ = "user";
double num = GoldTree.GetUnixTimestamp() + double_0;
if (bool_0)
{
enum4_ = ModerationBanType.IP;
if (!LicenseTools.bool_20)
{
text = Session.GetConnection().String_0;
}
else
{
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
text = @class.ReadString("SELECT ip_last FROM users WHERE Id = " + Session.GetHabbo().Id + " LIMIT 1;");
}
}
object_ = "ip";
}
this.list_0.Add(new ModerationBan(enum4_, text, string_1, num));
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
@class.AddParamWithValue("rawvar", object_);
@class.AddParamWithValue("var", text);
@class.AddParamWithValue("reason", string_1);
@class.AddParamWithValue("mod", string_0);
@class.ExecuteQuery(string.Concat(new object[]
{
"INSERT INTO bans (bantype,value,reason,expire,added_by,added_date,appeal_state) VALUES (@rawvar,@var,@reason,'",
num,
"',@mod,'",
DateTime.Now.ToLongDateString(),
"', '1')"
}));
}
if (bool_0)
{
DataTable dataTable = null;
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
@class.AddParamWithValue("var", text);
dataTable = @class.ReadDataTable("SELECT Id FROM users WHERE ip_last = @var");
}
if (dataTable == null)
{
goto IL_268;
}
IEnumerator enumerator = dataTable.Rows.GetEnumerator();
try
{
while (enumerator.MoveNext())
{
DataRow dataRow = (DataRow)enumerator.Current;
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
@class.ExecuteQuery("UPDATE user_info SET bans = bans + 1 WHERE user_id = '" + (uint)dataRow["Id"] + "' LIMIT 1");
}
}
goto IL_268;
}
finally
{
IDisposable disposable = enumerator as IDisposable;
if (disposable != null)
{
disposable.Dispose();
}
}
}
using (DatabaseClient @class = GoldTree.GetDatabase().GetClient())
{
@class.ExecuteQuery("UPDATE user_info SET bans = bans + 1 WHERE user_id = '" + Session.GetHabbo().Id + "' LIMIT 1");
}
IL_268:
Session.method_7("You have been banned: " + string_1);
Session.method_12();
}
}