README
author Dan
Tue, 30 Dec 2008 06:16:54 -0500
changeset 37 c3cbefda414a
parent 5 fcc1eac04772
permissions -rw-r--r--
Merging apparently split branches
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     1
EnanoBot - the Enano CMS IRC bot
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     2
Copyright (c) 2008 Dan Fuhry
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     3
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     4
    This program is free software; you can redistribute it and/or modify it
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     5
    under the terms of the GNU General Public License as published by the Free
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     6
    Software Foundation; either version 2 of the License, or (at your option)
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     7
    any later version.
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     8
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
     9
    This program is distributed in the hope that it will be useful, but WITHOUT
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    10
    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    11
    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    12
    more details.
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    13
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    14
    You should have received a copy of the GNU General Public License along
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    15
    with this program; if not, write to the Free Software Foundation, Inc., 59
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    16
    Temple Place, Suite 330, Boston, MA 02111-1307 USA
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    17
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    18
EnanoBot is a bot I wrote for the Enano CMS IRC channel in #enano on freenode. It's
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    19
written in CLI PHP and you need to have shell access, a MySQL server, and a host
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    20
with a very permissive TOU or a reliable home connection to run this bot.
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    21
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    22
FEATURES
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    23
--------------------
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    24
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    25
   - Basic logging
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    26
   - Privileged users - automatically opped and can speak through the bot, among
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    27
     other things
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    28
   - Snippets - use for automated help
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    29
   - Web-based log viewer
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    30
   - Web-based snippet manager
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    31
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    32
REQUIREMENTS
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    33
--------------------
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    34
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    35
  - MySQL server
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    36
  - SSH access
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    37
  - PHP on your shell server
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    38
  - Working Enano installation
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    39
  - The MySQL user Enano uses needs to have access to EnanoBot's database if it's
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    40
    not the same one that you're using for Enano
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    41
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    42
NOTE ON ISP RESTRICTIONS
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    43
--------------------
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    44
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    45
A lot of ISPs (webhosts) prohibit running IRC bots from your shell account. Check
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    46
with their terms of use before you enable this thing. Because this project is under
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    47
the GPL there is of course no warranty for it, and nobody from the Enano Project
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    48
can be responsible for your use of this bot. So make sure it's OK before you try to
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    49
run it.
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    50
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    51
INSTALLING
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    52
--------------------
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    53
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    54
Copy config-sample.php to config.php and edit it. Then put irclogs.php and
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    55
snippets.php wherever your Enano installation is. You could probably modify snippets
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    56
to not use Enano pretty easily but securing it would be your job. Edit both irclogs
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    57
and snippets to set the EnanoBot root directory (where your config and enanobot.php
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    58
are). DO NOT put enanobot.php and config.php in your document root - you WILL get
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    59
hacked.
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    60
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    61
To start it, run:
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    62
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    63
  $ php enanobot.php
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    64
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    65
You may find it useful to make sure that it restarts if it dies. Once you've started
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    66
the bot and confirmed that it works, do something like: (and this is really hackish)
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    67
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    68
  $ while true; do php enanobot.php; done &
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    69
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    70
This all assumes that you're on a Unix-based server. Things will be different on
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    71
Windows.
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    72
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    73
AUTHOR
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    74
--------------------
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    75
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    76
Dan Fuhry <dan@enanocms.org>
fcc1eac04772 Prepped for public distribution.
Dan
parents:
diff changeset
    77