Commit 21a56423 authored by Simon Welsh's avatar Simon Welsh

Moves swears into their own file

git-svn-id: svn+ssh://lsgn/var/logbot-www@83 5f99df0c-6b0a-442a-b40a-040688e84a9d
parent a79efed1
......@@ -102,32 +102,7 @@ function get_stats() {
function build_stats(Redis $r) {
// SELECT COUNT(*) AS "Bitches", "Nick" FROM "Log" WHERE "Text" ILIKE '%cunt%' GROUP BY "Nick" ORDER BY "Bitches" DESC;
$stats = [];
$swears = [
'Bitch',
'Cunt',
'Fuck',
'Shit',
'Joomla',
'WordPress',
'Dick',
'Slut',
'Crap',
'Synergy',
'Drupal',
'Bastard',
'Firefox',
'Chrome',
'Safari',
'Opera',
'Gecko',
'WebKit',
'Trident',
'Blink',
'Presto',
'ffs',
'wtf',
'Penis',
];
$swears = array_filter(array_map('trim', file(__DIR__ . '/swears.txt')));
natcasesort($swears);
$query = 'SELECT COUNT(*) AS "Number", "Nick" FROM "Log" WHERE "Text" ILIKE \'%%%s%%\' GROUP BY "Nick" ORDER BY "Number" DESC LIMIT 50;';
foreach($swears as $name) {
......
Bitch
Cunt
Fuck
Shit
Joomla
WordPress
Dick
Slut
Crap
Synergy
Drupal
Bastard
Firefox
Chrome
Safari
Opera
Gecko
WebKit
Trident
Blink
Presto
ffs
wtf
Penis
subsites
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment