summaryrefslogtreecommitdiff
path: root/src/protocol
diff options
context:
space:
mode:
authorcyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-16 19:31:31 +0000
committercyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864>2008-11-16 19:31:31 +0000
commitffbcff160474cd45fbcbbadaff32f38e1d7fea71 (patch)
tree4155ce7bb17b63cc1bdf40a99a89c1b34a66aef2 /src/protocol
parent72a4c7e6c7a4187bfee58bdbf3c235f2b0ae44c7 (diff)
Added support for multiple uplink blocks in the new config.
Moved the type and id directives from the uplink block to the serverinfo block. Small config fixes. git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1746 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/protocol')
-rw-r--r--src/protocol/bahamut.c4
-rw-r--r--src/protocol/inspircd11.c4
-rw-r--r--src/protocol/inspircd12.cpp10
-rw-r--r--src/protocol/ratbox.c4
-rw-r--r--src/protocol/unreal32.c4
5 files changed, 8 insertions, 18 deletions
diff --git a/src/protocol/bahamut.c b/src/protocol/bahamut.c
index 9effddb20..424a5da8b 100644
--- a/src/protocol/bahamut.c
+++ b/src/protocol/bahamut.c
@@ -721,9 +721,7 @@ class BahamutIRCdProto : public IRCDProto
void SendConnect()
{
me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
- if (servernum == 1) bahamut_cmd_pass(RemotePassword);
- else if (servernum == 2) bahamut_cmd_pass(RemotePassword2);
- else if (servernum == 3) bahamut_cmd_pass(RemotePassword3);
+ bahamut_cmd_pass(uplink_server->password);
bahamut_cmd_capab();
SendServer(ServerName, 1, ServerDesc);
bahamut_cmd_svinfo();
diff --git a/src/protocol/inspircd11.c b/src/protocol/inspircd11.c
index f66ef2f2b..043e169f1 100644
--- a/src/protocol/inspircd11.c
+++ b/src/protocol/inspircd11.c
@@ -606,9 +606,7 @@ class InspIRCdProto : public IRCDProto
void SendConnect()
{
- if (servernum == 1) inspircd_cmd_pass(RemotePassword);
- else if (servernum == 2) inspircd_cmd_pass(RemotePassword2);
- else if (servernum == 3) inspircd_cmd_pass(RemotePassword3);
+ inspircd_cmd_pass(uplink_server->password);
SendServer(ServerName, 0, ServerDesc);
send_cmd(NULL, "BURST");
send_cmd(ServerName, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, ServerName, ircd->name, version_flags, EncModule, version_build);
diff --git a/src/protocol/inspircd12.cpp b/src/protocol/inspircd12.cpp
index fd48fb924..51c614a70 100644
--- a/src/protocol/inspircd12.cpp
+++ b/src/protocol/inspircd12.cpp
@@ -609,9 +609,7 @@ class InspIRCdProto : public IRCDProto
void SendConnect()
{
- if (servernum == 1) inspircd_cmd_pass(RemotePassword);
- else if (servernum == 2) inspircd_cmd_pass(RemotePassword2);
- else if (servernum == 3) inspircd_cmd_pass(RemotePassword3);
+ inspircd_cmd_pass(uplink_server->password);
SendServer(ServerName, 0, ServerDesc);
send_cmd(NULL, "BURST");
send_cmd(TS6SID, "VERSION :Anope-%s %s :%s - %s (%s) -- %s", version_number, ServerName, ircd->name, version_flags, EncModule, version_build);
@@ -728,16 +726,16 @@ int anope_event_mode(const char *source, int ac, const char **av)
*/
User *u = find_byuid(source);
User *u2 = find_byuid(av[0]);
-
+
// This can happen with server-origin modes.
if (u == NULL)
u = u2;
-
+
// drop it like fire.
// most likely situation was
if (u == NULL || u2 == NULL)
return MOD_CONT;
-
+
av[0] = u2->nick;
do_umode(u->nick, ac, av);
}
diff --git a/src/protocol/ratbox.c b/src/protocol/ratbox.c
index bfceeab0c..eca562c54 100644
--- a/src/protocol/ratbox.c
+++ b/src/protocol/ratbox.c
@@ -595,9 +595,7 @@ class RatboxProto : public IRCDTS6Proto
{
/* Make myself known to myself in the serverlist */
me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, TS6SID);
- if (servernum == 1) ratbox_cmd_pass(RemotePassword);
- else if (servernum == 2) ratbox_cmd_pass(RemotePassword2);
- else if (servernum == 3) ratbox_cmd_pass(RemotePassword3);
+ ratbox_cmd_pass(uplink_server->password);
ratbox_cmd_capab();
SendServer(ServerName, 1, ServerDesc);
ratbox_cmd_svinfo();
diff --git a/src/protocol/unreal32.c b/src/protocol/unreal32.c
index 5a820f3aa..c0ee75c6c 100644
--- a/src/protocol/unreal32.c
+++ b/src/protocol/unreal32.c
@@ -739,9 +739,7 @@ class UnrealIRCdProto : public IRCDProto
if (Numeric) me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, Numeric);
else me_server = new_server(NULL, ServerName, ServerDesc, SERVER_ISME, NULL);
unreal_cmd_capab();
- if (servernum == 1) unreal_cmd_pass(RemotePassword);
- else if (servernum == 2) unreal_cmd_pass(RemotePassword2);
- else if (servernum == 3) unreal_cmd_pass(RemotePassword3);
+ unreal_cmd_pass(uplink_server->password);
SendServer(ServerName, 1, ServerDesc);
}