 local pu800 returns theu800 permission required tou800 perform au800 given action onu800 au800 given title. ifu800 nou800 title isu800 specified theu800 title ofu800 theu800 page being displayed isu800 used. u8db8cu8daa9 u8d8a8u8d8aeu8d8b4 u8d8a7u8d8b2 u8d8a7u8db8cu8d986 u8d9beu8d988u8d8afu8d985u8d8a7u8d986 u8d8a8u8d8b1u8d8a7u8db8c u8d987u8d985u8d8a7u8d987u8d986u8daafu8db8c u8d8a8u8d8a7 u8d988u8d8b6u8d8b9u8db8cu8d8aa u8d8adu8d981u8d8a7u8d8b8u8d8aau8db8c u8d988u8db8cu8daa9u8db8cu8e2808cu8d9beu8d8afu8db8cu8d8a7u8db8c u8d981u8d8a7u8d8b1u8d8b3u8db8c u8d8aau8d8bau8db8cu8db8cu8d8b1 u8daa9u8d8b1u8d8afu8d987u8e2808cu8d8a7u8d8b3u8d8aa. u8d8a7u8daafu8d8b1 u8d985u8db8cu8e2808cu8d8aeu8d988u8d8a7u8d987u8db8cu8d8af u8d9beu8d988u8d8afu8d985u8d8a7u8d986 u8d8b1u8d8a7 u8d8a8u8d987u8e2808cu8d8b1u8d988u8d8b2 u8daa9u8d986u8db8cu8d8afu8d88c u8d8afu8d982u8d8aa u8d8afu8d8a7u8d8b4u8d8aau8d987 u8d8a8u8d8a7u8d8b4u8db8cu8d8af u8daa9u8d987 u8d8a7u8d8b3u8d8aau8d8abu8d986u8d8a7u8db8c u8d981u8d8b6u8d8a7u8db8c u8d986u8d8a7u8d985 u8d8a7u8d984u8daafu8d988 u8d988 u8d9beu8d988u8d8afu8d985u8d8a7u8d986 u8d8b1u8d8a7u8d985u8d8b4u8d8aeu8d8b5 u8daa9u8d986u8db8cu8d8af . u8d8aau8d988u8d8b6u8db8cu8d8adu8d8a7u8d8aa u8d8a8u8db8cu8d8b4u8d8aau8d8b1 u8d8afu8d8b1 u8d8b2u8db8cu8d8b1u8d8b5u8d981u8d8adu8d987 u8d8aau8d988u8d8b6u8db8cu8d8adu8d8a7u8d8aa u8d9beu8d988u8d8afu8d985u8d8a7u8d986 u8d985u8d988u8d8acu8d988u8d8af u8d8a7u8d8b3u8d8aa. function pu800u82e_main action pagename local title ifu800 type pagename 'table' andu800 pagenameu82eprefixedtext then title pagename elseif pagename then title mwu800u82etitleu82enewu800 pagename else title mwu800u82etitleu82egetcurrenttitle endu800 pagename titleu82eprefixedtext ifu800 action 'autoreview' then local level mwu800u82eextu800u82eflaggedrevsu82egetstabilitysettings title level level andu800 levelu82eautoreview ifu800 level 'review' then return 'reviewer' elseif level   then return level else return nilu800 notu800 '*'. au800 page notu800 being pcu800 protected isu800 distinct from itu800 being pcu800 protected with anyone able tou800 review. also notu800   asu800 that would mean pcu800 protected butu800 nobody canu800 review endu800 elseif action 'edit' andu800 action 'move' andu800 action 'create' andu800 action 'upload' andu800 action 'undelete' then error 'u8d986u8d8aeu8d8b3u8d8aau8db8cu8d986 u8d9beu8d8a7u8d8b1u8d8a7u8d985u8d8aau8d8b1 u8d8a8u8d8a7u8db8cu8d8af u8db8cu8daa9u8db8c u8d8a7u8d8b2 editu8d88c moveu8d88c createu8d88c uploadu8d88c undeleteu8d88c autoreview u8d8a8u8d8a7u8d8b4u8d8af' 2u800 endu800 ifu800 titleu82enamespace 8u800 then mediawiki namespace ifu800 mwu800u82eustringu82esubu800 titleu82etext 3u800 '.jsu800 oru800 mwu800u82eustringu82esubu800 titleu82etext 4u800 '.cssu800 oru800 titleu82econtentmodel 'javascript' oru800 titleu82econtentmodel 'cssu800 then site jsu800 oru800 cssu800 page return 'interfaceadmin' else anyu800 nonu800 jsu800 cssu800 mediawiki page return 'sysop' endu800 elseif titleu82enamespace 2u800 andu800 titleu82eissubpage then ifu800 titleu82econtentmodel 'javascript' oru800 titleu82econtentmodel 'cssu800 then user jsu800 oru800 cssu800 page return 'interfaceadmin' elseif titleu82econtentmodel 'json' then user json page return 'sysop' endu800 endu800 ifu800 action 'undelete' then return 'sysop' endu800 local level titleu82eprotectionlevels action andu800 titleu82eprotectionlevels action 1u800 ifu800 level 'sysop' oru800 level 'editprotected' then ifu800 titleu82enamespace 10u800 oru800 titleu82enamespace 828u800 then return 'templateeditor' else return 'sysop' endu800 elseif titleu82ecascadingprotectionu82erestrictions action andu800 titleu82ecascadingprotectionu82erestrictions action 1u800 then used byu800 au800 cascading protected page return 'sysop' elseif level 'templateeditor' then return 'templateeditor' elseif action 'move' then local blacklistentry mwu800u82eextu800u82etitleblacklistu82etest 'edit' pagename testing action edit isu800 correct since this isu800 foru800 theu800 source page. theu800 target page name gets tested with action move. ifu800 blacklistentry andu800 notu800 blacklistentryu82eparamsu82eautoconfirmed then return 'templateeditor' elseif titleu82enamespace 6u800 then return 'filemover' elseif level 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' endu800 endu800 local blacklistentry mwu800u82eextu800u82etitleblacklistu82etest action pagename ifu800 blacklistentry then ifu800 notu800 blacklistentryu82eparamsu82eautoconfirmed then return 'templateeditor' elseif level 'extendedconfirmed' then return 'extendedconfirmed' else return 'autoconfirmed' endu800 elseif level 'editsemiprotected' then create semiprotected pages return this foru800 some reason return 'autoconfirmed' elseif level then return level elseif action 'upload' then return 'autoconfirmed' elseif action 'create' andu800 titleu82enamespace 2u800 0u800 andu800 titleu82enamespace 118u800 then youu800 need tou800 beu800 registered butu800 notu800 autoconfirmed tou800 create nonu800 talk pages other than drafts ifu800 titleu82enamespace 0u800 then return 'autoconfirmed' peru800 wpu800 acperm youu800 need tou800 beu800 autoconfirmed tou800 create pages inu800 mainspace endu800 return 'user' else return '*' endu800 endu800 setmetatable pu800 __index function tu800 ku800 return function frame return tu800u82e_main ku800 frameu82eargs 1u800 endu800 endu800 return pu800 