ref: f5174e6fdf6386a47d610991b449299c9fb392c7
parent: a90662c2e6110a2e9e2b182020fe86c61d73583b
author: stanley lieber <[email protected]>
date: Sat Sep 19 10:03:22 EDT 2015
ircrc: add -P option for server password (thanks, nick)
--- a/rc/bin/ircrc
+++ b/rc/bin/ircrc
@@ -10,6 +10,7 @@
nick=$user
pass=()
tls=0
+serverpass=()
fn sighup {
exit 'hang up'
@@ -30,6 +31,8 @@
}
fn work {
+ if(~ $#serverpass 1)
+ echo PASS $serverpass > $netdir/data
echo USER $user foo bar :$realname > $netdir/data
echo NICK $nick > $netdir/data
if (~ $#pass 1)
@@ -199,6 +202,9 @@
case -p
port=$2
shift
+ case -P
+ serverpass=$2
+ shift
case -r
realname=$2
shift
@@ -208,7 +214,7 @@
case -T
tls=1
case -*
- echo 'usage: ircrc [-p port] [-r realname] [-t target] [-n nick] [-T] [server]' >[1=2]
+ echo 'usage: ircrc [-p port] [-P server password] [-r realname] [-t target] [-n nick] [-T] [server]' >[1=2]
exit 'usage'
}
shift
--- a/sys/man/1/ircrc
+++ b/sys/man/1/ircrc
@@ -8,6 +8,10 @@
.I port
]
[
+.B -P
+.I server password
+]
+[
.B -r
.I realname
]
@@ -45,6 +49,9 @@
.BI -p " port
Change the default port
.RB ( 6667 ).
+.TP
+.BI -P " server password
+Specify a password for the remote server.
.TP
.BI -r " realname
Change the default name