commit 345670f95611b39991332444c482ca0f7cfd4301
parent 1828fd5291c3cce4690a012ddc18dcfcd9f337e7
Author: Hayden Hamilton <hayden@haydenvh.com>
Date: Sun, 11 Apr 2021 20:51:23 +0100
filters.sh: update
Diffstat:
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/filters.sh b/filters.sh
@@ -150,6 +150,12 @@ stupid(){
)
}
+weather(){
+ set -- $(head -n 1)
+ shift 2
+ curl "wttr.in?0FqQ/$@" | prepl_msg
+}
+
match_motd send_join "#hlircnet"
match_motd send_join "#test"
match_msg "^($nick: |$nick, |)(good |)(hi|hello|greetings|sup|morning|afternoon|evening|day)(.*$nick.*|)$" greet
@@ -158,7 +164,8 @@ match_action "(slaps|smacks|whacks|hits|strikes|punches|shoots|stabs|wounds) $ni
match_action "(gives|passes|hands).*(blunt|bong|joint)" weed
match_action "(gives|passes|hands).*job" job
match_action "(gives|passes|hands).*(food|cookie|biscuit|leftovers|dinner|scraps)" food
-match_msg "^($nick: |$nick, |)(good |)night(.*$nick.*|)$" night
+match_msg "$nick[:,] (wttr|weather)" weather
+match_msg "$nick[:,] good |)night(.*$nick.*|)$" night
match_msg "$nick[,:] ($(ls bin/ | tr '\n' '|' | sed 's/|$//g'))" bin
match_msg "$nick[,:] (sudo|doas) ($(ls bin/ | tr '\n' '|' | sed 's/|$//g'))" binsu
match_msg "http[s]*://.*" url_title