diff --git a/bin/connect b/bin/connect deleted file mode 100755 index 7192a01..0000000 --- a/bin/connect +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -alias logdate=date +'%Y-%m-%d %H:%M:%S' - -cd "${1:-/home/happybot}" -export PATH="$(pwd)/bin:$PATH" - -if test -e input; then rm input; fi -if test -e /tmp/happybot; then rm -r /tmp/happybot; fi -mkfifo input -mkdir /tmp/happybot - -if hateweek/isnow; then - echo 'hatebot' > /tmp/happybot/nick; -else - echo 'happybot' > /tmp/happybot/nick; -fi - -tail -f input | while read -r line; do - printf '%s :%s %s\n' "$(logdate)" "$(cat /tmp/happybot/nick)" "$line" >> log.txt - printf '%s\n' "$line" -done | openssl s_client -quiet -connect irc.freenode.net:6697 | while read -r line; do - printf '%s %s\n' "$(logdate)" "$line" >> log.txt - callirc "$line" & -done diff --git a/bin/hateweek/end b/bin/hateweek/end deleted file mode 100755 index d815d11..0000000 --- a/bin/hateweek/end +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -sed -i 's/0/1/' bin/hateweek/isnow -raw 'NICK happybot' -privmsg '#offtopia' 'Hate how hateweek is over!' diff --git a/bin/hateweek/isnow b/bin/hateweek/isnow deleted file mode 100755 index 2bb8d86..0000000 --- a/bin/hateweek/isnow +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exit 1 diff --git a/bin/hateweek/start b/bin/hateweek/start deleted file mode 100755 index 9980652..0000000 --- a/bin/hateweek/start +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -sed -i 's/1/0/' bin/hateweek/isnow -raw 'NICK hatebot' -privmsg '#offtopia' "Hateweek is here! Hate how it's only once a year!" diff --git a/readme.md b/readme.md index 224811c..553c426 100644 --- a/readme.md +++ b/readme.md @@ -1,40 +1,3 @@ -`input`: -- The named pipe to talk as the bot. +# happybot 2.0 -`bin/`: -- `raw` - Sends `$1` to freenode. -- `reply` - Uses env vars to send message `$@`. -- `result` - Like reply, but does not prepend `nick:`. -- `privmsg` - Sends privmsg to `$1`, with message `shift;$@`. -- `notice` - Sends privmsg to `$1`, with message `shift;$@`. -- `action` - Sends ctcp action to `$1`, with message `shift;$@`. -- `ctcp` - Sends a ctcp query, returns the response. -- `connect` - Connects to IRC, calls commands in `irc/`, listens to `input`, - and writes to log the file. -- `hateweek/start` - Begins hateweek mode. -- `hateweek/end` - Ends hateweek mode. -- `hateweek/isnow` - Check to see if hateweek is now (returns 0 if now, 1 if - not now). - -`log.txt`: -- The single file that has all of the logs. -- Uses the IRC format with a timestamp prepended. - -`irc/`: -- IRC commands are run as shell commands. -- `bin/` is in their `PATH`. -- Set up env vars before calling various functions. -- Add data to log files if needed. - -Env vars: -- `$acct`: NickServ account name, or `\*`. -- `$nick` -- `$cmd` -- `$where` -- `$msg` - -`/tmp/happybot/`: -- directory for temporary information -- `nick` - The bot's nick. -- `acct` - Look up account name by nick. - - Either a directory, or a file. +You've heard the rumors, you know it's been a long time in the making, and it's finally here! Happybot 2.0: Vaporware Edition. diff --git a/sudoers b/sudoers deleted file mode 100644 index 32b56f2..0000000 --- a/sudoers +++ /dev/null @@ -1 +0,0 @@ -happybot ALL=(root) NOPASSWD: /sbin/rc-service happybot