Recently Written · git

ii-lchat-metapackage

Get suckless irc working for YOU

git clone https://github.com/equwal/ii-lchat-metapackage

Log | Files | Refs


commit 4d2dea5cc44c7b249cc822f7536bb5a0b0d8e6dc
Spenser Truex <truex@equwal.com>
2025-08-30 19:39:05 -0400

Add trap to move to the IRC directory where the filter file could exist

 lchat-connect | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/lchat-connect b/lchat-connect
index 1f7fa5e..df75f93 100755
--- a/lchat-connect
+++ b/lchat-connect
@@ -6,5 +6,8 @@ DIR="$1"
 SERVER="$2"
 CHANNEL="$3"
 
+ORIGINAL_DIR="$(pwd)"
+trap 'cd "$ORIGINAL_DIR"' EXIT
+
 cd "$DIR"
 lchat -a "$DIR"/"$SERVER"/"$CHANNEL" -n 50