mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 06:13:40 +01:00
Add last link command back
This commit is contained in:
parent
438017c2b3
commit
21a057e0bd
2 changed files with 23 additions and 0 deletions
|
|
@ -78,8 +78,14 @@ namespace Dalamud.Game {
|
|||
}
|
||||
};
|
||||
|
||||
private readonly Regex urlRegex =
|
||||
new Regex(@"(http|ftp|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?",
|
||||
RegexOptions.Compiled);
|
||||
|
||||
private bool hasSeenLoadingMsg;
|
||||
|
||||
public string LastLink { get; private set; }
|
||||
|
||||
public ChatHandlers(Dalamud dalamud) {
|
||||
this.dalamud = dalamud;
|
||||
|
||||
|
|
@ -160,6 +166,9 @@ namespace Dalamud.Game {
|
|||
var messageCopy = message;
|
||||
var senderCopy = sender;
|
||||
|
||||
var linkMatch = this.urlRegex.Match(message.TextValue);
|
||||
if (linkMatch.Value.Length > 0)
|
||||
LastLink = linkMatch.Value;
|
||||
|
||||
// Handle all of this with SeString some day
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue