Skip to content

Commit

Permalink
Add /xinvite toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Bluefissure committed Sep 29, 2021
1 parent 62c979d commit 2713c58
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions Inviter/Inviter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,33 @@ public void CommandHandler(string command, string arguments)
{
Config.Enable = false;
ToastGui.ShowQuest(Localizer.Localize("Auto invite is turned off"), new QuestToastOptions
{
DisplayCheckmark = true,
PlaySound = true
});
Config.Save();
}
else if (args == "toggle")
{
Config.Enable = !Config.Enable;
if (Config.Enable)
{
ToastGui.ShowQuest(
String.Format(Localizer.Localize("Auto invite is turned on for \"{0}\""), Config.TextPattern)
, new QuestToastOptions
{
DisplayCheckmark = true,
PlaySound = true
});
}
else
{
ToastGui.ShowQuest(Localizer.Localize("Auto invite is turned off"), new QuestToastOptions
{
DisplayCheckmark = true,
PlaySound = true
});
}
Config.Save();
}
else if (int.TryParse(args, out int timeInMinutes))
Expand Down
4 changes: 2 additions & 2 deletions Inviter/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.4.0")]
[assembly: AssemblyFileVersion("1.0.4.0")]
[assembly: AssemblyVersion("1.0.4.1")]
[assembly: AssemblyFileVersion("1.0.4.1")]

0 comments on commit 2713c58

Please sign in to comment.