+#ifdef IRCPLUS
+static bool
+Synchronize_Lists( CLIENT *Client )
+{
+ CHANNEL *c;
+ struct list_head *head;
+ struct list_elem *elem;
+
+ assert( Client != NULL );
+
+ c = Channel_First();
+
+ while (c) {
+ head = Channel_GetListBans(c);
+
+ elem = Lists_GetFirst(head);
+ while (elem) {
+ if( ! IRC_WriteStrClient( Client, "MODE %s +b %s",
+ Channel_Name(c), Lists_GetMask(elem)))
+ {
+ return false;
+ }
+ elem = Lists_GetNext(elem);
+ }
+
+ head = Channel_GetListInvites(c);
+ elem = Lists_GetFirst(head);
+ while (elem) {
+ if( ! IRC_WriteStrClient( Client, "MODE %s +I %s",
+ Channel_Name( c ), Lists_GetMask(elem)))
+ {
+ return false;
+ }
+ elem = Lists_GetNext(elem);
+ }
+ c = Channel_Next(c);
+ }
+ return true;
+}
+#endif
+
+
+
+
+/**
+ * Handler for the IRC command "SERVER".
+ * See RFC 2813 section 4.1.2.
+ */
+GLOBAL bool