summaryrefslogtreecommitdiffstats
path: root/Reaktor/commands
diff options
context:
space:
mode:
Diffstat (limited to 'Reaktor/commands')
-rwxr-xr-xReaktor/commands/badcommand1
-rwxr-xr-xReaktor/commands/caps13
-rwxr-xr-xReaktor/commands/hello2
-rwxr-xr-xReaktor/commands/identify22
-rwxr-xr-xReaktor/commands/licht_resolver37
-rwxr-xr-xReaktor/commands/nag68
-rwxr-xr-xReaktor/commands/reload2
-rwxr-xr-xReaktor/commands/respond2
-rwxr-xr-xReaktor/commands/rev2
l---------Reaktor/commands/revip1
-rwxr-xr-xReaktor/commands/say2
l---------Reaktor/commands/subdomains1
-rwxr-xr-xReaktor/commands/taken28
-rwxr-xr-xReaktor/commands/tell-on_join19
-rwxr-xr-xReaktor/commands/tell-on_privmsg17
-rwxr-xr-xReaktor/commands/uptime8
l---------Reaktor/commands/visit-page1
-rwxr-xr-xReaktor/commands/whatweb17
-rwxr-xr-xReaktor/commands/whois4
19 files changed, 0 insertions, 247 deletions
diff --git a/Reaktor/commands/badcommand b/Reaktor/commands/badcommand
deleted file mode 100755
index c59b4d1c..00000000
--- a/Reaktor/commands/badcommand
+++ /dev/null
@@ -1 +0,0 @@
-#? //retard
diff --git a/Reaktor/commands/caps b/Reaktor/commands/caps
deleted file mode 100755
index ac8cc66d..00000000
--- a/Reaktor/commands/caps
+++ /dev/null
@@ -1,13 +0,0 @@
-#! /usr/bin/env python3
-import imp
-import os
-
-def load_config(filename):
- dirname = os.path.dirname(filename)
- modname, ext = os.path.splitext(os.path.basename(filename))
- file, pathname, description = imp.find_module(modname, [ dirname ])
- return imp.load_module(modname, file, pathname, description)
-
-config = load_config(os.environ['config_filename'])
-print('Private: '+' '.join(filter(None,[ x.get('capname',None) for x in config.commands])))
-print('Public: '+' '.join(filter(None,[ x.get('capname',None) for x in config.public_commands])))
diff --git a/Reaktor/commands/hello b/Reaktor/commands/hello
deleted file mode 100755
index 05ed79b5..00000000
--- a/Reaktor/commands/hello
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-echo "Hello${*+, $*}!"
diff --git a/Reaktor/commands/identify b/Reaktor/commands/identify
deleted file mode 100755
index c2fb2c58..00000000
--- a/Reaktor/commands/identify
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/env python
-import imp
-import os,sys
-
-def load_config(filename):
- dirname = os.path.dirname(filename)
- modname, ext = os.path.splitext(os.path.basename(filename))
- file, pathname, description = imp.find_module(modname, [ dirname ])
- return imp.load_module(modname, file, pathname, description)
-
-config = load_config(os.environ['config_filename'])
-
-with open(config.admin_file) as f:
- for line in f:
- nick,secret = line.split()
- if sys.argv[1] == secret:
- print("identified you as %s!"%nick)
- with open(config.auth_file,'a+') as g:
- g.write(os.environ['_prefix'] +"\n")
- sys.exit(0)
-
-print("unable to identify you, sorry")
diff --git a/Reaktor/commands/licht_resolver b/Reaktor/commands/licht_resolver
deleted file mode 100755
index 5bdb6510..00000000
--- a/Reaktor/commands/licht_resolver
+++ /dev/null
@@ -1,37 +0,0 @@
-#! /usr/bin/python
-# -*- coding: utf-8 -*-
-
-map = {
- 'shackspace': {
- 'device': {
- 0: 'Licht0, Zickenzone; Fenster',
- 1: 'Licht1, Sofaecke; Fenster',
- 2: 'Licht2, Zickenzone; Ghetto',
- 3: 'Licht3, Sofaecke; Ghetto',
- 4: 'Licht4, Richtung Getränkelager',
- 5: 'Licht5, Porschekonsole',
- 6: 'Licht6, Tomatenecke',
- 7: 'Licht7, Ghetto',
- 10: 'Hauptschalter'
- },
- 'state': {
- 0: 'aus',
- 1: 'an',
- 2: 'aus in T-10s'
- },
- '->': 'ist'
- }
-}
-
-from struct import unpack
-import json
-from os import environ as env
-
-location = "shackspace"
-
-map = map[location]
-print (env["payload"]+"")
-did, sid= unpack('BB', json.loads(env['payload']))
-device,state = map['device'][did], map['state'][sid]
-arrow = map['->']
-print ' '.join([device, arrow, state])
diff --git a/Reaktor/commands/nag b/Reaktor/commands/nag
deleted file mode 100755
index f2141392..00000000
--- a/Reaktor/commands/nag
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/sh
-set -euf
-if test -e nag.hosts.ls; then
- echo "nag seems to run already... if not, then delete $workdir/nag.*, please"
- exit 23
-fi
-
-trap 'rm -f nag.hosts.ls nag.services.ls nag.patch' EXIT INT QUIT
-
-
-# usage: git_pull_output_filter REPO_NAME
-git_pull_output_filter() {
- sed -n 's/^ [0-9]\+ file change/'"$1"': &/p'
-}
-
-
-if ! test -d nag.hosts; then
- git clone "$hosts_repo" nag.hosts
-else
- (cd nag.hosts && git pull) | git_pull_output_filter hosts
-fi
-
-if ! test -d nag.services; then
- git clone "$services_repo" nag.services
-else
- (cd nag.services && git pull) | git_pull_output_filter services
-fi
-
-
-(cd nag.hosts && ls | sort) > nag.hosts.ls
-(cd nag.services && ls | sort) > nag.services.ls
-
-diff -u nag.hosts.ls nag.services.ls > nag.patch || :
-
-missing_services=$(sed -n '1d;2d;s/^-\(.*\)/\1/p' nag.patch | tr '\n' ' ')
-obsolete_services=$(sed -n '1d;2d;s/^+\(.*\)/\1/p' nag.patch | tr '\n' ' ')
-
-if test "${inspect_services-false}" = true; then
- missing_owners=$(set +f; cd nag.services && grep '^owner:$' * | cut -d: -f1)
- missing_mailtos=$(set +f; cd nag.services && grep '^mailto:$' * | cut -d: -f1)
-fi
-
-nag_missing_services='missing services'
-nag_obsolete_services='obsolete services'
-nag_missing_owners='services with missing owner entry'
-nag_missing_mailtos='services with missing mailto entry'
-
-#
-# output
-#
-did_nag=false
-for i in \
- missing_services \
- obsolete_services \
- missing_owners \
- missing_mailtos
-do
- eval "offenders=\${$i-}; nag_msg=\$nag_$i"
- if test -n "$offenders"; then
- echo $nag_msg: $offenders
- did_nag=true
- fi
-done
-
-# if asked directly, answer if there is nothing to nag about
-if test $did_nag = false -a -n "${_from:-}";then
- echo "nothing to nag about"
-fi
diff --git a/Reaktor/commands/reload b/Reaktor/commands/reload
deleted file mode 100755
index bfa1f041..00000000
--- a/Reaktor/commands/reload
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-exec pkill -U reaktor
diff --git a/Reaktor/commands/respond b/Reaktor/commands/respond
deleted file mode 100755
index e23dc3ef..00000000
--- a/Reaktor/commands/respond
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-printf '%s\n' "${_from}: $*"
diff --git a/Reaktor/commands/rev b/Reaktor/commands/rev
deleted file mode 100755
index a8681ab9..00000000
--- a/Reaktor/commands/rev
+++ /dev/null
@@ -1,2 +0,0 @@
-#! /bin/sh
-git log -1 --format="%h by %an, %ar"
diff --git a/Reaktor/commands/revip b/Reaktor/commands/revip
deleted file mode 120000
index e2c3b7ab..00000000
--- a/Reaktor/commands/revip
+++ /dev/null
@@ -1 +0,0 @@
-../repos/revip/revip \ No newline at end of file
diff --git a/Reaktor/commands/say b/Reaktor/commands/say
deleted file mode 100755
index 8b83c056..00000000
--- a/Reaktor/commands/say
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-printf '%s\n' "$*"
diff --git a/Reaktor/commands/subdomains b/Reaktor/commands/subdomains
deleted file mode 120000
index 0489555f..00000000
--- a/Reaktor/commands/subdomains
+++ /dev/null
@@ -1 +0,0 @@
-../repos/consolidate_dns/index \ No newline at end of file
diff --git a/Reaktor/commands/taken b/Reaktor/commands/taken
deleted file mode 100755
index b8beba68..00000000
--- a/Reaktor/commands/taken
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-#!/bin/bash
-
-# domainavailable
-# Fast, domain name checker to use from the shell
-# Use globs for real fun:
-# domainavailable blah{1..3}.{com,net,org,co.uk}
-# Inspired by foca / giles:
-# http://gilesbowkett.blogspot.com/2009/02/simple-bash-domain-availability.html
-
-for d in $@;
-do
-if host "$d" | grep "NXDOMAIN" >&/dev/null; then
- w=$(whois "$d")
- if ! test "$?" -eq 0 ;then
- echo "$d - whois not available"
- elif echo "$w" | grep -Ei "(No match|NOT FOUND|Status: free)" >&/dev/null; then
- echo "$d available";
- elif echo "$w"| grep -Ei "(Status: invalid)" >&/dev/null ;then
- echo "$d invalid"
- else
- echo "$d taken";
- fi
-else
- echo "$d taken";
-fi
-done
-exit 0
diff --git a/Reaktor/commands/tell-on_join b/Reaktor/commands/tell-on_join
deleted file mode 100755
index 2dbff41a..00000000
--- a/Reaktor/commands/tell-on_join
+++ /dev/null
@@ -1,19 +0,0 @@
-#! /bin/sh
-set -euf
-
-# require flock from util-linux
-if test "${FLOCK-}" != "$state_file"; then
- exec env FLOCK="$state_file" flock "$state_file" "$0" "$@"
-fi
-
-to="$_from"
-
-# print messages
-sed -n '/^'"$to"' /{
- s/^\([^ ]\+\) \([^ ]\+\) <\([^>]\+\)> \(.*\)/\1: \4 2-- \2, \3/p
-}' "$state_file"
-
-# delete messages
-sed -i '/^'"$to"' /{
- d
-}' "$state_file"
diff --git a/Reaktor/commands/tell-on_privmsg b/Reaktor/commands/tell-on_privmsg
deleted file mode 100755
index 5d0aff41..00000000
--- a/Reaktor/commands/tell-on_privmsg
+++ /dev/null
@@ -1,17 +0,0 @@
-#! /bin/sh
-set -euf
-
-# require flock from util-linux
-if test "${FLOCK-}" != "$state_file"; then
- exec env FLOCK="$state_file" flock "$state_file" "$0" "$@"
-fi
-
-from="$_prefix"
-to="$1"; shift
-msg="$*"
-date=$(date)
-
-# TODO tell now, if already joined
-printf '%s %s <%s> %s\n' "$to" "$from" "$date" "$msg" >> "$state_file"
-
-echo 'Consider it noted.' # that's what lambdabot says...
diff --git a/Reaktor/commands/uptime b/Reaktor/commands/uptime
deleted file mode 100755
index 7ff64168..00000000
--- a/Reaktor/commands/uptime
+++ /dev/null
@@ -1,8 +0,0 @@
-#! /bin/sh
-#
-# //Reactor/commands/uptime - IRC-optimized uptime output
-#
-uptime | sed '
- s/^\(.*\) up \(.*\) days\?, *\(.*\), *\(.*\) users\?, *load average: \(.*\)$/\1; \2d \3; \4u; \5/;t
- s/^\(.*\) up *\(.*\), *\(.*\) users\?, *load average: \(.*\)$/\1; 0d \2; \3u; \4/;t
-'
diff --git a/Reaktor/commands/visit-page b/Reaktor/commands/visit-page
deleted file mode 120000
index 8723336b..00000000
--- a/Reaktor/commands/visit-page
+++ /dev/null
@@ -1 +0,0 @@
-../repos/view-website/runner.sh \ No newline at end of file
diff --git a/Reaktor/commands/whatweb b/Reaktor/commands/whatweb
deleted file mode 100755
index 36711efa..00000000
--- a/Reaktor/commands/whatweb
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-#wrapper for WhatWeb
-set -eu
-
-# whatweb is in path?
-whatweb=whatweb
-if ! type -p whatweb >/dev/null 2>&1 ;then
- here=$(dirname `readlink -f $0`)
- whatweb="$here/../repos/whatweb/whatweb"
- if ! test -e "$whatweb" then
- echo "!! cannot find usable whatweb installation in path or basedir ($whatweb)"
- exit 1
- fi
-fi
-
-[ -z "${1:-}" ] && echo "!! no host given" && exit 1
-exec $whatweb_bin --user-agent="Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0" -a 3 "$1" 2>&1
diff --git a/Reaktor/commands/whois b/Reaktor/commands/whois
deleted file mode 100755
index b0733891..00000000
--- a/Reaktor/commands/whois
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-(! type whois >/dev/null 2>/dev/null) && echo "whois does not exist" && exit 0
-
-whois "${1?usage: $0 domain}" | sed -e '/^$/d' -e '/^%/d' -e '/^Nserver/d' -e 's/^\[.*/---/' -e '/^Changed/d' -e '/^Status/d' -e '/^Type/d' -e '/^PostalCode/d' -e '/^Phone/d' -e '/^Fax/d' -e '/Last update of WHOIS database/Q' -e '/ID:/d'