Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 1997 - 2002 Pekka Riikonen
+ Copyright (C) 1997 - 2003 Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (mode & SILC_CHANNEL_MODE_FOUNDER_AUTH)
strncat(string, "f", 1);
+ if (mode & SILC_CHANNEL_MODE_CHANNEL_AUTH)
+ strncat(string, "C", 1);
+
if (mode & SILC_CHANNEL_MODE_SILENCE_USERS)
strncat(string, "m", 1);
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 */
/* Return TRUE if `smaller' is smaller than `bigger'. */
-bool silc_compare_timeval(struct timeval *smaller,
+bool silc_compare_timeval(struct timeval *smaller,
struct timeval *bigger)
{
if ((smaller->tv_sec < bigger->tv_sec) ||