From 73d0f55630d5c02db744b2a68adf5d02480b5d7f Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 26 Apr 2018 01:24:13 -0400 Subject: [PATCH 1/2] pass --- sedbot.bash | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/sedbot.bash b/sedbot.bash index 1f88289..42bde2b 100755 --- a/sedbot.bash +++ b/sedbot.bash @@ -3,14 +3,15 @@ #license: GNU GPL v3+ -SERVER=irc.example.net # the IRC server to connect to -PORT=6667 # port to connect to +SERVER=irc.tilde.team # the IRC server to connect to +PASS= # server pass +PORT=6697 # port to connect to NICK=sedbot # bot's nickname LOGIN=sedbot # bot's username REALNAME=sedbot # bot's name -CHANNELS=('#example') # array of channels to autojoin at start -IRC_LOG=~/sedbot.log # irc message log -ERROR_LOG=~/sedbot.err # log of errors, events and used regexps +CHANNELS=('#meta') # array of channels to autojoin at start +IRC_LOG=sedbot.log # irc message log +ERROR_LOG=sedbot.err # log of errors, events and used regexps MAX_LINE_LENGTH=400 # truncate lines to this many bytes SLEEP_JOIN=3 # sleep after identifying before autojoining channels @@ -31,7 +32,7 @@ connect() { if (($?)); then return $? fi - sendmsg NICK "$NICK" + sendmsg PASS "$PASS" if (($?)); then return $? fi @@ -39,6 +40,10 @@ connect() { if (($?)); then return $? fi + sendmsg NICK "$NICK" + if (($?)); then + return $? + fi return 0 } From 2d9e82b4fe1a7b3875c809d695ec9717d5d147f7 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Thu, 26 Apr 2018 02:20:12 -0400 Subject: [PATCH 2/2] add bot mode flag --- sedbot.bash | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sedbot.bash b/sedbot.bash index 42bde2b..497db4b 100755 --- a/sedbot.bash +++ b/sedbot.bash @@ -41,6 +41,10 @@ connect() { return $? fi sendmsg NICK "$NICK" + if (($?)); then + return $? + fi + sendmsg MODE "$NICK +B" if (($?)); then return $? fi