projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added basic ssl support to ircu
[ircu2.10.12-pk.git]
/
ircd
/
m_connect.c
diff --git
a/ircd/m_connect.c
b/ircd/m_connect.c
index b7dfd3ce5c91f06ec8a75c5ea23f9ca9a8c41c0f..ca4856d9d829bef15145e423787fb49ebaf0dbf0 100644
(file)
--- a/
ircd/m_connect.c
+++ b/
ircd/m_connect.c
@@
-99,7
+99,7
@@
#include "s_user.h"
#include "send.h"
#include "s_user.h"
#include "send.h"
-#include <assert.h>
+/* #include <assert.h> -- Now using assert in ircd_log.h */
#include <stdlib.h>
/*
#include <stdlib.h>
/*
@@
-185,13
+185,12
@@
int ms_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
/*
* save the old port
*/
/*
* save the old port
*/
- tmpport = aconf->port;
- if (port) {
- aconf->port = port;
- }
- else {
- port = aconf->port;
- }
+ tmpport = aconf->address.port;
+ if (port)
+ aconf->address.port = port;
+ else
+ port = aconf->address.port;
+
/*
* Notify all operators about remote connect requests
*/
/*
* Notify all operators about remote connect requests
*/
@@
-210,7
+209,7
@@
int ms_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :*** Connection to %s failed",
sptr, aconf->name);
}
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :*** Connection to %s failed",
sptr, aconf->name);
}
- aconf->port = tmpport;
+ aconf->
address.
port = tmpport;
return 0;
}
return 0;
}
@@
-248,15
+247,14
@@
int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
/*
* Only allow LocOps to make local CONNECTS --SRB
*/
/*
* Only allow LocOps to make local CONNECTS --SRB
*/
- return
0
;
+ return
send_reply(cptr, ERR_NOPRIVILEGES)
;
}
else {
struct Client* acptr2;
struct Client* acptr3;
if (!(acptr3 = find_match_server(parv[3]))) {
}
else {
struct Client* acptr2;
struct Client* acptr3;
if (!(acptr3 = find_match_server(parv[3]))) {
- send_reply(sptr, ERR_NOSUCHSERVER, parv[3]);
- return 0;
+ return send_reply(sptr, ERR_NOSUCHSERVER, parv[3]);
}
/*
}
/*
@@
-314,7
+312,7
@@
int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
* use the default from configuration structure. If missing
* from there, then use the precompiled default.
*/
* use the default from configuration structure. If missing
* from there, then use the precompiled default.
*/
- port = aconf->port;
+ port = aconf->
address.
port;
if (parc > 2) {
assert(0 != parv[2]);
if (0 == (port = atoi(parv[2]))) {
if (parc > 2) {
assert(0 != parv[2]);
if (0 == (port = atoi(parv[2]))) {
@@
-329,8
+327,8
@@
int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
return 0;
}
return 0;
}
- tmpport = aconf->port;
- aconf->port = port;
+ tmpport = aconf->
address.
port;
+ aconf->
address.
port = port;
if (connect_server(aconf, sptr)) {
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :*** Connecting to %s.", sptr,
if (connect_server(aconf, sptr)) {
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :*** Connecting to %s.", sptr,
@@
-340,6
+338,6
@@
int mo_connect(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :*** Connection to %s failed",
sptr, aconf->name);
}
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :*** Connection to %s failed",
sptr, aconf->name);
}
- aconf->port = tmpport;
+ aconf->
address.
port = tmpport;
return 0;
}
return 0;
}