aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--agents/callback_delete.zsh (renamed from submodules/callback_delete.zsh)0
-rw-r--r--agents/callback_post.zsh (renamed from submodules/callback_post.zsh)0
-rw-r--r--agents/callback_short.zsh (renamed from submodules/callback_short.zsh)0
-rw-r--r--agents/callback_stop.zsh (renamed from submodules/callback_stop.zsh)0
-rw-r--r--agents/callback_tags.zsh (renamed from submodules/callback_tags.zsh)0
-rw-r--r--agents/command_authorize.zsh (renamed from submodules/command_authorize.zsh)0
-rw-r--r--agents/command_donate.zsh (renamed from submodules/command_donate.zsh)0
-rw-r--r--agents/command_export.zsh (renamed from submodules/command_export.zsh)0
-rw-r--r--agents/command_hash.zsh (renamed from submodules/command_hash.zsh)0
-rw-r--r--agents/command_help.zsh (renamed from submodules/command_help.zsh)0
-rw-r--r--agents/command_original.zsh (renamed from submodules/command_original.zsh)0
-rw-r--r--agents/command_ping.zsh (renamed from submodules/command_ping.zsh)0
-rw-r--r--agents/command_post.zsh (renamed from submodules/command_post.zsh)0
-rw-r--r--agents/command_prpr.zsh (renamed from submodules/command_prpr.zsh)0
-rw-r--r--agents/command_short.zsh (renamed from submodules/command_short.zsh)0
-rw-r--r--agents/command_shorts.zsh (renamed from submodules/command_shorts.zsh)0
-rw-r--r--agents/command_source.zsh (renamed from submodules/command_source.zsh)0
-rw-r--r--agents/command_stop.zsh (renamed from submodules/command_stop.zsh)0
-rw-r--r--agents/inline_donate.zsh (renamed from submodules/inline_donate.zsh)2
-rw-r--r--agents/inline_help.zsh (renamed from submodules/inline_help.zsh)0
-rw-r--r--agents/inline_none.zsh (renamed from submodules/inline_none.zsh)0
-rw-r--r--agents/inline_original.zsh (renamed from submodules/inline_original.zsh)0
-rw-r--r--agents/inline_post.zsh (renamed from submodules/inline_post.zsh)0
-rw-r--r--agents/inline_search.zsh (renamed from submodules/inline_search.zsh)12
-rw-r--r--agents/inline_search_pools.zsh (renamed from submodules/inline_search_pools.zsh)0
-rw-r--r--agents/inline_search_posts.zsh (renamed from submodules/inline_search_posts.zsh)0
-rw-r--r--agents/inline_search_tags.zsh (renamed from submodules/inline_search_tags.zsh)0
-rw-r--r--agents/inline_short.zsh (renamed from submodules/inline_short.zsh)0
-rw-r--r--agents/inline_shorts.zsh (renamed from submodules/inline_shorts.zsh)0
-rw-r--r--agents/timer_uncache.zsh (renamed from submodules/timer_uncache.zsh)0
-rw-r--r--agents/timer_unlock.zsh (renamed from submodules/timer_unlock.zsh)0
-rw-r--r--agents/url_parser.zsh (renamed from submodules/url_parser.zsh)0
-rwxr-xr-xbot.zsh10
-rw-r--r--handlers/callback.zsh (renamed from modules/callback.zsh)12
-rw-r--r--handlers/commands.zsh (renamed from modules/commands.zsh)30
-rw-r--r--handlers/inline.zsh (renamed from modules/inline.zsh)16
-rw-r--r--handlers/source.zsh (renamed from modules/source.zsh)2
-rw-r--r--handlers/timer.zsh (renamed from modules/timer.zsh)4
38 files changed, 44 insertions, 44 deletions
diff --git a/submodules/callback_delete.zsh b/agents/callback_delete.zsh
index a2334bf..a2334bf 100644
--- a/submodules/callback_delete.zsh
+++ b/agents/callback_delete.zsh
diff --git a/submodules/callback_post.zsh b/agents/callback_post.zsh
index 301001f..301001f 100644
--- a/submodules/callback_post.zsh
+++ b/agents/callback_post.zsh
diff --git a/submodules/callback_short.zsh b/agents/callback_short.zsh
index a48a27c..a48a27c 100644
--- a/submodules/callback_short.zsh
+++ b/agents/callback_short.zsh
diff --git a/submodules/callback_stop.zsh b/agents/callback_stop.zsh
index d2eab2c..d2eab2c 100644
--- a/submodules/callback_stop.zsh
+++ b/agents/callback_stop.zsh
diff --git a/submodules/callback_tags.zsh b/agents/callback_tags.zsh
index 803c0dd..803c0dd 100644
--- a/submodules/callback_tags.zsh
+++ b/agents/callback_tags.zsh
diff --git a/submodules/command_authorize.zsh b/agents/command_authorize.zsh
index a8be540..a8be540 100644
--- a/submodules/command_authorize.zsh
+++ b/agents/command_authorize.zsh
diff --git a/submodules/command_donate.zsh b/agents/command_donate.zsh
index fa7518c..fa7518c 100644
--- a/submodules/command_donate.zsh
+++ b/agents/command_donate.zsh
diff --git a/submodules/command_export.zsh b/agents/command_export.zsh
index fe68802..fe68802 100644
--- a/submodules/command_export.zsh
+++ b/agents/command_export.zsh
diff --git a/submodules/command_hash.zsh b/agents/command_hash.zsh
index d8bb677..d8bb677 100644
--- a/submodules/command_hash.zsh
+++ b/agents/command_hash.zsh
diff --git a/submodules/command_help.zsh b/agents/command_help.zsh
index 2d86678..2d86678 100644
--- a/submodules/command_help.zsh
+++ b/agents/command_help.zsh
diff --git a/submodules/command_original.zsh b/agents/command_original.zsh
index adeebdf..adeebdf 100644
--- a/submodules/command_original.zsh
+++ b/agents/command_original.zsh
diff --git a/submodules/command_ping.zsh b/agents/command_ping.zsh
index 83ffb3b..83ffb3b 100644
--- a/submodules/command_ping.zsh
+++ b/agents/command_ping.zsh
diff --git a/submodules/command_post.zsh b/agents/command_post.zsh
index 2ead112..2ead112 100644
--- a/submodules/command_post.zsh
+++ b/agents/command_post.zsh
diff --git a/submodules/command_prpr.zsh b/agents/command_prpr.zsh
index a6db455..a6db455 100644
--- a/submodules/command_prpr.zsh
+++ b/agents/command_prpr.zsh
diff --git a/submodules/command_short.zsh b/agents/command_short.zsh
index cc551e3..cc551e3 100644
--- a/submodules/command_short.zsh
+++ b/agents/command_short.zsh
diff --git a/submodules/command_shorts.zsh b/agents/command_shorts.zsh
index f52b531..f52b531 100644
--- a/submodules/command_shorts.zsh
+++ b/agents/command_shorts.zsh
diff --git a/submodules/command_source.zsh b/agents/command_source.zsh
index 9553bc6..9553bc6 100644
--- a/submodules/command_source.zsh
+++ b/agents/command_source.zsh
diff --git a/submodules/command_stop.zsh b/agents/command_stop.zsh
index 1ddf10c..1ddf10c 100644
--- a/submodules/command_stop.zsh
+++ b/agents/command_stop.zsh
diff --git a/submodules/inline_donate.zsh b/agents/inline_donate.zsh
index a0257ca..f84c68a 100644
--- a/submodules/inline_donate.zsh
+++ b/agents/inline_donate.zsh
@@ -4,7 +4,7 @@
if [[ -n "${nocommand_donate}" ]]
then
- source "${submods}/inline_help.zsh"
+ source "${agents}/inline_help.zsh"
return
fi
diff --git a/submodules/inline_help.zsh b/agents/inline_help.zsh
index 2ac9455..2ac9455 100644
--- a/submodules/inline_help.zsh
+++ b/agents/inline_help.zsh
diff --git a/submodules/inline_none.zsh b/agents/inline_none.zsh
index c6b0a2e..c6b0a2e 100644
--- a/submodules/inline_none.zsh
+++ b/agents/inline_none.zsh
diff --git a/submodules/inline_original.zsh b/agents/inline_original.zsh
index 5e9caac..5e9caac 100644
--- a/submodules/inline_original.zsh
+++ b/agents/inline_original.zsh
diff --git a/submodules/inline_post.zsh b/agents/inline_post.zsh
index 92d7199..92d7199 100644
--- a/submodules/inline_post.zsh
+++ b/agents/inline_post.zsh
diff --git a/submodules/inline_search.zsh b/agents/inline_search.zsh
index c3f1061..05b322b 100644
--- a/submodules/inline_search.zsh
+++ b/agents/inline_search.zsh
@@ -17,14 +17,14 @@ case "${command}" in
;;
(*)
set -- ${inline_query[@]}
- source "${submods}/inline_none.zsh"
+ source "${agents}/inline_none.zsh"
case "${command}" in
("shorts")
- source "${submods}/inline_shorts.zsh"
+ source "${agents}/inline_shorts.zsh"
;;
("help")
- source "${submods}/inline_help.zsh"
+ source "${agents}/inline_help.zsh"
;;
esac
@@ -128,13 +128,13 @@ do
case "${ib_mode}" in
(l)
- source "${submods}/inline_search_pools.zsh"
+ source "${agents}/inline_search_pools.zsh"
;;
(p)
- source "${submods}/inline_search_posts.zsh"
+ source "${agents}/inline_search_posts.zsh"
;;
(t)
- source "${submods}/inline_search_tags.zsh"
+ source "${agents}/inline_search_tags.zsh"
;;
esac
diff --git a/submodules/inline_search_pools.zsh b/agents/inline_search_pools.zsh
index 476dd9a..476dd9a 100644
--- a/submodules/inline_search_pools.zsh
+++ b/agents/inline_search_pools.zsh
diff --git a/submodules/inline_search_posts.zsh b/agents/inline_search_posts.zsh
index 1af741d..1af741d 100644
--- a/submodules/inline_search_posts.zsh
+++ b/agents/inline_search_posts.zsh
diff --git a/submodules/inline_search_tags.zsh b/agents/inline_search_tags.zsh
index aea0184..aea0184 100644
--- a/submodules/inline_search_tags.zsh
+++ b/agents/inline_search_tags.zsh
diff --git a/submodules/inline_short.zsh b/agents/inline_short.zsh
index 84dd3d4..84dd3d4 100644
--- a/submodules/inline_short.zsh
+++ b/agents/inline_short.zsh
diff --git a/submodules/inline_shorts.zsh b/agents/inline_shorts.zsh
index ea40e95..ea40e95 100644
--- a/submodules/inline_shorts.zsh
+++ b/agents/inline_shorts.zsh
diff --git a/submodules/timer_uncache.zsh b/agents/timer_uncache.zsh
index 4af2543..4af2543 100644
--- a/submodules/timer_uncache.zsh
+++ b/agents/timer_uncache.zsh
diff --git a/submodules/timer_unlock.zsh b/agents/timer_unlock.zsh
index 9736116..9736116 100644
--- a/submodules/timer_unlock.zsh
+++ b/agents/timer_unlock.zsh
diff --git a/submodules/url_parser.zsh b/agents/url_parser.zsh
index b24c1bf..b24c1bf 100644
--- a/submodules/url_parser.zsh
+++ b/agents/url_parser.zsh
diff --git a/bot.zsh b/bot.zsh
index 3287f7c..da5d9f9 100755
--- a/bot.zsh
+++ b/bot.zsh
@@ -27,8 +27,8 @@ auth="${dir}/auth"
cache="${dir}/cache/${$}"
config="${dir}/config"
files="${dir}/files"
-mods="${dir}/modules"
-submods="${dir}/submodules"
+handlers="${dir}/handlers"
+agents="${dir}/agents"
units="${dir}/units"
users="${dir}/users"
offset=-1
@@ -767,7 +767,7 @@ source "${units}/log.zsh"
while trap 'wait && exit 0' INT TERM
do
- source "${mods}/timer.zsh" &
+ source "${handlers}/timer.zsh" &
if ! input_data="$(
curl --connect-timeout ${connrefused_timeout} \
@@ -832,9 +832,9 @@ do
continue
fi
- for module in callback commands inline source
+ for handler in callback commands inline source
do
- source "${mods}/${module}.zsh" &
+ source "${handlers}/${handler}.zsh" &
done
offset=$((update_id + 1))
diff --git a/modules/callback.zsh b/handlers/callback.zsh
index 6c3a16b..9dbadc0 100644
--- a/modules/callback.zsh
+++ b/handlers/callback.zsh
@@ -20,22 +20,22 @@ shift
case "${command}" in
("delete")
- source "${submods}/callback_delete.zsh"
+ source "${agents}/callback_delete.zsh"
;;
("post")
- source "${submods}/callback_post.zsh"
+ source "${agents}/callback_post.zsh"
;;
("reset")
- source "${submods}/callback_reset.zsh"
+ source "${agents}/callback_reset.zsh"
;;
("short")
- source "${submods}/callback_short.zsh"
+ source "${agents}/callback_short.zsh"
;;
("stop")
- source "${submods}/callback_stop.zsh"
+ source "${agents}/callback_stop.zsh"
;;
("tags")
- source "${submods}/callback_tags.zsh"
+ source "${agents}/callback_tags.zsh"
;;
(*)
exit 0
diff --git a/modules/commands.zsh b/handlers/commands.zsh
index bae6538..cfb24f9 100644
--- a/modules/commands.zsh
+++ b/handlers/commands.zsh
@@ -34,49 +34,49 @@ shift
case "${command}" in
("/authorize" | "/authorize@${username}")
- source "${submods}/command_authorize.zsh"
+ source "${agents}/command_authorize.zsh"
;;
("/donate" | "/donate@${username}")
- source "${submods}/command_donate.zsh"
+ source "${agents}/command_donate.zsh"
;;
("/export" | "/export@${username}")
- source "${submods}/command_export.zsh"
+ source "${agents}/command_export.zsh"
;;
("/hash" | "/hash@${username}")
- source "${submods}/command_hash.zsh"
+ source "${agents}/command_hash.zsh"
;;
("/help" | "/help@${username}")
- source "${submods}/command_help.zsh"
+ source "${agents}/command_help.zsh"
;;
("/original" | "/original@${username}")
- source "${submods}/command_original.zsh"
+ source "${agents}/command_original.zsh"
;;
("/ping" | "/ping@${username}")
- source "${submods}/command_ping.zsh"
+ source "${agents}/command_ping.zsh"
;;
("/post" | "/post@${username}")
- source "${submods}/command_post.zsh"
+ source "${agents}/command_post.zsh"
;;
("/prpr" | "/prpr@${username}")
- source "${submods}/command_prpr.zsh"
+ source "${agents}/command_prpr.zsh"
;;
("/short" | "/short@${username}")
- source "${submods}/command_short.zsh"
+ source "${agents}/command_short.zsh"
;;
("/shorts" | "/shorts@${username}")
- source "${submods}/command_shorts.zsh"
+ source "${agents}/command_shorts.zsh"
;;
("/source" | "/source@${username}")
- source "${submods}/command_source.zsh"
+ source "${agents}/command_source.zsh"
;;
("/start" | "/start@${username}")
- source "${submods}/command_help.zsh"
+ source "${agents}/command_help.zsh"
;;
("/stop" | "/stop@${username}")
- source "${submods}/command_stop.zsh"
+ source "${agents}/command_stop.zsh"
;;
(*)
- source "${submods}/url_parser.zsh"
+ source "${agents}/url_parser.zsh"
;;
esac
diff --git a/modules/inline.zsh b/handlers/inline.zsh
index cf3ea86..8f025b7 100644
--- a/modules/inline.zsh
+++ b/handlers/inline.zsh
@@ -23,30 +23,30 @@ if [[ -n "${command}" ]]
then
shift
else
- source "${submods}/inline_none.zsh"
+ source "${agents}/inline_none.zsh"
fi
case "${command}" in
("donate")
- source "${submods}/inline_donate.zsh"
+ source "${agents}/inline_donate.zsh"
;;
("help")
- source "${submods}/inline_help.zsh"
+ source "${agents}/inline_help.zsh"
;;
("original")
- source "${submods}/inline_original.zsh"
+ source "${agents}/inline_original.zsh"
;;
("post")
- source "${submods}/inline_post.zsh"
+ source "${agents}/inline_post.zsh"
;;
("short")
- source "${submods}/inline_short.zsh"
+ source "${agents}/inline_short.zsh"
;;
("shorts" | s)
- source "${submods}/inline_shorts.zsh"
+ source "${agents}/inline_shorts.zsh"
;;
(*)
- source "${submods}/inline_search.zsh"
+ source "${agents}/inline_search.zsh"
;;
esac
diff --git a/modules/source.zsh b/handlers/source.zsh
index 28c6852..d02c431 100644
--- a/modules/source.zsh
+++ b/handlers/source.zsh
@@ -45,7 +45,7 @@ then
fi
source "${units}/user.zsh"
-source "${submods}/command_source.zsh"
+source "${agents}/command_source.zsh"
if ! output_data="$(
curl --connect-timeout ${connrefused_timeout} \
diff --git a/modules/timer.zsh b/handlers/timer.zsh
index 18a48a6..8da9c18 100644
--- a/modules/timer.zsh
+++ b/handlers/timer.zsh
@@ -16,8 +16,8 @@ then
exit 0
fi
-source "${submods}/timer_unlock.zsh"
-source "${submods}/timer_uncache.zsh"
+source "${agents}/timer_unlock.zsh"
+source "${agents}/timer_uncache.zsh"
strftime %s > "${cache}.timer"
rmdir "${cache}.lock"