NOTE: This project has gone largely unmaintained since 2011. I ran into
event model issues I had ideas about fixing, but frankly this
project just isn't a priority right now.
Feel free to fork and adapt as you see fit, but be aware that the
module is mostly non-functional.
Tcl is awful. Seriously, awful. This module allows you to write Eggdrop scripts in Python instead.
This module is still very young, immature, and untested. Still, beats writing Tcl.
- Extract the
python.mod
directory into your Eggdrop source tree undersrc/mod
- Edit
src/mod/python.mod/Makefile
to point to the proper include/lib paths for Python - From the root of the source tree, run
make iconfig
and enable the module - Build using
make
and/ormake install
- In
eggdrop.conf
useloadmodule python
to enable theloadpython
directive - Use
loadpython
to load and instantiate Python modules
loadmodule python # load python.mod
set python-isolate 1 # use interpreter isolation? (0/1)
loadpython splat # load splat.py
import eggdrop
def ctcp_splat(nick, mask, handle, dest, keyword, text):
eggdrop.putlog("Got splat'd by %s (%s)!" % (nick, mask))
eggdrop.putserv("PRIVMSG %s :it's not nice to throw things" % nick)
eggdrop.bind('ctcp', '-', 'splat', ctcp_splat)
eggdrop.putlog("*** splat module loaded")