Add events for quiet
This commit is contained in:
parent
c766b24920
commit
3c4a154f0a
@ -392,6 +392,8 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick,
|
|||||||
session *sess;
|
session *sess;
|
||||||
server *serv = mr->serv;
|
server *serv = mr->serv;
|
||||||
char outbuf[4];
|
char outbuf[4];
|
||||||
|
char *cm = serv->chanmodes;
|
||||||
|
gboolean supportsq = FALSE;
|
||||||
|
|
||||||
outbuf[0] = sign;
|
outbuf[0] = sign;
|
||||||
outbuf[1] = 0;
|
outbuf[1] = 0;
|
||||||
@ -417,6 +419,17 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick,
|
|||||||
record_chan_mode (sess, sign, mode, arg);
|
record_chan_mode (sess, sign, mode, arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Is q a chanmode on this server? */
|
||||||
|
if (cm)
|
||||||
|
while (*cm)
|
||||||
|
{
|
||||||
|
if (*cm == ',')
|
||||||
|
break;
|
||||||
|
if (*cm == 'q')
|
||||||
|
supportsq = TRUE;
|
||||||
|
cm++;
|
||||||
|
}
|
||||||
|
|
||||||
switch (sign)
|
switch (sign)
|
||||||
{
|
{
|
||||||
case '+':
|
case '+':
|
||||||
@ -460,6 +473,12 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick,
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
EMIT_SIGNAL (XP_TE_CHANINVITE, sess, nick, arg, NULL, NULL, 0);
|
EMIT_SIGNAL (XP_TE_CHANINVITE, sess, nick, arg, NULL, NULL, 0);
|
||||||
return;
|
return;
|
||||||
|
case 'q':
|
||||||
|
if (!supportsq)
|
||||||
|
break; /* +q is owner on this server */
|
||||||
|
if (!quiet)
|
||||||
|
EMIT_SIGNAL (XP_TE_CHANQUIET, sess, nick, arg, NULL, NULL, 0);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case '-':
|
case '-':
|
||||||
@ -503,6 +522,12 @@ handle_single_mode (mode_run *mr, char sign, char mode, char *nick,
|
|||||||
if (!quiet)
|
if (!quiet)
|
||||||
EMIT_SIGNAL (XP_TE_CHANRMINVITE, sess, nick, arg, NULL, NULL, 0);
|
EMIT_SIGNAL (XP_TE_CHANRMINVITE, sess, nick, arg, NULL, NULL, 0);
|
||||||
return;
|
return;
|
||||||
|
case 'q':
|
||||||
|
if (!supportsq)
|
||||||
|
break; /* -q is owner on this server */
|
||||||
|
if (!quiet)
|
||||||
|
EMIT_SIGNAL (XP_TE_CHANUNQUIET, sess, nick, arg, NULL, NULL, 0);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1145,6 +1145,11 @@ static char * const pevt_chanban_help[] = {
|
|||||||
N_("The ban mask"),
|
N_("The ban mask"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char * const pevt_chanquiet_help[] = {
|
||||||
|
N_("The nick of the person who did the quieting"),
|
||||||
|
N_("The quiet mask"),
|
||||||
|
};
|
||||||
|
|
||||||
static char * const pevt_chanrmkey_help[] = {
|
static char * const pevt_chanrmkey_help[] = {
|
||||||
N_("The nick who removed the key"),
|
N_("The nick who removed the key"),
|
||||||
};
|
};
|
||||||
@ -1172,6 +1177,11 @@ static char * const pevt_chanunban_help[] = {
|
|||||||
N_("The ban mask"),
|
N_("The ban mask"),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static char * const pevt_chanunquiet_help[] = {
|
||||||
|
N_("The nick of the person of did the unquiet'ing"),
|
||||||
|
N_("The quiet mask"),
|
||||||
|
};
|
||||||
|
|
||||||
static char * const pevt_chanexempt_help[] = {
|
static char * const pevt_chanexempt_help[] = {
|
||||||
N_("The nick of the person who did the exempt"),
|
N_("The nick of the person who did the exempt"),
|
||||||
N_("The exempt mask"),
|
N_("The exempt mask"),
|
||||||
|
@ -148,6 +148,12 @@ pevt_chanop_help
|
|||||||
%C22*%O$t%C26$1%O gives channel operator status to %C18$2%O
|
%C22*%O$t%C26$1%O gives channel operator status to %C18$2%O
|
||||||
2
|
2
|
||||||
|
|
||||||
|
Channel Quiet
|
||||||
|
XP_TE_CHANQUIET
|
||||||
|
pevt_chanquiet_help
|
||||||
|
%C22*%O$t%C26$1%O sets quiet on %C18$2%O
|
||||||
|
2
|
||||||
|
|
||||||
Channel Remove Exempt
|
Channel Remove Exempt
|
||||||
XP_TE_CHANRMEXEMPT
|
XP_TE_CHANRMEXEMPT
|
||||||
pevt_chanrmexempt_help
|
pevt_chanrmexempt_help
|
||||||
@ -190,6 +196,12 @@ pevt_chanunban_help
|
|||||||
%C22*%O$t%C26$1%O removes ban on %C18$2%O
|
%C22*%O$t%C26$1%O removes ban on %C18$2%O
|
||||||
2
|
2
|
||||||
|
|
||||||
|
Channel UnQuiet
|
||||||
|
XP_TE_CHANUNQUIET
|
||||||
|
pevt_chanunquiet_help
|
||||||
|
%C22*%O$t%C26$1%O removes quiet on %C18$2%O
|
||||||
|
2
|
||||||
|
|
||||||
Channel Voice
|
Channel Voice
|
||||||
XP_TE_CHANVOICE
|
XP_TE_CHANVOICE
|
||||||
pevt_chanvoice_help
|
pevt_chanvoice_help
|
||||||
|
Loading…
Reference in New Issue
Block a user