+
+ len = strlen(Topic);
+ if (len < array_bytes(&Chan->topic))
+ array_free(&Chan->topic);
+
+ if (!array_copyb(&Chan->topic, Topic, len))
+ Log(LOG_WARNING, "could not set new Topic \"%s\" on %s: %s",
+ Topic, Chan->name, strerror(errno));
+
+ array_cat0(&Chan->topic);
+
+#ifndef STRICT_RFC
+ Chan->topic_time = time(NULL);
+ if (Client != NULL && Client_Type(Client) != CLIENT_SERVER)
+ strlcpy(Chan->topic_who, Client_ID(Client),
+ sizeof Chan->topic_who);
+ else
+ strlcpy(Chan->topic_who, DEFAULT_TOPIC_ID,
+ sizeof Chan->topic_who);
+#else
+ (void) Client;
+#endif