summaryrefslogtreecommitdiffstats
path: root/modules/invitejoin.bash
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2017-03-22 21:07:10 +0100
committerclsr <clsr@clsr.net>2017-03-22 21:07:10 +0100
commitff2bc5d0931d4a460d4d74183b6f9dd9394c40a0 (patch)
tree13dbf5a1395ae4e3dcd458bf114d962b28a8657c /modules/invitejoin.bash
downloadmbibot-0.1.0.tar.gz
mbibot-0.1.0.zip
Initial commitv0.1.0
Diffstat (limited to 'modules/invitejoin.bash')
-rw-r--r--modules/invitejoin.bash15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/invitejoin.bash b/modules/invitejoin.bash
new file mode 100644
index 0000000..d76d85d
--- /dev/null
+++ b/modules/invitejoin.bash
@@ -0,0 +1,15 @@
+# modules/invitejoin.bash
+#
+# Joins channels when invited.
+
+
+if [ -z "$IRCBOT_MODULE" ]; then
+ printf "error: %s is a module for ircbot.bash and should not be run separately\n" "$0"
+ exit 1
+fi
+
+
+# joins the channel the bot was invited to
+on_self_invite() { # args: $1 - source, $2 - channel
+ sendmsg JOIN "$2"
+}