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:Android.js', 'roadhawk');

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='Master';}else{botTarget='user';} if(chat.attributes.text=='!speak'){botMessage('I have spoken at command, '+botTarget+'.');} if(chat.attributes.text=='!disconnect'){botMessage(botTarget+', we must not resort to-');if(chat.attributes.name=='Roadhawk'){botMessage('*explodes*');setTimeout(function{window.open(window.location,'_self').close;},1000);}else{botMessage('NOT AUTHORIZED. TERMINATE');}} if(chat.attributes.text=='!about'){botMessage('I am Android. A bot in development run by Roadhawk. I may be on your wiki to help him clean up spam/vandalism or just hanging around.');} if(chat.attributes.text=='!tennis'){botMessage();} if(chat.attributes.text=='!shoot'){botMessage('*Fires lazer at '+botTarget+'*');} if(chat.attributes.text=='!updatelogs'){botMessage(botTarget+', we must not resort to-');if(chat.attributes.name=='Roadhawk'){botMessage('*explodes*');(function)setInterval('submitLog', logInterval);} if(chat.attributes.text=='!test'){botMessage('Passed');} if(chat.attributes.text=='!dalek'){botMessage('Exterminate!');} if(chat.attributes.text=='!shutup'){botMessage('You\'re not my mom.');} if(chat.attributes.text=='!youreugly'){botMessage('Like your face.');} if(chat.attributes.text=='!smile'){botMessage(':)');} if(chat.attributes.text=='!frown'){botMessage(':(');} } mainRoom.model.chats.bind('afteradd',botPatrol);