User:AndroidBot/global.js

switch (wgPageName) { case 'Special:B3': case 'Special:Chatbot': case 'Special:Tasks': case 'Special:Maintenance': case 'Special:CVN': importScriptPage('MediaWiki:B3.js', 'monchbox'); }; importScriptPage('MediaWiki:Bot.js/Hacks.js', 'lutest'); importScriptPage('MediaWiki:Chat.js/1.js', 'lutest'); function botMessage(text){mainRoom.socket.send(new models.ChatEntry({roomId:this.roomId,name:wgUserName,text:text}).xport);} function botPatrol(chat){ if(chat.attributes.name=='Roadhawk'){botTarget='Roadhawk';}else{botTarget='user';} if(chat.attributes.text=='!ios'){botMessage('iOs sucks. Android Rules!');} if(chat.attributes.text=='!updatelogs'){botMessage('I have updated logs.');} if(chat.attributes.text=='!windowsphone'){botMessage('Better than iOs, but android is still better');} if(chat.attributes.text=='!Hawkbot'){botMessage('Pshh. We're brothers. I have more gadgets than him.');} } mainRoom.model.chats.bind('afteradd',botPatrol);