diff options
-rw-r--r-- | features/guild/index.js | 4 | ||||
-rw-r--r-- | features/guild/metadata.json | 2 | ||||
-rw-r--r-- | utils/utils.js | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/features/guild/index.js b/features/guild/index.js index 8be193b..73d298b 100644 --- a/features/guild/index.js +++ b/features/guild/index.js @@ -45,8 +45,8 @@ class Guild extends Feature { message = `&2B${this.shortenPrefix.getValue() ? "" : "ridge"} > &7⤷&f ${msg.trim()}` } } else { - if (msg.match(/^@\w+, [\w\W]+[,.]+/)) { - let [_, name2, reply] = msg.match(/^@(\w+?), ([\w\W]+?)[,.]+/) + if (msg.match(/^@\w+, [\w\W]+[,.]+$/)) { + let [_, name2, reply] = msg.match(/^@(\w+?), ([\w\W]+?)[,.]+$/) message = `&2B${this.shortenPrefix.getValue() ? "" : "ridge"} > &b${name2} &7⤷&f ${reply.trim()}` } else { message = `&2G${this.shortenPrefix.getValue() ? "" : "uild"} > ${rank}${ign}${grank || ""}&f: ${msg}` diff --git a/features/guild/metadata.json b/features/guild/metadata.json index a75b3e4..babd19d 100644 --- a/features/guild/metadata.json +++ b/features/guild/metadata.json @@ -3,6 +3,6 @@ "description": "Features nice for guilds, eg bridge formatting", "isHidden": false, "isTogglable": true, - "defaultEnabled": true, + "defaultEnabled": false, "sortA": 1 }
\ No newline at end of file diff --git a/utils/utils.js b/utils/utils.js index 0e916ae..1f6cd6e 100644 --- a/utils/utils.js +++ b/utils/utils.js @@ -130,7 +130,7 @@ let utils = { return c }, ["&" + color]).map(a => { if (a.match(/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/igm)) { - return new TextComponent("&" + color + "&n" + a + "&" + color + ' ').setHover("show_text", "Click to open " + a.trim()).setClick("open_url", a.trim()) + return new TextComponent("&" + color + "&n" + a + "&" + color + ' ').setHover("show_text", "Click to open " + a.trim().replace(/^(?:[&§][0-9a-fmn])+|(?:[&§][0-9a-fmn])+$/g, "")).setClick("open_url", a.trim()) } else { return new TextComponent(a + ' ') } |