return IRC_WriteErrClient(Client, ERR_NOPRIVILEGES_MSG,
Client_ID(Client));
- _IRC_ARGC_EQ_OR_RETURN_(Client, Req, 2)
-
/* Get prefix (origin); use the client if no prefix is given. */
if (Req->prefix)
prefix = Client_Search(Req->prefix);
IRC_SetPenalty(Client, 3);
- /* Bad number of arguments? */
- if (Req->argc > 1)
- return IRC_WriteErrClient(Client, ERR_NORECIPIENT_MSG,
- Client_ID(Client), Req->command);
-
_IRC_GET_SENDER_OR_RETURN_(from, Req, Client)
_IRC_GET_TARGET_SERVER_OR_RETURN_(target, Req, 0, from)
IRC_SetPenalty(Client, 2);
- _IRC_ARGC_LE_OR_RETURN_(Client, Req, 1)
-
if ((Req->argc == 0 && array_bytes(&Conf_Helptext) > 0)
|| (Req->argc >= 1 && strcasecmp(Req->argv[0], "Commands") != 0)) {
/* Help text available and requested */
return CONNECTED;
}
+/**
+ * Get pointer to a static string representing the connection "options".
+ *
+ * @param Idx Connection index.
+ * @return Pointer to static (global) string buffer.
+ */
static char *
#ifdef ZLIB
Option_String(CONN_ID Idx)
static char option_txt[8];
#ifdef ZLIB
UINT16 options;
-
- options = Conn_Options(Idx);
#endif
+ assert(Idx != NONE);
+
+ options = Conn_Options(Idx);
strcpy(option_txt, "F"); /* No idea what this means, but the
* original ircd sends it ... */
+#ifdef SSL_SUPPORT
+ if(options & CONN_SSL) /* SSL encrypted link */
+ strlcat(option_txt, "s", sizeof(option_txt));
+#endif
#ifdef ZLIB
- if(options & CONN_ZIP) /* zlib compression supported. */
- strcat(option_txt, "z");
+ if(options & CONN_ZIP) /* zlib compression enabled */
+ strlcat(option_txt, "z", sizeof(option_txt));
#endif
+ LogDebug(" *** %d: %d = %s", Idx, options, option_txt);
return option_txt;
} /* Option_String */
if (Req->argc > 2) {
if (!SendErrors)
return CONNECTED;
+ IRC_SetPenalty(Client, 2);
return IRC_WriteErrClient(Client, ERR_NEEDMOREPARAMS_MSG,
Client_ID(Client), Req->command);
}