/[svn]/ircd-hybrid/branches/8.1.x/modules/m_connect.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.1.x/modules/m_connect.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2342 by michael, Sun May 12 14:51:41 2013 UTC revision 2343 by michael, Wed Jul 3 18:13:17 2013 UTC
# Line 88  mo_connect(struct Client *client_p, stru Line 88  mo_connect(struct Client *client_p, stru
88    if ((target_p = hash_find_server(parv[1])))    if ((target_p = hash_find_server(parv[1])))
89    {    {
90      sendto_one(source_p,      sendto_one(source_p,
91                 ":%s NOTICE %s :Connect: Server %s already exists from %s.",                 ":%s NOTICE %s :Connect: Server %s already exists from %s.",
92                 me.name, source_p->name, parv[1], target_p->from->name);                 me.name, source_p->name, parv[1], target_p->from->name);
93      return;      return;
94    }    }
# Line 107  mo_connect(struct Client *client_p, stru Line 107  mo_connect(struct Client *client_p, stru
107      }      }
108    }    }
109    
110    /* Get port number from user, if given. If not specified,    /*
111       * Get port number from user, if given. If not specified,
112     * use the default form configuration structure. If missing     * use the default form configuration structure. If missing
113     * from there, then use the precompiled default.     * from there, then use the precompiled default.
114     */     */
# Line 144  mo_connect(struct Client *client_p, stru Line 145  mo_connect(struct Client *client_p, stru
145    
146    conf->port = port;    conf->port = port;
147    
148    /* at this point we should be calling connect_server with a valid    /*
149       * at this point we should be calling connect_server with a valid
150     * C:line and a valid port in the C:line     * C:line and a valid port in the C:line
151     */     */
152    if (serv_connect(conf, source_p))    if (serv_connect(conf, source_p))
# Line 163  mo_connect(struct Client *client_p, stru Line 165  mo_connect(struct Client *client_p, stru
165                 me.name, source_p->name, conf->name, conf->port);                 me.name, source_p->name, conf->name, conf->port);
166    }    }
167    
168    /* client is either connecting with all the data it needs or has been    /*
169       * Client is either connecting with all the data it needs or has been
170     * destroyed     * destroyed
171     */     */
172    conf->port = tmpport;    conf->port = tmpport;
# Line 189  ms_connect(struct Client *client_p, stru Line 192  ms_connect(struct Client *client_p, stru
192    struct MaskItem *conf = NULL;    struct MaskItem *conf = NULL;
193    const struct Client *target_p = NULL;    const struct Client *target_p = NULL;
194    
195    if (hunt_server(client_p, source_p,    if (hunt_server(client_p, source_p, ":%s CONNECT %s %s :%s",
196                    ":%s CONNECT %s %s :%s", 3, parc, parv) != HUNTED_ISME)                    3, parc, parv) != HUNTED_ISME)
197      return;      return;
198    
199    if (EmptyString(parv[1]))    if (EmptyString(parv[1]))
# Line 203  ms_connect(struct Client *client_p, stru Line 206  ms_connect(struct Client *client_p, stru
206    if ((target_p = hash_find_server(parv[1])))    if ((target_p = hash_find_server(parv[1])))
207    {    {
208      sendto_one(source_p,      sendto_one(source_p,
209                 ":%s NOTICE %s :Connect: Server %s already exists from %s.",                 ":%s NOTICE %s :Connect: Server %s already exists from %s.",
210                 me.name, source_p->name, parv[1], target_p->from->name);                 me.name, source_p->name, parv[1], target_p->from->name);
211      return;      return;
212    }    }
# Line 222  ms_connect(struct Client *client_p, stru Line 225  ms_connect(struct Client *client_p, stru
225      }      }
226    }    }
227    
228    /* Get port number from user, if given. If not specified,    /*
229       * Get port number from user, if given. If not specified,
230     * use the default form configuration structure. If missing     * use the default form configuration structure. If missing
231     * from there, then use the precompiled default.     * from there, then use the precompiled default.
232     */     */
# Line 232  ms_connect(struct Client *client_p, stru Line 236  ms_connect(struct Client *client_p, stru
236    {    {
237      port = atoi(parv[2]);      port = atoi(parv[2]);
238    
239      /* if someone sends port 0, and we have a config port.. use it */      /*
240         * if someone sends port 0, and we have a config port.. use it
241         */
242      if (port == 0 && conf->port)      if (port == 0 && conf->port)
243        port = conf->port;        port = conf->port;
244      else if (port <= 0)      else if (port <= 0)

Legend:
Removed from v.2342  
changed lines
  Added in v.2343

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28