GeekBot
The official bot of the AutoHotkey IRC channel.
Mentions:
- Documentation search function courtesy of Run1e
Installing under Linux
-
Install a desktop environment (if one is not avaiable) for Wine/AHK to function correctly. The packages
xvfb
(X server),fluxbox
(window manager), andx11vnc
(optional VNC server) make for a lightweight, remotely accessible desktop. -
Download and install the latest Wine (1.7 or greater) from WineHQ: https://www.winehq.org/download
-
Grab the latest AutoHotkey. Portable U32 is preferred, and you can get a copy by:
- Running the installer on a Windows system and choosing "extract to..."
- Opening the installer in an archive manager which supports it (e.g. 7-Zip)
- Downloading from https://autohotkey.com/download/
-
(Optional) Grab a copy of
screen
ortmux
for remote shell management.
Running under Linux
If your system doesn't boot into a desktop automatically, you will first need to start a desktop environment.
- Run
export DISPLAY=:0
to set the display for graphical programs to use. - Run
Xvfb -screen 0 800x600x24
to start the X server at 800x600 resolution with 24 bit colors. - Run
fluxbox
to start the window manager. - (Optional) Run
x11vnc -nopw -forever -shared -localhost
to start a VNC server. With these settings it will run indefinitely, but for security reasons it will only accept connections from localhost. Use SSH port forwarding to connect from a remote system.
Once the desktop has been set up, it's time to start the bot. If you're
starting the bot over SSH, make sure that the DISPLAY
variable has been
exported appropriately (for xvfb
, export DISPLAY=:0
again).
To start the bot in the current shell session, use the command
wine AutoHotkey.exe GeekBot.ahk
.
To start the bot in a new detachable session using screen
, use the command
screen -S geekbot -d -m wine AutoHotkey.exe GeekBot.ahk
. With this approach
you can terminate your SSH connection without terminating the bot.
To later attach to the screen
session, use screen -r geekbot
. To detach
from the session while you have it open, press Control-a
followed by d
.
Sandbox Plugins
The sandbox plugin allows you to run AutoHotkey code using chat commands. It is disabled by default due to a number of security vulnerabilities, but here's how to enable it anyway:
-
Download the sandbox dll from here. (this link may change in the future)
-
Place it in a folder where it will not be moved. Moving the dll after retistration will break references stored in the registry which are not easy to fix.
-
- If using Windows, run
regsvr32 ahksandboxansi.dll
as admin. - If using Wine, run
wine regsvr32 ahksandboxansi.dll
as normal user.
- If using Windows, run
-
Move the sandbox plugin from the disabled plugin folder to the normal plugin folder.
The python sandbox plugin allows you to run Python3 code using chat commands.
It relies on an HTTP server written in python that wraps the excellent
sandboxing package pypy-sandbox
. The server has to be running for the
plugin to work. To enable it, follow these steps:
- Install the
pypy-sandbox
package for Python3. - Run the
PySandboxServer.py
file using Python3. - Move the python sandbox plugin from the disabled plugin folder to the normal plugin folder.
Notes
- The first time you run GeekBot, a Settings.ini will be generated. Edit this file to enter your connection information and other settings.