-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stabilize and enhance some minor bits
This adds some improvements and changes to make the bot more stable. Some were mistakes I stumbled upon when doing some random testing. - Widgets now can be in an "unloaded" state. WidgetUserModule holds references to all IWidget instances that are assigned to given user, while IWidget provides two new abstracts that derivatives have to implement: OnLoad() and OnUnload(). This allows to allocate a widget and attempt a load, and when it fails keep the widget unloaded. Failures can happen for many different reasons, ex. widget can be created when module that produces its events is not yet enabled. - Widgets can be manually reloaded by using `widget reload` command. No ID added will reload all widgets assigned to current user. - EventSystem now throws dedicated Event/Dispatcher not found exceptions. This is for more clarity, as it used to return "key not present in dictionary" generic error. - Some parts of LukeBot now rely on https_domain prop instead of server_ip. This is to ensure IP is not visible in ex. OAuth callbacks (although it does not matter much, since anyone can DNS lookup the domain...)
- Loading branch information
Showing
26 changed files
with
350 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
LukeBot.Communication/Exception/DispatcherNotFoundException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using LukeBot.Communication.Common; | ||
|
||
|
||
namespace LukeBot.Communication | ||
{ | ||
public class DispatcherNotFoundException: LukeBot.Common.Exception | ||
{ | ||
public DispatcherNotFoundException(string dispatcherName) | ||
: base(string.Format("Not found dispatcher: {0}", dispatcherName)) | ||
{} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using LukeBot.Communication.Common; | ||
|
||
|
||
namespace LukeBot.Communication | ||
{ | ||
public class EventNotFoundException: LukeBot.Common.Exception | ||
{ | ||
public EventNotFoundException(string eventName) | ||
: base(string.Format("Not found event: {0}", eventName)) | ||
{} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.