User:Botisme/wikia.js

importScriptPage('MediaWiki:B3.js/Chatbot.js'); addOnloadHook(function {	Torus.addListener('join', function(data) { if(!Torus.chats[data.roomId].parent) {Torus.io.sendMessage(data.roomId, 'Hi, we have new chat rules. Please read Bleach Wiki:Chat Policy. You must have ten edits to actual articles to be here.');} }); });

if(wgCanonicalSpecialPageName == 'Chat') { 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, we have new chat rules. Please read Bleach Wiki:Chat Policy. You must have ten edits to actual articles to be here.'}); this.socket.send(chatEntry.xport); }	}, mainRoom)); }