User:PotatoCanadian/ChatHacks

/* * ChatHacks.js, by Monchoman45. * Version 7.0 *  * Features: *  Ability to clear your chat window *  A host of slash commands (including /me and /afk) *  Ability to create multi user private chats *  Inline alerts every time your away status changes *  Icons next to messages by staff and chat mods in the room *  Pings when someone mentions your name or any other specified phrases */ if ( wgCanonicalSpecialPageName == 'Chat' ) { window.hasFocus = true ; window.dinged = false ; window.ding <span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">; window.<span class="me1" style="color:rgb(102,0,102);">titleorig <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(102,0,102);">title <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function Unding<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//for fixing the title after you've been dinged document.<span class="me1" style="color:rgb(102,0,102);">getElementsByTagName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'title' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">= window.<span class="me1" style="color:rgb(102,0,102);">titleorig <span class="sy0" style="color:rgb(51,153,51);">; clearInterval<span class="br0" style="color:rgb(0,153,0);">( window.<span class="me1" style="color:rgb(102,0,102);">ding <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; window.<span class="me1" style="color:rgb(102,0,102);">dinged <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} $<span class="br0" style="color:rgb(0,153,0);">( window<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">bind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'focus' <span class="sy0" style="color:rgb(51,153,51);">, Unding<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; $<span class="br0" style="color:rgb(0,153,0);">( window<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">bind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'focus' <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(102,0,102);">hasFocus <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; $<span class="br0" style="color:rgb(0,153,0);">( window<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">bind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'blur' <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(102,0,102);">hasFocus <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Function for adding messages to the window NodeChatDiscussion.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">iconPing <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( chat<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var icon <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">models <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">models <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">attributes .<span class="me1" style="color:rgb(102,0,102);">name <span class="sy0" style="color:rgb(51,153,51);">== chat.<span class="me1" style="color:rgb(102,0,102);">attributes .<span class="me1" style="color:rgb(102,0,102);">name <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">models <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">attributes .<span class="me1" style="color:rgb(102,0,102);">isStaff <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ icon <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">' <img class="stafficon" src="http://images2.wikia.nocookie.net/monchbox/images/f/f3/Icon-staff.png">' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">models <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">attributes .<span class="me1" style="color:rgb(102,0,102);">isModerator <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ icon <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">' <img class="modicon" src="http://images2.wikia.nocookie.net/monchbox/images/6/6b/Icon-chatmod.png">' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">break <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( icon<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">last <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.username' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">html <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">last <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.username' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">html <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ icon<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( mainRoom.<span class="me1" style="color:rgb(102,0,102);">isInitialized <span class="sy0" style="color:rgb(51,153,51);">&& chat.<span class="me1" style="color:rgb(102,0,102);">attributes .<span class="me1" style="color:rgb(102,0,102);">name <span class="sy0" style="color:rgb(51,153,51);">!= wgUserName <span class="sy0" style="color:rgb(51,153,51);">&& <span class="sy0" style="color:rgb(51,153,51);">! chat.<span class="me1" style="color:rgb(102,0,102);">attributes .<span class="me1" style="color:rgb(102,0,102);">isInlineAlert <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(102,0,102);">dinged <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//resolve HTML <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var text <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(102,0,102);">createElement <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'span' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; text.<span class="me1" style="color:rgb(102,0,102);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">= chat.<span class="me1" style="color:rgb(102,0,102);">attributes .<span class="me1" style="color:rgb(102,0,102);">text <span class="sy0" style="color:rgb(51,153,51);">; text <span class="sy0" style="color:rgb(51,153,51);">= text.<span class="me1" style="color:rgb(102,0,102);">textContent <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var pings <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(102,0,102);">getElementById <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'pings' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">value .<span class="me1" style="color:rgb(102,0,102);">removeTrailing <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">< pings.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( text.<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( pings<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">|| <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="sy0" style="color:rgb(51,153,51);">!= mainRoom.<span class="me1" style="color:rgb(102,0,102);">viewDiscussion <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! window.<span class="me1" style="color:rgb(102,0,102);">hasFocus <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Only annoy people if the window isn't focused document.<span class="me1" style="color:rgb(102,0,102);">getElementById <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'sound' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'<audio src="http://images.wikia.com/monchbox/images/0/01/Beep-sound.ogg" autoplay=""> ' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! window.<span class="me1" style="color:rgb(102,0,102);">dinged <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(102,0,102);">ding <span class="sy0" style="color:rgb(51,153,51);">= setInterval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'FlashTitle' <span class="sy0" style="color:rgb(51,153,51);">, <span class="nu0" style="color:rgb(204,0,0);">500 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">scrollToBottom <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="sy0" style="color:rgb(51,153,51);">== mainRoom.<span class="me1" style="color:rgb(102,0,102);">viewDiscussion <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var ref <span class="sy0" style="color:rgb(51,153,51);">= text.<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( pings<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var phrase <span class="sy0" style="color:rgb(51,153,51);">= text.<span class="me1" style="color:rgb(102,0,102);">slice <span class="br0" style="color:rgb(0,153,0);">( ref<span class="sy0" style="color:rgb(51,153,51);">, ref <span class="sy0" style="color:rgb(51,153,51);">+ pings<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">last <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.message' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">html <span class="br0" style="color:rgb(0,153,0);">( text.<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( phrase<span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">' ' <span class="sy0" style="color:rgb(51,153,51);">+ phrase <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">break <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Kill emoticons <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">last <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">children <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.message img' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">each <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">outerHTML <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'<span onclick="this.outerHTML = decodeURIComponent(<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\' ' <span class="sy0" style="color:rgb(51,153,51);">+ encodeURIComponent<span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">outerHTML <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\' );" style="color:blue; cursor:pointer;" title="' <span class="sy0" style="color:rgb(51,153,51);">+ i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'emote' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'">' <span class="sy0" style="color:rgb(51,153,51);">+ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">title <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">' ' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} mainRoom.<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">bind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'afteradd' <span class="sy0" style="color:rgb(51,153,51);">, $.<span class="me1" style="color:rgb(102,0,102);">proxy <span class="br0" style="color:rgb(0,153,0);">( mainRoom.<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">iconPing <span class="sy0" style="color:rgb(51,153,51);">, mainRoom.<span class="me1" style="color:rgb(102,0,102);">viewDiscussion <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Away status functions NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">setAway <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( msg<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! msg<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var msg <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} $<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">log <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">"Attempting to go away with message: " <span class="sy0" style="color:rgb(51,153,51);">+ msg<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var setStatusCommand <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">SetStatusCommand <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 			statusState<span class="sy0" style="color:rgb(51,153,51);">: STATUS_STATE_AWAY<span class="sy0" style="color:rgb(51,153,51);">,  			statusMessage<span class="sy0" style="color:rgb(51,153,51);">: msg 		<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'away' <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( setStatusCommand.<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">setBack <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">comingBackFromAway <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">// if we have sent this command (but just haven't finished coming back yet), don't keep spamming the server w/this command $<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">log <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">"Telling the server that I'm back." <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">comingBackFromAway <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var setStatusCommand <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">SetStatusCommand <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 				statusState<span class="sy0" style="color:rgb(51,153,51);">: STATUS_STATE_PRESENT<span class="sy0" style="color:rgb(51,153,51);">,  				statusMessage<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">''  			<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'back' <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( setStatusCommand.<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Send message function NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">sendMessage <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( event<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">active <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( event.<span class="me1" style="color:rgb(102,0,102);">which <span class="sy0" style="color:rgb(51,153,51);">== <span class="nu0" style="color:rgb(204,0,0);">13 <span class="sy0" style="color:rgb(51,153,51);">&& <span class="sy0" style="color:rgb(51,153,51);">! event.<span class="me1" style="color:rgb(102,0,102);">shiftKey <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ event.<span class="me1" style="color:rgb(102,0,102);">preventDefault <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; mainRoom.<span class="me1" style="color:rgb(102,0,102);">resetActivityTimer <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var inputField <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">getTextInput <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var send <span class="sy0" style="color:rgb(51,153,51);">= Preparse.<span class="me1" style="color:rgb(102,0,102);">call <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="sy0" style="color:rgb(51,153,51);">, inputField.<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( inputField.<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">&& send<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var chatEntry <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">ChatEntry <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ roomId<span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">roomId <span class="sy0" style="color:rgb(51,153,51);">, name<span class="sy0" style="color:rgb(51,153,51);">: wgUserName<span class="sy0" style="color:rgb(51,153,51);">, text<span class="sy0" style="color:rgb(51,153,51);">: inputField.<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">isPrivate <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//is prive <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">afterInitQueue .<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">< <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">|| <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">< <span class="nu0" style="color:rgb(204,0,0);">2 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">mainController .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">privateRoom .<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">isInitialized <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">afterInitQueue .<span class="me1" style="color:rgb(102,0,102);">push <span class="br0" style="color:rgb(0,153,0);">( chatEntry.<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//temp chat entry in case of slow connection time chatEntry.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">set <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ temp <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">, avatarSrc<span class="sy0" style="color:rgb(51,153,51);">: wgAvatarUrl <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">add <span class="br0" style="color:rgb(0,153,0);">( chatEntry<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( chatEntry.<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( chatEntry.<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} event.<span class="me1" style="color:rgb(102,0,102);">preventDefault <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} inputField.<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; $<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">log <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'submitting form' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; inputField.<span class="me1" style="color:rgb(102,0,102);">focus <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} mainRoom.<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">unbind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'sendMessage' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; mainRoom.<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">bind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'sendMessage' <span class="sy0" style="color:rgb(51,153,51);">, $.<span class="me1" style="color:rgb(102,0,102);">proxy <span class="br0" style="color:rgb(0,153,0);">( mainRoom.<span class="me1" style="color:rgb(102,0,102);">sendMessage <span class="sy0" style="color:rgb(51,153,51);">, mainRoom<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Functions that have to be changed for interwiki chat NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">openPrivateRoom <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( users<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ users.<span class="me1" style="color:rgb(102,0,102);">push <span class="br0" style="color:rgb(0,153,0);">( wgUserName <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; $.<span class="me1" style="color:rgb(102,0,102);">ajax <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 			type<span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'POST' <span class="sy0" style="color:rgb(51,153,51);">,  			url<span class="sy0" style="color:rgb(51,153,51);">: wgScript <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'?action=ajax&rs=ChatAjax&method=getPrivateRoomID' <span class="sy0" style="color:rgb(51,153,51);">,  			data<span class="sy0" style="color:rgb(51,153,51);">: <span class="br0" style="color:rgb(0,153,0);">{  				users <span class="sy0" style="color:rgb(51,153,51);">: users.<span class="me1" style="color:rgb(102,0,102);">join <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">',' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, success<span class="sy0" style="color:rgb(51,153,51);">: $.<span class="me1" style="color:rgb(102,0,102);">proxy <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( data<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ 				$<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">log <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">"Attempting create private room with users " <span class="sy0" style="color:rgb(51,153,51);">+ users.<span class="me1" style="color:rgb(102,0,102);">join <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">',' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var data <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">OpenPrivateRoom <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ roomId<span class="sy0" style="color:rgb(51,153,51);">: data.<span class="me1" style="color:rgb(102,0,102);">id <span class="sy0" style="color:rgb(51,153,51);">, users<span class="sy0" style="color:rgb(51,153,51);">: users<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">baseOpenPrivateRoom <span class="br0" style="color:rgb(0,153,0);">( data<span class="sy0" style="color:rgb(51,153,51);">, <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">showRoom <span class="br0" style="color:rgb(0,153,0);">( data.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'roomId' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ data.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'roomId' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">isPrivate <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ data.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'roomId' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">init <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//this.socket.send(data.xport); <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="br0" style="color:rgb(0,153,0);">) 		<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewUsers .<span class="me1" style="color:rgb(102,0,102);">hideMenu <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} NodeRoomController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">onJoin <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( message<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var joinedUser <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">User <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; joinedUser.<span class="me1" style="color:rgb(102,0,102);">mport <span class="br0" style="color:rgb(0,153,0);">( message.<span class="me1" style="color:rgb(102,0,102);">joinData <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var connectedUser <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">findByName <span class="br0" style="color:rgb(0,153,0);">( joinedUser.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'name' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof connectedUser <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">"undefined" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">add <span class="br0" style="color:rgb(0,153,0);">( joinedUser<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">fire <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'afterJoin' <span class="sy0" style="color:rgb(51,153,51);">, joinedUser<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//TODO: move it to other class <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">isPrivate <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">// Create the inline-alert (on client side so that we only display it if the user actually IS new to the room and not just disconnecting/reconnecting). <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var newChatEntry <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">InlineAlert <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ text<span class="sy0" style="color:rgb(51,153,51);">: $.<span class="me1" style="color:rgb(102,0,102);">msg <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'chat-user-joined' <span class="sy0" style="color:rgb(51,153,51);">, <span class="br0" style="color:rgb(0,153,0);">[ joinedUser.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'name' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">add <span class="br0" style="color:rgb(0,153,0);">( newChatEntry<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">disableRoom <span class="br0" style="color:rgb(0,153,0);">( joinedUser<span class="sy0" style="color:rgb(51,153,51);">, <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">// The user is already in the room... just update them (in case they have changed). <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">remove <span class="br0" style="color:rgb(0,153,0);">( connectedUser<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">add <span class="br0" style="color:rgb(0,153,0);">( joinedUser<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} NodeRoomController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">onPart <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( message<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var partedUser <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">User <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; partedUser.<span class="me1" style="color:rgb(102,0,102);">mport <span class="br0" style="color:rgb(0,153,0);">( message.<span class="me1" style="color:rgb(102,0,102);">data <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var connectedUser <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">findByName <span class="br0" style="color:rgb(0,153,0);">( partedUser.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'name' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof connectedUser <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(51,102,204);">"undefined" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//TODO: move it to other class <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">isPrivate <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var newChatEntry <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">InlineAlert <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ text<span class="sy0" style="color:rgb(51,153,51);">: $.<span class="me1" style="color:rgb(102,0,102);">msg <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'chat-user-parted' <span class="sy0" style="color:rgb(51,153,51);">, <span class="br0" style="color:rgb(0,153,0);">[ connectedUser.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'name' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">add <span class="br0" style="color:rgb(0,153,0);">( newChatEntry<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">users .<span class="me1" style="color:rgb(102,0,102);">remove <span class="br0" style="color:rgb(0,153,0);">( connectedUser<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">disableRoom <span class="br0" style="color:rgb(0,153,0);">( connectedUser<span class="sy0" style="color:rgb(51,153,51);">, <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} NodeRoomController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">disableRoom <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( user<span class="sy0" style="color:rgb(51,153,51);">, flag<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">isPrivate <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//TODO: fix it for multiuser priv chat <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var privateUser <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">privateUsers .<span class="me1" style="color:rgb(102,0,102);">findByName <span class="br0" style="color:rgb(0,153,0);">( user.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'name' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof privateUser <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(51,102,204);">"undefined" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var roomId <span class="sy0" style="color:rgb(51,153,51);">= privateUser.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">get <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'roomId' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ roomId<span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(51,102,204);">"undefined" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ roomId<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">room .<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">set <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ 						<span class="st0" style="color:rgb(51,102,204);">'blockedMessageInput' <span class="sy0" style="color:rgb(51,153,51);">: flag 					<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//try to reconnect <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( flag <span class="sy0" style="color:rgb(51,153,51);">=== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="sy0" style="color:rgb(51,153,51);">&& <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ roomId<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">> <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ roomId<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">model .<span class="me1" style="color:rgb(102,0,102);">privateRoom .<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">showRoom <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( roomId<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ $<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">log <span class="br0" style="color:rgb(0,153,0);">( roomId<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">activeRoom <span class="sy0" style="color:rgb(51,153,51);">== roomId <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">activeRoom <span class="sy0" style="color:rgb(51,153,51);">= roomId<span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( roomId <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'main' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">main .<span class="me1" style="color:rgb(102,0,102);">setActive <span class="br0" style="color:rgb(0,153,0);">( <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">main .<span class="me1" style="color:rgb(102,0,102);">setActive <span class="br0" style="color:rgb(0,153,0);">( <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( i <span class="sy0" style="color:rgb(51,153,51);">== roomId<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">setActive <span class="br0" style="color:rgb(0,153,0);">( <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">setActive <span class="br0" style="color:rgb(0,153,0);">( <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">opens <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( i <span class="sy0" style="color:rgb(51,153,51);">== roomId<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">opens <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">setActive <span class="br0" style="color:rgb(0,153,0);">( <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">opens <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">setActive <span class="br0" style="color:rgb(0,153,0);">( <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">openPublicRoom <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( roomId<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">opens <span class="br0" style="color:rgb(0,153,0);">[ roomId<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new NodeRoomController<span class="br0" style="color:rgb(0,153,0);">( roomId<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">opens <span class="br0" style="color:rgb(0,153,0);">[ roomId<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">mainController <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//set main controller for this chat room <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">showRoom <span class="br0" style="color:rgb(0,153,0);">( roomId<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">opens <span class="br0" style="color:rgb(0,153,0);">[ roomId<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">init <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="coMULTI" style="font-style:italic;color:rgb(0,102,0);">/*//For interwiki chatting, a merger of NodeRoomController's private management functions, and NodeChatController's public management functions. NodeInterwikiController = $.createClass(NodeRoomController, { 		constructor: function (roomId) { 			NodeInterwikiController.superclass.constructor.apply(this,arguments); 			this.socket.bind('updateUser', $.proxy(this.onUpdateUser, this)); //Check 			this.bind('afterJoin', $.proxy(this.afterJoin, this)); 			this.viewUsers = new NodeChatUsers({model: this.model, el: $('body')}); 			this.viewUsers.bind('showPrivateMessage', $.proxy(this.privateMessage, this) ); 			this.viewUsers.bind('kickBan', $.proxy(this.kickBan, this) ); 			this.viewUsers.bind('giveChatMod', $.proxy(this.giveChatMod, this) ); 			this.viewUsers.bind('blockPrivateMessage', $.proxy(this.blockPrivate, this) ); //Check 			this.viewUsers.bind('allowPrivateMessage', $.proxy(this.allowPrivate, this) ); //Check 			this.viewUsers.bind('mainListClick', $.proxy(this.mainListClick, this) ); //Check 			this.viewUsers.bind('privateListClick', $.proxy(this.privateListClick, this) ); //Check this.viewUsers.bind('clickAnchor', $.proxy(this.clickAnchor, this) ); //Check this.viewUsers.render; this.viewDiscussion.show; return this; } 	});*/ 	NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{  		<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">append <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<li class="inline-alert">' <span class="sy0" style="color:rgb(51,153,51);">+ text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'</li>' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">scrollToBottom <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function FlashTitle<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( document.<span class="me1" style="color:rgb(102,0,102);">getElementsByTagName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'title' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">== window.<span class="me1" style="color:rgb(102,0,102);">titleorig <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ document.<span class="me1" style="color:rgb(102,0,102);">getElementsByTagName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'title' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">= i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'activity' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, wgSiteName<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ document.<span class="me1" style="color:rgb(102,0,102);">getElementsByTagName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'title' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">innerHTML <span class="sy0" style="color:rgb(51,153,51);">= window.<span class="me1" style="color:rgb(102,0,102);">titleorig <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function Preparse<span class="br0" style="color:rgb(0,153,0);">( input<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Parse slash commands. <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( input.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'/' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var com <span class="sy0" style="color:rgb(51,153,51);">= input.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var ref <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'.' <span class="sy0" style="color:rgb(51,153,51);">+ com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( window.<span class="me1" style="color:rgb(102,0,102);">commands <span class="br0" style="color:rgb(0,153,0);">[ com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">undefined <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} while<span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(51,102,204);">'function' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'string' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ ref <span class="sy0" style="color:rgb(51,153,51);">= ref.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">, ref.<span class="me1" style="color:rgb(102,0,102);">lastIndexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'.' <span class="sy0" style="color:rgb(51,153,51);">+ eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">continue <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'object' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) .<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">default <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'function' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) .<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">default .<span class="me1" style="color:rgb(102,0,102);">call <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">, chat<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ ref <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(51,102,204);">'.' <span class="sy0" style="color:rgb(51,153,51);">+ com<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) .<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">default <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ ref <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(51,102,204);">'.default' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'function' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">break <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} com <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">slice <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, com.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">continue <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} com <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">slice <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, com.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">call <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="sy0" style="color:rgb(51,153,51);">, com.<span class="me1" style="color:rgb(102,0,102);">join <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">, input<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} window.<span class="me1" style="color:rgb(102,0,102);">commands <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">{ <span class="st0" style="color:rgb(51,102,204);">'away' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'afk' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'afk' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#ChatHeader .User' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">hasClass <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'away' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ toggleAway<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//if you're away, hitting enter has already sent you back <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'clear' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Clear the active chat window <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">clearWindow <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'me' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Emote <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#Write [name="message"]' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'* ' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">' ' <span class="sy0" style="color:rgb(51,153,51);">+ com<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#Write [name="message"]' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'* ' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'nc' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Nobody cares $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#Write [name="message"]' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);"> <span class="sy0" style="color:rgb(51,153,51);">+ <span class="br0" style="color:rgb(0,153,0);">( com <span class="sy0" style="color:rgb(51,153,51);">? com <span class="sy0" style="color:rgb(51,153,51);">: i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'nobodycares' <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);"> <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'devoice' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//IRCpwnt $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#Write [name="message"]' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'* ChanServ set channel mode -v ' <span class="sy0" style="color:rgb(51,153,51);">+ <span class="br0" style="color:rgb(0,153,0);">( com <span class="sy0" style="color:rgb(51,153,51);">? com <span class="sy0" style="color:rgb(51,153,51);">: wgUserName<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'coppa' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Too young <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#Write [name="message"]' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'http://coppa.org ' <span class="sy0" style="color:rgb(51,153,51);">+ com<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#Write [name="message"]' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'http://coppa.org ' <span class="sy0" style="color:rgb(51,153,51);">+ i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'coppa' <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'silence' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Idle $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#Write [name="message"]' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">val <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'People idle, enjoy the silence. http://www.youtube.com/watch?v=diT3FvDHMyo' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'kick' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'kickban' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'ban' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'kickban' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'kb' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'kickban' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'kickban' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Kickban a user <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var mod <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">KickBanCommand <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ userToBan<span class="sy0" style="color:rgb(51,153,51);">: com<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( mod.<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'erruser' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'unban' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Unban a user <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ api.<span class="me1" style="color:rgb(102,0,102);">newQuery <span class="br0" style="color:rgb(0,153,0);">( POST<span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'action=userrights&user=' <span class="sy0" style="color:rgb(51,153,51);">+ com <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'&remove=bannedfromchat' <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( result<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ 					<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( result.<span class="me1" style="color:rgb(102,0,102);">userrights .<span class="me1" style="color:rgb(102,0,102);">removed <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'bannedfromchat' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'unbanned' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'notbanned' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; 				api.<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">;  			<span class="br0" style="color:rgb(0,153,0);">}  			<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'erruser' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'mod' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Make a user a mod <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var giveChatModCommand <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new models.<span class="me1" style="color:rgb(102,0,102);">GiveChatModCommand <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ userToPromote<span class="sy0" style="color:rgb(51,153,51);">: com<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">socket .<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( giveChatModCommand.<span class="me1" style="color:rgb(102,0,102);">xport <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'erruser' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'demod' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Remove a user's mod right <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ api.<span class="me1" style="color:rgb(102,0,102);">newQuery <span class="br0" style="color:rgb(0,153,0);">( POST<span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'action=userrights&user=' <span class="sy0" style="color:rgb(51,153,51);">+ com <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'&remove=chatmoderator' <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( result<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ 					<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( result.<span class="me1" style="color:rgb(102,0,102);">userrights .<span class="me1" style="color:rgb(102,0,102);">removed <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'chatmoderator' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'demodded' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'notmod' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; 				api.<span class="me1" style="color:rgb(102,0,102);">send <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">, <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">;  			<span class="br0" style="color:rgb(0,153,0);">}  			<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'erruser' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'block' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Block a user from private chatting you <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">blockPrivate <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ name<span class="sy0" style="color:rgb(51,153,51);">: com<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'erruser' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'unblock' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Unblock a user from private chatting you - should merge this into a toggle <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">allowPrivate <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">{ name<span class="sy0" style="color:rgb(51,153,51);">: com<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'erruser' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'chat' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'private' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'room' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'private' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'private' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Invoke a private room <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var arr <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in arr<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ array<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">= arr<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">removeTrailing <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} mainRoom.<span class="me1" style="color:rgb(102,0,102);">openPrivateChat <span class="br0" style="color:rgb(0,153,0);">( arr<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'erruser' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, text.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="coMULTI" style="font-style:italic;color:rgb(0,102,0);">/*'enter': 'join', 'join': function(com, text) { //Now for a command with chutzpah - join any chat on Wikia //Need to fix this so that joined rooms can be selected if(com) { var data = new models.OpenPrivateRoom({roomId: com}); mainRoom.baseOpenPrivateRoom(data, true); $('.private').before('<h1 id="Room_' + com + '" class="public wordmark" onclick="mainRoom.showRoom(' + com + ')"> ' + com + ' <span id="MsgCount_' + com + '" class="splotch">0 '); mainRoom.showRoom(com); mainRoom.chats.privates[com].init; } 			else {this.inlineAlert(i18n['errroom'].replace(/\$1/g, text.split(' ')[0]));} }, 		'leave': 'part', 'part': function(com, text) { //Leave the room you're looking at, or the room you specify if(!com) {var id = this.roomId; var chat = this;} else {var id = com; var chat = mainRoom.chats.privates[com];} $('#Room_' + id).remove; chat.socket.autoReconnect = false; chat.socket.socket.disconnect; if(!com) {mainRoom.show('main');} },*/ 		<span class="st0" style="color:rgb(51,102,204);">'roomid' <span class="sy0" style="color:rgb(51,153,51);">: <span class="st0" style="color:rgb(51,102,204);">'id' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'id' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'id' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">': ' <span class="sy0" style="color:rgb(51,153,51);">+ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">roomId <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'self' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Send a message to yourself <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ newstr <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">< com.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">switch <span class="br0" style="color:rgb(0,153,0);">( com.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( i<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">case <span class="st0" style="color:rgb(51,102,204);">'[' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( i <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'[' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var k <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">']' <span class="sy0" style="color:rgb(51,153,51);">, i<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( k <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">']' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var substr <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( i <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">2 <span class="sy0" style="color:rgb(51,153,51);">, k<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( substr.<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'|' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var link <span class="sy0" style="color:rgb(51,153,51);">= substr.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">, substr.<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'|' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var linktext <span class="sy0" style="color:rgb(51,153,51);">= substr.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( substr.<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'|' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, substr.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var link <span class="sy0" style="color:rgb(51,153,51);">= substr<span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var linktext <span class="sy0" style="color:rgb(51,153,51);">= link<span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var linkspl <span class="sy0" style="color:rgb(51,153,51);">= link.<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; link <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var j <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in linkspl<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ link <span class="sy0" style="color:rgb(51,153,51);">+= linkspl<span class="br0" style="color:rgb(0,153,0);">[ j<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'_' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} link <span class="sy0" style="color:rgb(51,153,51);">= link.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">, link.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; newstr <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(51,102,204);">'<a href="/wiki/' <span class="sy0" style="color:rgb(51,153,51);">+ link <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'">' <span class="sy0" style="color:rgb(51,153,51);">+ linktext <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'</a>' <span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">= k <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( i <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, i <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">8 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'http://' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var k <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">']' <span class="sy0" style="color:rgb(51,153,51);">, i<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var splstr <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( i <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, k<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( splstr <span class="sy0" style="color:rgb(51,153,51);">== com.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( i <span class="sy0" style="color:rgb(51,153,51);">+ <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, k<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var linktext <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'[1]' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var linktext <span class="sy0" style="color:rgb(51,153,51);">= build<span class="br0" style="color:rgb(0,153,0);">( splstr<span class="sy0" style="color:rgb(51,153,51);">, <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} newstr <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(51,102,204);">'<a href="' <span class="sy0" style="color:rgb(51,153,51);">+ splstr<span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'">' <span class="sy0" style="color:rgb(51,153,51);">+ linktext <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'</a>' <span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">= k<span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">break <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">default <span class="sy0" style="color:rgb(51,153,51);">: newstr <span class="sy0" style="color:rgb(51,153,51);">+= com.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( i<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">break <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">append <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<li><img class="avatar" src="' <span class="sy0" style="color:rgb(51,153,51);">+ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#ChatHeader .User img' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">attr <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'src' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'"> ' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">' (' <span class="sy0" style="color:rgb(51,153,51);">+ i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'self' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">') ' <span class="sy0" style="color:rgb(51,153,51);">+ newstr <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">' </li>' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">append <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<li><img class="avatar" src="' <span class="sy0" style="color:rgb(51,153,51);">+ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#ChatHeader .User img' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">attr <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'src' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'"> ' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">' (' <span class="sy0" style="color:rgb(51,153,51);">+ i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'self' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">') </li>' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">scrollToBottom <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'help' <span class="sy0" style="color:rgb(51,153,51);">: <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( com<span class="sy0" style="color:rgb(51,153,51);">, text<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( com<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var ref <span class="sy0" style="color:rgb(51,153,51);">= com.<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">/ <span class="sy0" style="color:rgb(51,153,51);">/ g<span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'.' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var str <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var subcoms <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var subdirs <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; while<span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands.' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'string' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ ref.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">, ref.<span class="me1" style="color:rgb(102,0,102);">lastIndexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'.' <span class="sy0" style="color:rgb(51,153,51);">+ eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">toLowerCase <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var command <span class="sy0" style="color:rgb(51,153,51);">= eval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'window.commands.' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'help-' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ str <span class="sy0" style="color:rgb(51,153,51);">+= i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'help' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, ref.<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\./g <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$2/g <span class="sy0" style="color:rgb(51,153,51);">, i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'help-' <span class="sy0" style="color:rgb(51,153,51);">+ ref<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'example' <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'exampleuser' <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof command <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'object' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in command<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof command<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'function' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ subcoms.<span class="me1" style="color:rgb(102,0,102);">push <span class="br0" style="color:rgb(0,153,0);">( i<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof command<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'object' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ subdirs.<span class="me1" style="color:rgb(102,0,102);">push <span class="br0" style="color:rgb(0,153,0);">( i<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( subcoms.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">> <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ str <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="sy0" style="color:rgb(51,153,51);">+ i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'subcoms' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">': ' <span class="sy0" style="color:rgb(51,153,51);">+ subcoms.<span class="me1" style="color:rgb(102,0,102);">join <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">', ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( subdirs.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">> <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ str <span class="sy0" style="color:rgb(51,153,51);">+= <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="sy0" style="color:rgb(51,153,51);">+ i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'subdirs' <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">': ' <span class="sy0" style="color:rgb(51,153,51);">+ subdirs.<span class="me1" style="color:rgb(102,0,102);">join <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">', ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} str <span class="sy0" style="color:rgb(51,153,51);">= str.<span class="me1" style="color:rgb(102,0,102);">removeTrailing <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( str <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(51,102,204);">'' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( str<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'nohelp' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, command<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var str <span class="sy0" style="color:rgb(51,153,51);">= <span class="br0" style="color:rgb(0,153,0);">[ <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">in window.<span class="me1" style="color:rgb(102,0,102);">commands <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof window.<span class="me1" style="color:rgb(102,0,102);">commands <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'function' <span class="sy0" style="color:rgb(51,153,51);">|| <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">typeof window.<span class="me1" style="color:rgb(102,0,102);">commands <span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">'object' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ str.<span class="me1" style="color:rgb(102,0,102);">push <span class="br0" style="color:rgb(0,153,0);">( i<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'commands' <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">replace <span class="br0" style="color:rgb(0,153,0);">( <span class="co2" style="font-style:italic;color:rgb(0,153,102);">/\$1/g <span class="sy0" style="color:rgb(51,153,51);">, str.<span class="me1" style="color:rgb(102,0,102);">join <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">', ' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Parser helping function - takes an array of text created with .split(' '), <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//and an index number for where to start, then rebuilds the string. <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Can also accept an index value for where to stop. <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function build<span class="br0" style="color:rgb(0,153,0);">( text<span class="sy0" style="color:rgb(51,153,51);">, index<span class="sy0" style="color:rgb(51,153,51);">, stop<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var newtext <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( stop <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">undefined <span class="sy0" style="color:rgb(51,153,51);">|| stop <span class="sy0" style="color:rgb(51,153,51);">== <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ stop <span class="sy0" style="color:rgb(51,153,51);">= text.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( stop <span class="sy0" style="color:rgb(51,153,51);">< <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ stop <span class="sy0" style="color:rgb(51,153,51);">+= text.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( index <span class="sy0" style="color:rgb(51,153,51);">== stop <span class="sy0" style="color:rgb(51,153,51);">|| index <span class="sy0" style="color:rgb(51,153,51);">== text.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return text<span class="br0" style="color:rgb(0,153,0);">[ index<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="sy0" style="color:rgb(51,153,51);">= index<span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">< stop<span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ newtext <span class="sy0" style="color:rgb(51,153,51);">+= text<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">' ' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return newtext<span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function toggleAway<span class="br0" style="color:rgb(0,153,0);">( msg<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! msg<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var msg <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#ChatHeader .User' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">hasClass <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'away' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ mainRoom.<span class="me1" style="color:rgb(102,0,102);">setBack <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ mainRoom.<span class="me1" style="color:rgb(102,0,102);">setAway <span class="br0" style="color:rgb(0,153,0);">( msg<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} toggleAway.<span class="me1" style="color:rgb(102,0,102);">back <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Force back status <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#ChatHeader .User' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">hasClass <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'away' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">true <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ mainRoom.<span class="me1" style="color:rgb(102,0,102);">setBack <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} toggleAway.<span class="me1" style="color:rgb(102,0,102);">away <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( msg<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Force away status <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! msg<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var msg <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">'' <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'#ChatHeader .User' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">hasClass <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'away' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">false <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ mainRoom.<span class="me1" style="color:rgb(102,0,102);">setAway <span class="br0" style="color:rgb(0,153,0);">( msg<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} NodeChatController.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">clearWindow <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">viewDiscussion .<span class="me1" style="color:rgb(102,0,102);">chatUL .<span class="me1" style="color:rgb(102,0,102);">html <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this .<span class="me1" style="color:rgb(102,0,102);">inlineAlert <span class="br0" style="color:rgb(0,153,0);">( i18n<span class="br0" style="color:rgb(0,153,0);">[ <span class="st0" style="color:rgb(51,102,204);">'cleared' <span class="br0" style="color:rgb(0,153,0);">] <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function active<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Returns the NodeChatController for the active window <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( mainRoom.<span class="me1" style="color:rgb(102,0,102);">activeRoom <span class="sy0" style="color:rgb(51,153,51);">&& mainRoom.<span class="me1" style="color:rgb(102,0,102);">activeRoom <span class="sy0" style="color:rgb(51,153,51);">!= <span class="st0" style="color:rgb(51,102,204);">'main' <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return mainRoom.<span class="me1" style="color:rgb(102,0,102);">chats .<span class="me1" style="color:rgb(102,0,102);">privates <span class="br0" style="color:rgb(0,153,0);">[ mainRoom.<span class="me1" style="color:rgb(102,0,102);">activeRoom <span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return mainRoom<span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} String.<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">prototype .<span class="me1" style="color:rgb(102,0,102);">removeTrailing <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="kw5" style="color:rgb(255,0,0);">char <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Remove extraneous characters <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var str <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">this <span class="sy0" style="color:rgb(51,153,51);">; while<span class="br0" style="color:rgb(0,153,0);">( str.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw5" style="color:rgb(255,0,0);">char <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ str <span class="sy0" style="color:rgb(51,153,51);">= str.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, str.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} while<span class="br0" style="color:rgb(0,153,0);">( str.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( str.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="kw5" style="color:rgb(255,0,0);">char <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ str <span class="sy0" style="color:rgb(51,153,51);">= str.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">, str.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return str<span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function createCookie<span class="br0" style="color:rgb(0,153,0);">( name<span class="sy0" style="color:rgb(51,153,51);">, value<span class="sy0" style="color:rgb(51,153,51);">, days<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( days<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var date <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">new Date<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; date.<span class="me1" style="color:rgb(102,0,102);">setTime <span class="br0" style="color:rgb(0,153,0);">( date.<span class="me1" style="color:rgb(102,0,102);">getTime <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="br0" style="color:rgb(0,153,0);">( days<span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(204,0,0);">24 <span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(204,0,0);">60 <span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(204,0,0);">60 <span class="sy0" style="color:rgb(51,153,51);">* <span class="nu0" style="color:rgb(204,0,0);">1000 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var expires <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">"; expires=" <span class="sy0" style="color:rgb(51,153,51);">+ date.<span class="me1" style="color:rgb(102,0,102);">toGMTString <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var expires <span class="sy0" style="color:rgb(51,153,51);">= <span class="st0" style="color:rgb(51,102,204);">"" <span class="sy0" style="color:rgb(51,153,51);">; document.<span class="me1" style="color:rgb(102,0,102);">cookie <span class="sy0" style="color:rgb(51,153,51);">= name<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">"=" <span class="sy0" style="color:rgb(51,153,51);">+ value<span class="sy0" style="color:rgb(51,153,51);">+ expires<span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">"; path=/" <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function readCookie<span class="br0" style="color:rgb(0,153,0);">( name<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var nameEQ <span class="sy0" style="color:rgb(51,153,51);">= name <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">"=" <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var ca <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(102,0,102);">cookie .<span class="me1" style="color:rgb(102,0,102);">split <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">';' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i<span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">< ca.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var c <span class="sy0" style="color:rgb(51,153,51);">= ca<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] <span class="sy0" style="color:rgb(51,153,51);">; while <span class="br0" style="color:rgb(0,153,0);">( c.<span class="me1" style="color:rgb(102,0,102);">charAt <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) c <span class="sy0" style="color:rgb(51,153,51);">= c.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( <span class="nu0" style="color:rgb(204,0,0);">1 <span class="sy0" style="color:rgb(51,153,51);">, c.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( c.<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( nameEQ<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">== <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return c.<span class="me1" style="color:rgb(102,0,102);">substring <span class="br0" style="color:rgb(0,153,0);">( nameEQ.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">, c.<span class="me1" style="color:rgb(102,0,102);">length <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return <span class="kw2" style="font-weight:bold;color:rgb(0,51,102);">null <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} $<span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ 		<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( <span class="sy0" style="color:rgb(51,153,51);">! importScriptURI<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function importScriptURI<span class="br0" style="color:rgb(0,153,0);">( a<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var b<span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(102,0,102);">createElement <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">"script" <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; b.<span class="me1" style="color:rgb(102,0,102);">setAttribute <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">"src" <span class="sy0" style="color:rgb(51,153,51);">, a<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; b.<span class="me1" style="color:rgb(102,0,102);">setAttribute <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">"type" <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">"text/javascript" <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; document.<span class="me1" style="color:rgb(102,0,102);">getElementsByTagName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">"head" <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">[ <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">appendChild <span class="br0" style="color:rgb(0,153,0);">( b<span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">return b<span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} importScriptURI<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'http://c.wikia.com/index.php?title=User:Monchoman45/ChatHacks.js/i18n.js&action=raw&ctype=text/javascript' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; importScriptURI<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'http://monchbox.wikia.com/index.php?title=MediaWiki:APIQuery.js&action=raw&ctype=text/javascript' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//APIQuery for /unban $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'head' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">append <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<style type="text/css"><span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n .stafficon {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t margin-bottom:-4px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t width:14px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t height:14px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n .modicon {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t margin-bottom:-3px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t width:14px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t height:14px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n .UserStatsMenu {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t color:#000;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n .Write [name="message"] {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t width:93%;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n .inline-alert span {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t color:#006CB0;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t cursor:pointer;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n .inline-alert span:hover {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t text-decoration:underline;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n #pingspan {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t position:absolute;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t z-index:5;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t top:23px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t margin-left:15px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t font-size:15px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t font-weight:normal;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t line-height:15px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n #pings {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t resize:none;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t margin-left:0;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t font-size:12px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t height:100px;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t display:block;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n #pingspan div span {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t font-size:55%;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n #ChatHeader {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t z-index:9999;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n #ChatHeader {<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n <span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\t z-index:9999;<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n }<span class="es0" style="font-weight:bold;color:rgb(0,0,153);">\n ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Unbind all of the window listeners that set your status to back $<span class="br0" style="color:rgb(0,153,0);">( window<span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">unbind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'mousemove' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">unbind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'focus' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">unbind <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'keypress' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="co1" style="font-style:italic;color:rgb(0,102,0);">//Add the sound space $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'body' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">append <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">' ' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">}  <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">else <span class="br0" style="color:rgb(0,153,0);">{  	$<span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var a <span class="sy0" style="color:rgb(51,153,51);">= document.<span class="me1" style="color:rgb(102,0,102);">getElementsByTagName <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'a' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">for <span class="br0" style="color:rgb(0,153,0);">( <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">var i <span class="sy0" style="color:rgb(51,153,51);">= <span class="nu0" style="color:rgb(204,0,0);">0 <span class="sy0" style="color:rgb(51,153,51);">; i <span class="sy0" style="color:rgb(51,153,51);">< a.<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">; i<span class="sy0" style="color:rgb(51,153,51);">++ <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( a<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">href <span class="sy0" style="color:rgb(51,153,51);">&& a<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">href .<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'/wiki/Special:Chat' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ a<span class="br0" style="color:rgb(0,153,0);">[ i<span class="br0" style="color:rgb(0,153,0);">] .<span class="me1" style="color:rgb(102,0,102);">onclick <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( event<span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ event.<span class="me1" style="color:rgb(102,0,102);">preventDefault <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; OpenChatWindow<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( document.<span class="me1" style="color:rgb(102,0,102);">body .<span class="me1" style="color:rgb(102,0,102);">className .<span class="me1" style="color:rgb(102,0,102);">indexOf <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'skin-oasis' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">!= <span class="sy0" style="color:rgb(51,153,51);">- <span class="nu0" style="color:rgb(204,0,0);">1 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(102,0,102);">chatcheck <span class="sy0" style="color:rgb(51,153,51);">= setInterval<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'ChatCheck' <span class="sy0" style="color:rgb(51,153,51);">, <span class="nu0" style="color:rgb(204,0,0);">200 <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; 	<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function ChatCheck<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{  		<span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">if <span class="br0" style="color:rgb(0,153,0);">( $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.chat-join button' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">length <span class="sy0" style="color:rgb(51,153,51);">!= <span class="nu0" style="color:rgb(204,0,0);">0 <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.chat-join button' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">replaceWith <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'<a class="wikia-button" onclick="OpenChatWindow">' <span class="sy0" style="color:rgb(51,153,51);">+ $<span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'.chat-join button' <span class="br0" style="color:rgb(0,153,0);">) .<span class="me1" style="color:rgb(102,0,102);">html <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'</a>' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; clearInterval<span class="br0" style="color:rgb(0,153,0);">( window.<span class="me1" style="color:rgb(102,0,102);">chatcheck <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; <span class="br0" style="color:rgb(0,153,0);">} <span class="br0" style="color:rgb(0,153,0);">} <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function OpenChatWindow<span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(102,0,102);">chatwindow <span class="sy0" style="color:rgb(51,153,51);">= window.<span class="me1" style="color:rgb(102,0,102);">open <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'/wiki/Special:Chat?useskin=wikia' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'chat' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; window.<span class="me1" style="color:rgb(102,0,102);">chatwindow .<span class="me1" style="color:rgb(102,0,102);">onload <span class="sy0" style="color:rgb(51,153,51);">= <span class="kw1" style="font-weight:bold;color:rgb(0,0,102);">function <span class="br0" style="color:rgb(0,153,0);">( <span class="br0" style="color:rgb(0,153,0);">) <span class="br0" style="color:rgb(0,153,0);">{ window.<span class="me1" style="color:rgb(102,0,102);">chatwindow .<span class="me1" style="color:rgb(102,0,102);">importScriptPage <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'User:' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'/global.js' <span class="sy0" style="color:rgb(51,153,51);">, <span class="st0" style="color:rgb(51,102,204);">'c' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">; window.<span class="me1" style="color:rgb(102,0,102);">chatwindow .<span class="me1" style="color:rgb(102,0,102);">importScript <span class="br0" style="color:rgb(0,153,0);">( <span class="st0" style="color:rgb(51,102,204);">'User:' <span class="sy0" style="color:rgb(51,153,51);">+ wgUserName <span class="sy0" style="color:rgb(51,153,51);">+ <span class="st0" style="color:rgb(51,102,204);">'/wikia.js' <span class="br0" style="color:rgb(0,153,0);">) <span class="sy0" style="color:rgb(51,153,51);">;