User:Lelouch Di Britannia Bot/ChatMessage.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: 'Hi '+chat.attributes.text.split(' has joined the chat.')[0]+', welcome to the Code Geass Wiki Chat! Please remember to follow our Code Geass Wiki:Chat Policy when you are here. Also note that you need ten productive edits to articles to be in here otherwise you will be asked to leave.'}); this.socket.send(chatEntry.xport); } }, mainRoom));