This flag indicates, that the server supports the enhanced "xop channel
user modes", like channel owner, admin, and halfop. This information is
used to make sure that no unsupported CHANINFO commands are sent to
servers not supporting such mode prefixes, for example.
- S: The server supports the SERVICE command (on this link).
- S: The server supports the SERVICE command (on this link).
+- X: Server supports XOP channel modes (owner, admin, halfop) and supports
+ these user prefixes in CHANINFO commands, for example.
+
- Z: Compressed server links are supported by the server.
Example for a complete <flags> string: "ngircd|0.7.5:CZ".
- Z: Compressed server links are supported by the server.
Example for a complete <flags> string: "ngircd|0.7.5:CZ".
#ifdef IRCPLUS
/** Standard IRC+ flags. */
#ifdef IRCPLUS
/** Standard IRC+ flags. */
-# define IRCPLUSFLAGS "CHLMS"
+# define IRCPLUSFLAGS "CHLMSX"
#endif
/** Supported user modes. */
#endif
/** Supported user modes. */
CL2CHAN *cl2chan;
CLIENT *cl;
char str[LINE_LEN], *ptr;
CL2CHAN *cl2chan;
CLIENT *cl;
char str[LINE_LEN], *ptr;
- if (Conn_Options(Client_Conn(Client)) & CONN_RFC1459)
- njoin = false;
- else
- njoin = true;
+ /* Check features of remote server */
+ njoin = Conn_Options(Client_Conn(Client)) & CONN_RFC1459 ? false : true;
+ xop = strchr(Client_Flags(Client), 'X') ? true : false;
/* Get all the members of this channel */
cl2chan = Channel_FirstMember(Chan);
/* Get all the members of this channel */
cl2chan = Channel_FirstMember(Chan);
* (if user is channel operator or has voice) */
if (str[strlen(str) - 1] != ':')
strlcat(str, ",", sizeof(str));
* (if user is channel operator or has voice) */
if (str[strlen(str) - 1] != ':')
strlcat(str, ",", sizeof(str));
- if (strchr(Channel_UserModes(Chan, cl), 'q'))
+
+ /* Prepare user prefix (ChanOp, voiced, ...) */
+ if (xop && strchr(Channel_UserModes(Chan, cl), 'q'))
strlcat(str, "~", sizeof(str));
strlcat(str, "~", sizeof(str));
- if (strchr(Channel_UserModes(Chan, cl), 'a'))
+ if (xop && strchr(Channel_UserModes(Chan, cl), 'a'))
strlcat(str, "&", sizeof(str));
if (strchr(Channel_UserModes(Chan, cl), 'o'))
strlcat(str, "@", sizeof(str));
strlcat(str, "&", sizeof(str));
if (strchr(Channel_UserModes(Chan, cl), 'o'))
strlcat(str, "@", sizeof(str));
- if (strchr(Channel_UserModes(Chan, cl), 'h'))
+ if (xop && strchr(Channel_UserModes(Chan, cl), 'h'))
strlcat(str, "%", sizeof(str));
if (strchr(Channel_UserModes(Chan, cl), 'v'))
strlcat(str, "+", sizeof(str));
strlcat(str, "%", sizeof(str));
if (strchr(Channel_UserModes(Chan, cl), 'v'))
strlcat(str, "+", sizeof(str));