Merge pull request #543 from sirDonovan/patch-1

Updated Roomdesc Command
This commit is contained in:
Guangcong Luo 2014-01-08 00:18:28 -08:00
commit 678f7b3b00

View File

@ -256,7 +256,8 @@ var commands = exports.commands = {
roomdesc: function(target, room, user) {
if (!target) {
if (!this.canBroadcast()) return;
this.sendReply('The room description is: '+room.desc);
var re = /(https?:\/\/(([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?))/g;
this.sendReplyBox('The room description is: '+room.desc.replace(re, "<a href=\"$1\">$1</a>"));
return;
}
if (!this.can('roommod', null, room)) return false;