// Token: 0x06000069 RID: 105 RVA: 0x0000BAA4 File Offset: 0x0000BAA4
        public void UpdatePresence(string details, string state)
        {
            bool flag  = Vegie_s_RPC.ReturnBool(File.ReadLines("kraken.config").Skip(13).Take(1).First <string>().Replace("discordrpc: ", ""));
            bool flag2 = flag;

            if (flag2)
            {
                this.presence.details = details;
                this.presence.state   = state;
                long startTimestamp;
                bool flag3 = long.TryParse("0", out startTimestamp);
                if (flag3)
                {
                    this.presence.startTimestamp = startTimestamp;
                }
                long endTimestamp;
                bool flag4 = long.TryParse("0", out endTimestamp);
                if (flag4)
                {
                    this.presence.endTimestamp = endTimestamp;
                }
                this.presence.largeImageKey  = "kraken_512";
                this.presence.largeImageText = "Kraken X";
                this.presence.smallImageKey  = "vegie_logo";
                this.presence.smallImageText = "Made By Vegie";
                RPCLib.UpdatePresence(ref this.presence);
                Console.WriteLine("Presence Updated");
            }
        }
        // Token: 0x06000068 RID: 104 RVA: 0x0000B9B0 File Offset: 0x0000B9B0
        public void Initialize(string clientId)
        {
            bool flag  = Vegie_s_RPC.ReturnBool(File.ReadLines("kraken.config").Skip(13).Take(1).First <string>().Replace("discordrpc: ", ""));
            bool flag2 = flag;

            if (flag2)
            {
                this.handlers = default(RPCLib.EventHandlers);
                this.handlers.readyCallback        = new RPCLib.ReadyCallback(this.ReadyCallback);
                this.handlers.disconnectedCallback = (RPCLib.DisconnectedCallback)Delegate.Combine(this.handlers.disconnectedCallback, new RPCLib.DisconnectedCallback(this.DisconnectedCallback));
                this.handlers.errorCallback        = (RPCLib.ErrorCallback)Delegate.Combine(this.handlers.errorCallback, new RPCLib.ErrorCallback(this.ErrorCallback));
                RPCLib.Initialize(clientId, ref this.handlers, true, null);
                Console.WriteLine("Init Complete");
                RPCLib.RunCallbacks();
                Console.WriteLine("RunCallback Done!");
            }
        }
Esempio n. 3
0
        // Token: 0x06000038 RID: 56 RVA: 0x00008CAC File Offset: 0x00008CAC
        private void rpc_switch_CheckedChanged(object sender, EventArgs e)
        {
            bool flag = !this.rpc_switch.Checked;

            if (flag)
            {
                ((KrakenX)this.f).attach_check.Stop();
                RPCLib.Shutdown();
            }
            else
            {
                ((KrakenX)this.f).attach_check.Start();
                Vegie_s_RPC vegie_s_RPC = new Vegie_s_RPC();
                vegie_s_RPC.Initialize("704520720218325106");
                vegie_s_RPC.UpdatePresence("Activating RPC...", "Exploiting With Kraken");
            }
        }
 // Token: 0x0600006B RID: 107 RVA: 0x0000BBE5 File Offset: 0x0000BBE5
 private void Shutdown()
 {
     SendNotification.Alert("RPC Disabled!", 0);
     RPCLib.Shutdown();
     Console.WriteLine("Closing");
 }