User:Glass Heart/wikia.js

mainRoom.model.chats.bind('afteradd', $.proxy(function(chat) { if(chat.attributes.isInlineAlert && chat.attributes.text.indexOf(' has joined the chat.') != -1 && chat.attributes.text.indexOf(wgUserName) != 0) { var chatEntry = new models.ChatEntry({roomId: this.roomId, name: wgUserName, text: 'Hello and welcome to Fairy Tail Wiki Chat. If you are need any help on anything, feel free to contact the members of Team Element Seven.'}); this.socket.send(chatEntry.xport); } }, mainRoom));