Remove -W WEBIRC option
parent
2a8ee15858
commit
5cf4beec7a
25
catgirl.1
25
catgirl.1
|
@ -9,7 +9,6 @@
|
|||
.Sh SYNOPSIS
|
||||
.Nm
|
||||
.Op Fl NPRv
|
||||
.Op Fl W Ar pass
|
||||
.Op Fl a Ar auth
|
||||
.Op Fl h Ar host
|
||||
.Op Fl j Ar chan
|
||||
|
@ -44,15 +43,6 @@ Restrict the use of the
|
|||
.Ic /raw
|
||||
commands.
|
||||
.
|
||||
.It Fl W Ar pass
|
||||
Send
|
||||
.Cm WEBIRC
|
||||
command with
|
||||
.Ar pass .
|
||||
See
|
||||
.Sx ENVIRONMENT
|
||||
for details.
|
||||
.
|
||||
.It Fl a Ar auth
|
||||
Authenticate with SASL PLAIN.
|
||||
.Ar auth
|
||||
|
@ -350,20 +340,7 @@ Scroll window up by one line.
|
|||
.El
|
||||
.
|
||||
.Sh ENVIRONMENT
|
||||
.Bl -tag -width SSH_CLIENT
|
||||
.It Ev SSH_CLIENT
|
||||
If
|
||||
.Fl W
|
||||
is passed and
|
||||
.Ev SSH_CLIENT
|
||||
is set,
|
||||
the
|
||||
.Cm WEBIRC
|
||||
command is used
|
||||
to set the hostname
|
||||
to the first word of
|
||||
.Ev SSH_CLIENT ,
|
||||
usually the client IP address.
|
||||
.Bl -tag -width Ds
|
||||
.It Ev USER
|
||||
The default nickname.
|
||||
.El
|
||||
|
|
3
chat.c
3
chat.c
|
@ -53,12 +53,11 @@ int main(int argc, char *argv[]) {
|
|||
setlocale(LC_CTYPE, "");
|
||||
|
||||
int opt;
|
||||
while (0 < (opt = getopt(argc, argv, "NPRW:a:h:j:k:l:n:p:r:u:vw:"))) {
|
||||
while (0 < (opt = getopt(argc, argv, "NPRa:h:j:k:l:n:p:r:u:vw:"))) {
|
||||
switch (opt) {
|
||||
break; case 'N': self.notify = true;
|
||||
break; case 'P': self.nick = prompt("Name: ");
|
||||
break; case 'R': self.limit = true;
|
||||
break; case 'W': self.webp = dupe(optarg);
|
||||
break; case 'a': self.auth = dupe(optarg);
|
||||
break; case 'h': self.host = dupe(optarg);
|
||||
break; case 'j': self.join = dupe(optarg);
|
||||
|
|
1
chat.h
1
chat.h
|
@ -38,7 +38,6 @@ struct {
|
|||
char *port;
|
||||
char *auth;
|
||||
char *pass;
|
||||
char *webp;
|
||||
char *nick;
|
||||
char *user;
|
||||
char *real;
|
||||
|
|
11
irc.c
11
irc.c
|
@ -74,17 +74,6 @@ int ircConnect(void) {
|
|||
error = tls_connect_socket(client, sock, self.host);
|
||||
if (error) errx(EX_PROTOCOL, "tls_connect: %s", tls_error(client));
|
||||
|
||||
const char *ssh = getenv("SSH_CLIENT");
|
||||
if (self.webp && ssh) {
|
||||
int len = strlen(ssh);
|
||||
const char *sp = strchr(ssh, ' ');
|
||||
if (sp) len = sp - ssh;
|
||||
ircFmt(
|
||||
"WEBIRC %s %s %.*s %.*s\r\n",
|
||||
self.webp, self.user, len, ssh, len, ssh
|
||||
);
|
||||
}
|
||||
|
||||
if (self.auth) ircFmt("CAP REQ :sasl\r\n");
|
||||
if (self.pass) ircFmt("PASS :%s\r\n", self.pass);
|
||||
ircFmt("NICK %s\r\n", self.nick);
|
||||
|
|
Loading…
Reference in New Issue