});\r
\r
\r
+ // Make links clickable\r
+ msg.msg = msg.msg.replace(/((https?\:\/\/|ftp\:\/\/)|(www\.))(\S+)(\w{2,4})(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]*))?/gi, function (url) {\r
+ var nice;\r
+\r
+ nice = url;\r
+ if (nice.length > 100) {\r
+ nice = nice.substr(0, 100) + '...';\r
+ }\r
+\r
+ return '<a class="link_ext" target="_blank" rel="nofollow" href="' + url + '">' + nice + '</a>';\r
+ });\r
+\r
+\r
// Convert IRC formatting into HTML formatting\r
msg.msg = formatIRCMsg(msg.msg);\r
\r