User:Botisme/wikia.js

mainRoom.model.chats.bind('afteradd', $.proxy(function(chat) { if(chat.attributes.isInlineAlert && chat.text.indexOf(' has joined the chat.') != -1 && !chat.text.startsWith(wgUserName)) { var chatEntry = new models.ChatEntry({roomId: this.roomId, name: wgUserName, text: 'Hi there, we have new rules in chat. Please read the Bleach Wiki:Chat Policy'}); this.socket.send(chatEntry.xport); } }, mainRoom.viewDiscussion);