summaryrefslogtreecommitdiff
path: root/kanotix-irc
diff options
context:
space:
mode:
authorHolger Paradies <retabell@gmx.de>2021-08-14 12:50:14 +0200
committerHolger Paradies <retabell@gmx.de>2021-08-14 12:50:14 +0200
commit38ea706182bbb8981eb7496d41424a6c30e60bf0 (patch)
treed6689dd1f977fee1dea9062470c5a6fbaeee9627 /kanotix-irc
parent3335391ac1ae4cf848e07f769ff4124737bce80f (diff)
downloadkanotix-packages-38ea706182bbb8981eb7496d41424a6c30e60bf0.zip
kanotix-packages-38ea706182bbb8981eb7496d41424a6c30e60bf0.tar.gz
Rework handling for ssl port
oftc does not support port 7000 for ssl
Diffstat (limited to 'kanotix-irc')
-rwxr-xr-xkanotix-irc/kanotix-irc27
1 files changed, 15 insertions, 12 deletions
diff --git a/kanotix-irc/kanotix-irc b/kanotix-irc/kanotix-irc
index b61b620..b49b9db 100755
--- a/kanotix-irc/kanotix-irc
+++ b/kanotix-irc/kanotix-irc
@@ -13,13 +13,18 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
+USE_SSL=false # will be set through FLL_IRC_PORT used
# override tool behaviour through distro-defaults
-FLL_IRC_SERVER="irc.freenode.net"
-FLL_IRC_PORT="6667"
+FLL_IRC_SERVER="irc.oftc.net"
+FLL_IRC_PORT="6697"
FLL_IRC_CHANNEL="#kanotix"
FLL_DISTRO_NAME="Kanotix"
[ -r /etc/default/distro ] && . /etc/default/distro
+if [ "$FLL_IRC_PORT" = "6697" -o "$FLL_IRC_PORT" = "7000" -o "$FLL_IRC_PORT" = "7070" -o "$FLL_IRC_PORT" = "9999" ]; then
+ USE_SSL=true
+fi
+
# define user settings
NICK="Web-${FLL_DISTRO_NAME}$(mawk 'BEGIN{print int(1000 * rand())}')"
FALLBACK_USER="$(getent passwd 1000 | cut -d\: -f1)"
@@ -77,9 +82,9 @@ kanotix_irssi()
CTCPS=0
if [ -e /etc/kanotix-version ]; then
- QUITMSG="$(< /etc/kanotix-version) | http://www.kanotix.com"
+ QUITMSG="$(< /etc/kanotix-version) | http://kanotix.com"
else
- QUITMSG="http://www.kanotix.com"
+ QUITMSG="http://kanotix.com"
fi
cat <<_EOF_ >"$IRSSICFG/config"
@@ -91,7 +96,7 @@ servers = (
autoconnect = "yes";
_EOF_
# if ssl port configured then add ssl options
- if [ $FLL_IRC_PORT = "7000" ]; then
+ if $USE_SSL; then
cat <<_EOF_ >>"$IRSSICFG/config"
use_ssl = "yes";
ssl_verify = "yes";
@@ -362,7 +367,7 @@ E=UTF-8 (Unicode)
F=63
_EOF_
# if ssl port configured then add ssl options
- if [ $FLL_IRC_PORT = "7000" ]; then
+ if $USE_SSL; then
cat <<_EOF_ >>"$XCHATCFG/servlist_.conf"
D=1
_EOF_
@@ -372,8 +377,7 @@ D=0
_EOF_
fi
cat <<_EOF_ >>"$XCHATCFG/servlist_.conf"
-S=irc.freenode.net/$FLL_IRC_PORT
-S=irc.freenode.net/+7000
+S=$FLL_IRC_SERVER/$FLL_IRC_PORT
_EOF_
cat <<_EOF_ >"$XCHATCFG/commands.conf"
@@ -420,7 +424,7 @@ E=UTF-8 (Unicode)
F=63
_EOF_
# if ssl port configured then add ssl options
- if [ $FLL_IRC_PORT = "7000" ]; then
+ if $USE_SSL; then
cat <<_EOF_ >>"$HEXCHATCFG/servlist.conf"
D=1
_EOF_
@@ -430,8 +434,7 @@ D=0
_EOF_
fi
cat <<_EOF_ >>"$HEXCHATCFG/servlist.conf"
-S=irc.freenode.net/$FLL_IRC_PORT
-S=irc.freenode.net/+7000
+S=$FLL_IRC_SERVER/$FLL_IRC_PORT
_EOF_
cat <<_EOF_ >"$HEXCHATCFG/commands.conf"
@@ -523,7 +526,7 @@ if [ -z "$DISPLAY" ]; then
else
# X11
if [ -x "$KONVERSATION" ]; then
- if [ $FLL_IRC_PORT = "7000" ]; then
+ if $USE_SSL; then
exec "$KONVERSATION" --server "$FLL_IRC_SERVER" --ssl --port "$FLL_IRC_PORT" --channel "$FLL_IRC_CHANNEL" --nick "$NICK"
else
exec "$KONVERSATION" --server "$FLL_IRC_SERVER" --port "$FLL_IRC_PORT" --channel "$FLL_IRC_CHANNEL" --nick "$NICK"