ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/src/server.c
(Generate patch)

Comparing ircd-hybrid-8/src/s_serv.c (file contents):
Revision 1413 by michael, Sat May 26 08:25:12 2012 UTC vs.
Revision 1472 by michael, Sun Jul 22 12:03:18 2012 UTC

# Line 404 | Line 404 | check_server(const char *name, struct Cl
404  
405    assert(client_p != NULL);
406  
407 –  if (client_p == NULL)
408 –    return(error);
409 –
410 –  if (strlen(name) > HOSTLEN)
411 –    return(-4);
412 –
407    /* loop through looking for all possible connect items that might work */
408    DLINK_FOREACH(ptr, server_items.head)
409    {
# Line 427 | Line 421 | check_server(const char *name, struct Cl
421          match(aconf->host, client_p->sockhost))
422      {
423        error = -2;
430 –      {
431 –        /* A NULL password is as good as a bad one */
432 –        if (EmptyString(client_p->localClient->passwd))
433 –          return(-2);
434 –
435 –        /* code in s_conf.c should not have allowed this to be NULL */
436 –        if (aconf->passwd == NULL)
437 –          return(-2);
424  
425 <        if (IsConfEncrypted(aconf))
426 <        {
427 <          if (strcmp(aconf->passwd,
428 <              (const char *)crypt(client_p->localClient->passwd,
443 <                                  aconf->passwd)) == 0)
444 <            server_conf = conf;
445 <        }
446 <        else
447 <        {
448 <          if (strcmp(aconf->passwd, client_p->localClient->passwd) == 0)
449 <            server_conf = conf;
450 <        }
451 <      }
425 >      if (!match_conf_password(client_p->localClient->passwd, aconf))
426 >        return -2;
427 >
428 >      server_conf = conf;
429      }
430    }
431  
# Line 460 | Line 437 | check_server(const char *name, struct Cl
437    server_aconf = map_to_conf(server_conf);
438  
439    if (!IsConfTopicBurst(server_aconf))
463 –  {
464 –    ClearCap(client_p, CAP_TB);
440      ClearCap(client_p, CAP_TBURST);
466 –  }
441  
442    if (aconf != NULL)
443    {
# Line 670 | Line 644 | sendnick_TS(struct Client *client_p, str
644  
645    if (IsConfAwayBurst((struct AccessItem *)map_to_conf(client_p->localClient->confs.head->data)))
646      if (!EmptyString(target_p->away))
647 <      sendto_one(client_p, ":%s AWAY :%s", target_p->name,
647 >      sendto_one(client_p, ":%s AWAY :%s", ID_or_name(target_p, client_p),
648                   target_p->away);
649  
650   }
# Line 795 | Line 769 | server_estab(struct Client *client_p)
769       */
770  
771      send_capabilities(client_p, aconf,
772 <      (IsConfTopicBurst(aconf) ? CAP_TBURST|CAP_TB : 0));
772 >      (IsConfTopicBurst(aconf) ? CAP_TBURST : 0));
773  
774      sendto_one(client_p, "SERVER %s 1 :%s%s",
775                 me.name, ConfigServerHide.hidden ? "(H) " : "", me.info);
# Line 1014 | Line 988 | burst_all(struct Client *client_p)
988        burst_members(client_p, chptr);
989        send_channel_modes(client_p, chptr);
990  
991 <      if (IsCapable(client_p, CAP_TBURST) ||
1018 <          IsCapable(client_p, CAP_TB))
991 >      if (IsCapable(client_p, CAP_TBURST))
992          send_tb(client_p, chptr);
993      }
994    }
# Line 1047 | Line 1020 | burst_all(struct Client *client_p)
1020   *              - pointer to channel
1021   * output       - NONE
1022   * side effects - Called on a server burst when
1023 < *                server is CAP_TB|CAP_TBURST capable
1023 > *                server is CAP_TBURST capable
1024   */
1025   static void
1026   send_tb(struct Client *client_p, struct Channel *chptr)
# Line 1066 | Line 1039 | send_tb(struct Client *client_p, struct
1039     * for further information   -Michael
1040     */
1041    if (chptr->topic_time != 0)
1042 <  {
1043 <    if (IsCapable(client_p, CAP_TBURST))
1044 <      sendto_one(client_p, ":%s TBURST %lu %s %lu %s :%s",
1045 <                 me.name, (unsigned long)chptr->channelts, chptr->chname,
1046 <                 (unsigned long)chptr->topic_time,
1047 <                 chptr->topic_info,
1075 <                 chptr->topic);
1076 <    else if (IsCapable(client_p, CAP_TB))
1077 <      sendto_one(client_p, ":%s TB %s %lu %s :%s",
1078 <                 me.name, chptr->chname,
1079 <                 (unsigned long)chptr->topic_time,
1080 <                 chptr->topic_info, chptr->topic);
1081 <  }
1042 >    sendto_one(client_p, ":%s TBURST %lu %s %lu %s :%s",
1043 >               ID_or_name(&me, client_p),
1044 >               (unsigned long)chptr->channelts, chptr->chname,
1045 >               (unsigned long)chptr->topic_time,
1046 >               chptr->topic_info,
1047 >               chptr->topic);
1048   }
1049  
1050   /* burst_members()
# Line 1356 | Line 1322 | finish_ssl_server_handshake(struct Clien
1322                 aconf->spasswd, TS_CURRENT, me.id);
1323  
1324    send_capabilities(client_p, aconf,
1325 <                   (IsConfTopicBurst(aconf) ? CAP_TBURST|CAP_TB : 0));
1325 >                   (IsConfTopicBurst(aconf) ? CAP_TBURST : 0));
1326  
1327    sendto_one(client_p, "SERVER %s 1 :%s%s",
1328               me.name, ConfigServerHide.hidden ? "(H) " : "",
# Line 1518 | Line 1484 | serv_connect_callback(fde_t *fd, int sta
1484                 aconf->spasswd, TS_CURRENT, me.id);
1485  
1486    send_capabilities(client_p, aconf,
1487 <                   (IsConfTopicBurst(aconf) ? CAP_TBURST|CAP_TB : 0));
1487 >                   (IsConfTopicBurst(aconf) ? CAP_TBURST : 0));
1488  
1489    sendto_one(client_p, "SERVER %s 1 :%s%s",
1490               me.name, ConfigServerHide.hidden ? "(H) " : "",

Diff Legend

– Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)