MarkusRost 3 anni fa
parent
commit
269eceb909
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      util/newMessage.js

+ 2 - 2
util/newMessage.js

@@ -106,7 +106,7 @@ export default function newMessage(msg, lang, wiki = defaultSettings.wiki, prefi
 		if ( invoke.startsWith( '!!' ) && /^!!(?:[a-z\d-]{1,50}\.)?[a-z\d-]{1,50}\.[a-z\d-]{1,10}$/.test(domainToASCII(invoke.split('/')[0])) ) {
 			let project = wikiProjects.find( project => invoke.split('/')[0].endsWith( project.name ) );
 			if ( project ) {
-				let regex = invoke.match( new RegExp( '^' + project.regex + '$' ) );
+				let regex = invoke.match( new RegExp( '^!!' + project.regex + '$' ) );
 				if ( regex && invoke === '!!' + regex[1] ) return cmdmap.LINK(lang, msg, args.join(' '), new Wiki('https://' + regex[1] + project.scriptPath), invoke + ' ');
 			}
 		}
@@ -270,4 +270,4 @@ export default function newMessage(msg, lang, wiki = defaultSettings.wiki, prefi
 			}
 		} );
 	}
-}
+}