Navigation

    OpenBullet

    OpenBullet

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Awards
    1. Home
    2. ShiyaVivala
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    ShiyaVivala

    @ShiyaVivala

    4
    Reputation
    13
    Posts
    53
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    ShiyaVivala Follow

    Posts made by ShiyaVivala

    • RE: Issue with Configuring Remote API (listening on http://0.0.0.0:5000)

      Works perfectly on Windows 7 32 bit and Linux OS. Issue solved 🙂

      posted in Questions
      ShiyaVivala
    • RE: Issue with Configuring Remote API (listening on http://0.0.0.0:5000)

      Error: I could not see your service on 24.*..*** on port (5000)
      Reason: Connection timed out

      I thought the issue is firewall or port forwarding. I disabled firewall and set the port forwarding. But it's still same. I'll try on linux system soon.

      posted in Questions
      ShiyaVivala
    • Issue with Configuring Remote API (listening on http://0.0.0.0:5000)

      alt text

      It keeps listening 0.0.0.0 when I try to create an API on my vds.
      So I can't connect with admin panel. Or I can't set the source on OB.
      There isn't any problem on localhost. I tried on 2 machines and I'm confused why I keep getting this.

      Edit: I get this error message when i try to add source.
      alt text

      posted in Questions
      ShiyaVivala
    • Encryption in OpenBullet 2

      I hope encryption will be supported in OpenBullet 2 by default. It could be hw id or smth if it supposed to be offline

      Edit: or password protected configs would be cool 🙂

      But the protected config shouldn't be editable.

      Edit 2: They will be useless if OpenBullet 2 will be open-source again i know...

      posted in General Discussion
      ShiyaVivala
    • [Plugin] OpenBullet Colorizer

      alt text

      OBColorizerPlugin.dll

      using Newtonsoft.Json;
      using PluginFramework;
      using PluginFramework.Attributes;
      using RuriLib;
      using RuriLib.Interfaces;
      using RuriLib.ViewModels;
      using System;
      using System.Diagnostics;
      using System.IO;
      
      namespace OBColorizerPlugin
      {
          public class Class1 : ViewModelBase, IPlugin
          {
              private static readonly Random random = new Random();
              public string Name => "Colorizer";
              [Button("Colorizer")]
              public void Randomizer(IApplication app)
              {
                  try
                  {
                      string json = File.ReadAllText(@"Settings\OBSettings.json");
                      dynamic jsonObj = JsonConvert.DeserializeObject(json);
                      jsonObj.Themes.BackgroundMain = String.Format("#{0:X6}", random.Next(0x1000000));
                      jsonObj.Themes.BackgroundSecondary = String.Format("#{0:X6}", random.Next(0x1000000));
                      jsonObj.Themes.ForegroundMain = String.Format("#{0:X6}", random.Next(0x1000000));
                      jsonObj.Themes.ForegroundMenuSelected = String.Format("#{0:X6}", random.Next(0x1000000));
                      string output = JsonConvert.SerializeObject(jsonObj, Formatting.Indented);
                      File.WriteAllText(@"Settings\OBSettings.json", output);
                      //OnPropertyChanged(); //DOES NOT WORK
                      Process.Start("OpenBullet.exe");
                      Environment.Exit(0);
                  }
                  catch (Exception ex)
                  {
                      app.Logger.Log($"{ex}", LogLevel.Error, true);
                  }
              }
              [Button("Reset")]
              public void Resetizer(IApplication app)
              {
                  try
                  {
                      string json = File.ReadAllText(@"Settings\OBSettings.json");
                      dynamic jsonObj = JsonConvert.DeserializeObject(json);
                      jsonObj.Themes.BackgroundMain = "#222";
                      jsonObj.Themes.BackgroundSecondary = "#111";
                      jsonObj.Themes.ForegroundMain = "#dcdcdc";
                      jsonObj.Themes.ForegroundMenuSelected = "#1e90ff";
                      string output = JsonConvert.SerializeObject(jsonObj, Formatting.Indented);
                      File.WriteAllText(@"Settings\OBSettings.json", output);
                      Process.Start("OpenBullet.exe");
                      Environment.Exit(0);
                  }
                  catch (Exception ex)
                  {
                      app.Logger.Log($"{ex}", LogLevel.Error, true);
                  }
              }
          }
      }
      
      posted in Mods
      ShiyaVivala
    • RE: [Plugin] Updater for OB

      Quick fix:
      Now Release directory contents move to main openbullet directory.
      Latest compiled dll: https://mega.nz/file/T11TRYYC#3cbSYWkbqwZs3wD-JTAzV2ZITic8egbduDo6Y5O6F-4

      posted in Mods
      ShiyaVivala
    • RE: [Plugin] Updater for OB

      This is the code for who wants to compile byself

      using PluginFramework;
      using PluginFramework.Attributes;
      using RuriLib;
      using RuriLib.Interfaces;
      using System;
      using System.Diagnostics;
      using System.IO;
      using System.Net;
      
      namespace OBUpdaterPlugin
      {
          public class Class1 : IPlugin
          {
              public string Name => "OB Updater (Unofficial)";
      
              [Button("Check for updates")]
              public void CheckUpdate(IApplication app)
              {
                  WebClient webClient = new WebClient();
                  string html = webClient.DownloadString("https://github.com/openbullet/openbullet/releases");
                  string ltobVer = FindTextBetween(html, "css-truncate\" title=\"", "\">");
                  CreateVerText();
                  string obVer = File.ReadAllText(@"version.txt");
                  if(obVer.Length==0)
                      app.Logger.Log($"Your OB version: Unknown | Latest OB version: {ltobVer}", LogLevel.Info, true);
                  else
                      app.Logger.Log($"Your OB version: {obVer} | Latest OB version: {ltobVer}", LogLevel.Info, true);
              }
              public void CreateVerText()
              {
                  string path = @"version.txt";
      
                  if (!File.Exists(path))
                  {
                      File.Create(path).Dispose();
                  }
              }
              public string FindTextBetween(string text, string left, string right)
              {
                  // TODO: Validate input arguments
      
                  int beginIndex = text.IndexOf(left); // find occurence of left delimiter
                  if (beginIndex == -1)
                      return string.Empty; // or throw exception?
      
                  beginIndex += left.Length;
      
                  int endIndex = text.IndexOf(right, beginIndex); // find occurence of right delimiter
                  if (endIndex == -1)
                      return string.Empty; // or throw exception?
      
                  return text.Substring(beginIndex, endIndex - beginIndex).Trim();
              }
      
              [Button("Update your OpenBullet (requires restart)")]
              public void OBUpdater(IApplication app)
              {
                  WebClient webClient = new WebClient();
                  webClient.DownloadFile("https://github.com/openbullet/openbullet/releases/latest/download/OpenBullet.zip", @"Update.zip");
                  CreateVerText();
                  WebClient webClient2 = new WebClient();
                  string html = webClient2.DownloadString("https://github.com/openbullet/openbullet/releases");
                  string ltobVer = FindTextBetween(html, "css-truncate\" title=\"", "\">");
                  File.WriteAllText("version.txt", ltobVer);
                  string path = AppDomain.CurrentDomain.BaseDirectory;
                  var process = Process.Start(@"Plugins\7z.exe", "x -aoa Update.zip");
                  process.WaitForExit();
                  Process.Start("CMD.exe", "/C ROBOCOPY " + "\"" + Environment.CurrentDirectory + "\\Release" + "\"" + " " + "\"" + Environment.CurrentDirectory + "\"" + " /E /IS /MOVE");
                  Environment.Exit(0);
              }
          }
      }
      
      posted in Mods
      ShiyaVivala
    • [Plugin] Updater for OB

      Edit: We can technically say this is the first built-in Updater for OpenBullet ! 🙂

      It downloads the latest OB release from https://github.com/openbullet/openbullet/releases/latest/download/OpenBullet.zip and unzips /w 7z.exe

      Installation:
      Unzip the archive into Plugins folder.

      alt text

      Plugins.zip

      VirusTotal

      Latest compiled dll: https://mega.nz/file/T11TRYYC#3cbSYWkbqwZs3wD-JTAzV2ZITic8egbduDo6Y5O6F-4

      posted in Mods
      ShiyaVivala
    • RE: Executing a loliscript in Plugin

      @INFINITEY It just executes loliscript and returns with a result (FAIL, SUCCESS, BAN or ERROR)

      posted in Mods
      ShiyaVivala
    • RE: Executing a loliscript in Plugin

      You're awesome!

      Also you showed me that it's so easier than I thought. Works perfectly

      posted in Mods
      ShiyaVivala