Save invited channel for /join
parent
54251acae3
commit
44457f85c6
|
@ -1,4 +1,4 @@
|
||||||
.Dd June 18, 2021
|
.Dd July 2, 2021
|
||||||
.Dt CATGIRL 1
|
.Dt CATGIRL 1
|
||||||
.Os
|
.Os
|
||||||
.
|
.
|
||||||
|
@ -421,8 +421,10 @@ Set or clear your away status.
|
||||||
Send a command to ChanServ.
|
Send a command to ChanServ.
|
||||||
.It Ic /invite Ar nick
|
.It Ic /invite Ar nick
|
||||||
Invite a user to the channel.
|
Invite a user to the channel.
|
||||||
.It Ic /join Ar channel Op Ar key
|
.It Ic /join Op Ar channel Op Ar key
|
||||||
Join a channel.
|
Join the named channel,
|
||||||
|
the current channel,
|
||||||
|
or the channel you've been invited to.
|
||||||
.It Ic /list Op Ar channel
|
.It Ic /list Op Ar channel
|
||||||
List channels.
|
List channels.
|
||||||
.It Ic /me Op Ar action
|
.It Ic /me Op Ar action
|
||||||
|
|
1
chat.h
1
chat.h
|
@ -198,6 +198,7 @@ extern struct Self {
|
||||||
char *user;
|
char *user;
|
||||||
char *host;
|
char *host;
|
||||||
enum Color color;
|
enum Color color;
|
||||||
|
char *invited;
|
||||||
char *quit;
|
char *quit;
|
||||||
} self;
|
} self;
|
||||||
|
|
||||||
|
|
|
@ -149,6 +149,7 @@ static void commandMsg(uint id, char *params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void commandJoin(uint id, char *params) {
|
static void commandJoin(uint id, char *params) {
|
||||||
|
if (!params && id == Network) params = self.invited;
|
||||||
if (!params) params = idNames[id];
|
if (!params) params = idNames[id];
|
||||||
uint count = 1;
|
uint count = 1;
|
||||||
for (char *ch = params; *ch && *ch != ' '; ++ch) {
|
for (char *ch = params; *ch && *ch != ' '; ++ch) {
|
||||||
|
|
1
handle.c
1
handle.c
|
@ -479,6 +479,7 @@ static void handleQuit(struct Message *msg) {
|
||||||
static void handleInvite(struct Message *msg) {
|
static void handleInvite(struct Message *msg) {
|
||||||
require(msg, true, 2);
|
require(msg, true, 2);
|
||||||
if (!strcmp(msg->params[0], self.nick)) {
|
if (!strcmp(msg->params[0], self.nick)) {
|
||||||
|
set(&self.invited, msg->params[1]);
|
||||||
uiFormat(
|
uiFormat(
|
||||||
Network, filterCheck(Hot, Network, msg), tagTime(msg),
|
Network, filterCheck(Hot, Network, msg), tagTime(msg),
|
||||||
"\3%02d%s\3\tinvites you to \3%02d%s\3",
|
"\3%02d%s\3\tinvites you to \3%02d%s\3",
|
||||||
|
|
Loading…
Reference in New Issue