summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoe <joe@joelightning.com>2011-11-10 20:26:17 +0000
committerJoe <joe@joelightning.com>2011-11-10 20:26:17 +0000
commitf23c71af59dbac854a027997f243c38628c0f65f (patch)
tree32c3659c9001acf7d9fca82ca7d2ad19885067a5 /lib
parent2ca1058d769b4ba9ff137c024c81988abc8bd496 (diff)
added hack to check if pbot is present
Diffstat (limited to 'lib')
-rw-r--r--lib/main.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/main.sh b/lib/main.sh
index 301dd9b..dd17cb9 100644
--- a/lib/main.sh
+++ b/lib/main.sh
@@ -510,6 +510,7 @@ l33t_codes
for module in $modules_on_JOIN; do
module_${module}_on_JOIN "$sender" "$channel"
done
+ [[ ${sender%%!*} == pbot ]] && touch pbot_present
elif [[ "$line" =~ ^:([^ ]*)\ +PART\ +(#[^ ]+)(\ +:(.*))? ]]; then
sender="${BASH_REMATCH[1]}"
channel="${BASH_REMATCH[2]}"
@@ -519,6 +520,8 @@ l33t_codes
for module in $modules_on_PART; do
module_${module}_on_PART "$sender" "$channel" "$reason"
done
+ [[ ${sender%%!*} == pbot ]] && rm -f pbot_present &> \
+ /dev/null
elif [[ "$line" =~ ^:([^ ]*)\ +KICK\ +(#[^ ]+)\ +([^ ]+)(\ +:(.*))? ]]; then
sender="${BASH_REMATCH[1]}"
channel="${BASH_REMATCH[2]}"