public void Settings() { PartyChatCommandSettings.Load(); PartyChatCommandSettings.CurrentSetting.ToForm(); PartyChatCommandSettings.CurrentSetting.Save(); Logging.Write("[PartyChatCommand] Settings saved."); }
public void Initialize() { _isLaunched = true; PartyChatCommandSettings.Load(); Logging.Write("[PartyChatCommand] Started."); var chat = new Channel(); EventsLuaWithArgs.OnEventsLuaWithArgs += EventsLuaWithArgsOnOnEventsLuaWithArgs; while (_isLaunched && Products.IsStarted) { try { while (chat.ActuelRead != Channel.GetMsgActuelInWow && Products.IsStarted) { //var msg = chat.ReadMsg(); //var sheeit = "wat"; //Lua.LuaDoString("print(\"" + msg + "\")"); ////Lua.LuaDoString("print(\"" + sheeit + "\")"); //if (!string.IsNullOrWhiteSpace(msg.Msg) && // ((int)msg.Channel == 49 || msg.Channel == ChatTypeId.WHISPER)) //{ // foreach (var c in PartyChatCommandSettings.CurrentSetting.Commands) // { // if (c.IsValid() && string.Equals(c.CommandChat.Trim(), msg.Msg.Trim(), StringComparison.CurrentCultureIgnoreCase)) // { // c.Run(); // break; // } // } //} } } catch (Exception e) { Logging.WriteError("[PartyChatCommand]: " + e); } Thread.Sleep(150); } }