Only allow drivers and up to broadcast roomintro

This commit is contained in:
The Immortal 2014-06-27 22:30:01 +04:00
parent 91325116ac
commit 6155ac0f7f

View File

@ -250,6 +250,7 @@ var commands = exports.commands = {
roomintro: function (target, room, user) {
if (!target) {
if (!this.canBroadcast()) return;
if (this.broadcasting && !user.can('mute', null, room)) return;
var re = /(https?:\/\/(([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?))/g;
if (!room.introMessage) return this.sendReply("This room does not have an introduction set.");
this.sendReplyBox(room.introMessage);