User:AnomieBOT/source/tasks/SandboxCleaner.pm: Difference between revisions

Content deleted Content added
Changed from invalid mbox "type=custom", to red "type=delete", since it got reported into the mbox error log. No change in appearance.
AnomieBOT (talk | contribs)
Updating published sources: General: * Update for the addition of 'rvslots'. DatedCategoryDeleterTest: * Disable. It's clear that task won't be needed. BrokenRedirectDeleter: * Handle pages with newlines before the <code>#REDIRECT</code>.
 
(9 intermediate revisions by 3 users not shown)
Line 1:
{{ombox|type=content| text = Credit to [[User:SoxBot IV/Source|SoxBot IV]] for a bit of inspiration on the code.}}
{{ombox
{{ombox|type=content|style=border:1px solid #b22222|image=[[Image:Ambox warning pn.svg|40px]]|text= Not approved.}}
| type = content
<sourcesyntaxhighlight lang="perl">
| text = Credit to [[User:SoxBot IV/Source|SoxBot IV]] for a bit of inspiration on the code.
}}
{{ombox
| type = delete
| style = border: 1px solid #b22222;
| image = [[Image:Ambox warning pn.svg|40px]]
| text = Not approved.
}}
 
<source lang="perl">
package tasks::SandboxCleaner;
 
Line 17 ⟶ 8:
=begin metadata
 
Bot: AnomieBOT
Task: SandboxCleaner
BRFA: None
Status: On hold
Rate: Max 1 edit per hour per sandbox
Created: 2008-08-30
 
Clears a sandbox page to predefined content once every 12 hours (at or shortly
Line 105 ⟶ 97:
 
sub approved {
return 10;
}
 
Line 193 ⟶ 185:
next;
}
my $intxt=$tok->{'revisions'}[0]{'slots'}{'main'}{'*'};
 
# Generate new page content
Line 239 ⟶ 231:
1;
 
</syntaxhighlight>
</source>