Remove -W WEBIRC option

weechat-hashes
Curtis McEnroe 2019-09-16 17:41:18 -04:00
parent 2a8ee15858
commit 5cf4beec7a
No known key found for this signature in database
GPG Key ID: CEA2F97ADCFCD77C
4 changed files with 2 additions and 38 deletions

View File

@ -9,7 +9,6 @@
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl NPRv .Op Fl NPRv
.Op Fl W Ar pass
.Op Fl a Ar auth .Op Fl a Ar auth
.Op Fl h Ar host .Op Fl h Ar host
.Op Fl j Ar chan .Op Fl j Ar chan
@ -44,15 +43,6 @@ Restrict the use of the
.Ic /raw .Ic /raw
commands. commands.
. .
.It Fl W Ar pass
Send
.Cm WEBIRC
command with
.Ar pass .
See
.Sx ENVIRONMENT
for details.
.
.It Fl a Ar auth .It Fl a Ar auth
Authenticate with SASL PLAIN. Authenticate with SASL PLAIN.
.Ar auth .Ar auth
@ -350,20 +340,7 @@ Scroll window up by one line.
.El .El
. .
.Sh ENVIRONMENT .Sh ENVIRONMENT
.Bl -tag -width SSH_CLIENT .Bl -tag -width Ds
.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.
.It Ev USER .It Ev USER
The default nickname. The default nickname.
.El .El

3
chat.c
View File

@ -53,12 +53,11 @@ int main(int argc, char *argv[]) {
setlocale(LC_CTYPE, ""); setlocale(LC_CTYPE, "");
int opt; 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) { switch (opt) {
break; case 'N': self.notify = true; break; case 'N': self.notify = true;
break; case 'P': self.nick = prompt("Name: "); break; case 'P': self.nick = prompt("Name: ");
break; case 'R': self.limit = true; break; case 'R': self.limit = true;
break; case 'W': self.webp = dupe(optarg);
break; case 'a': self.auth = dupe(optarg); break; case 'a': self.auth = dupe(optarg);
break; case 'h': self.host = dupe(optarg); break; case 'h': self.host = dupe(optarg);
break; case 'j': self.join = dupe(optarg); break; case 'j': self.join = dupe(optarg);

1
chat.h
View File

@ -38,7 +38,6 @@ struct {
char *port; char *port;
char *auth; char *auth;
char *pass; char *pass;
char *webp;
char *nick; char *nick;
char *user; char *user;
char *real; char *real;

11
irc.c
View File

@ -74,17 +74,6 @@ int ircConnect(void) {
error = tls_connect_socket(client, sock, self.host); error = tls_connect_socket(client, sock, self.host);
if (error) errx(EX_PROTOCOL, "tls_connect: %s", tls_error(client)); 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.auth) ircFmt("CAP REQ :sasl\r\n");
if (self.pass) ircFmt("PASS :%s\r\n", self.pass); if (self.pass) ircFmt("PASS :%s\r\n", self.pass);
ircFmt("NICK %s\r\n", self.nick); ircFmt("NICK %s\r\n", self.nick);