+Sun Dec 1 16:32:03 CET 2002 Jochen Eisinger <c0ffee@penguin-breeder.org>
+
+ * Format CMODE +c and +h to display both the mode and the argument
+
Sun Dec 1 18:17:22 EET 2002 Pekka Riikonen <priikone@silcnet.org>
* Added test vectors and test programs for SHA-1, MD5,
if (mode & SILC_CHANNEL_MODE_SILENCE_OPERS)
strncat(string, "M", 1);
+
+ if (mode & SILC_CHANNEL_MODE_CIPHER)
+ strncat(string, "c", 1);
+
+ if (mode & SILC_CHANNEL_MODE_HMAC)
+ strncat(string, "h", 1);
if (mode & SILC_CHANNEL_MODE_CIPHER) {
- if (strlen(cipher) + strlen(string) < sizeof(string))
+ if (strlen(cipher) + strlen(string) + 1< sizeof(string)) {
+ strncat(string, " ", 1);
strncat(string, cipher, strlen(cipher));
+ }
}
if (mode & SILC_CHANNEL_MODE_HMAC) {
- if (strlen(hmac) + strlen(string) < sizeof(string))
+ if (strlen(hmac) + strlen(string) + 1< sizeof(string)) {
+ strncat(string, " ", 1);
strncat(string, hmac, strlen(hmac));
+ }
}
/* Rest of mode is ignored */