Skip to content

Commit 433b35b

Browse files
committed
add some junk that I have lying around
1 parent 052bcfe commit 433b35b

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

cleanup.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
include 'cb_functions.php';
4+
5+
$users = get_db();
6+
7+
print_r($users['grawity']);
8+
9+
foreach ($users as $nick => &$data) {
10+
$keys = array_keys($data["log"]);
11+
foreach ($keys as $k) {
12+
$n = preg_replace('/ [+-][0-9]+$/', '', $k);
13+
$data["log"][$n] = $data["log"][$k];
14+
unset($data["log"][$k]);
15+
}
16+
}
17+
18+
save_db();

mangle.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
$arg = $argv[1];
5+
6+
$db = unserialize(file_get_contents("users.db"));
7+
8+
eval("global \$db; $arg");
9+
10+
file_put_contents("users.db", serialize($db));

points_server.xinetd

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
service cluebot
2+
{
3+
flags = IPv6
4+
type = UNLISTED
5+
socket_type = stream
6+
port = 58945
7+
wait = no
8+
user = grawity
9+
server = /home/grawity/lib/davinci/points_server.php
10+
}

0 commit comments

Comments
 (0)