1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 04:16:39 +02:00

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
This commit is contained in:
cyberbotx
2008-11-16 19:31:31 +00:00
parent 72a4c7e6c7
commit ffbcff1604
11 changed files with 133 additions and 129 deletions
+2 -10
View File
@@ -227,15 +227,7 @@ char *sockstrerror(int error);
/**** config.c ****/
E char *RemoteServer;
E int RemotePort;
E char *RemotePassword;
E char *RemoteServer2;
E int RemotePort2;
E char *RemotePassword2;
E char *RemoteServer3;
E int RemotePort3;
E char *RemotePassword3;
E std::list<Uplink *> Uplinks;
E char *LocalHost;
E int LocalPort;
@@ -514,7 +506,7 @@ E void set_lastmask(User * u);
E void introduce_user(const char *user);
E int init_primary(int ac, char **av);
E int init_secondary(int ac, char **av);
E int servernum;
E Uplink *uplink_server;
/**** ircd.c ****/
E void pmodule_ircd_proto(IRCDProto *);
+24 -4
View File
@@ -229,6 +229,7 @@ extern int strncasecmp(const char *, const char *, size_t);
#include <string>
#include <map>
#include <exception>
#include <list>
/** This class can be used on its own to represent an exception, or derived to represent a module-specific exception.
* When a module whishes to abort, e.g. within a constructor, it should throw an exception using ModuleException or
@@ -351,7 +352,7 @@ class Extensible
* @return Returns true on success.
*/
bool Shrink(const std::string &key);
/** Get an extension item.
*
* @param key The key parameter is an arbitary string which identifies the extension data
@@ -372,12 +373,12 @@ class Extensible
return false;
}
}
/** Get an extension item.
*
* @param key The key parameter is an arbitary string which identifies the extension data
* @return Returns true if the item was found and false if it was not.
*
*
* This single-parameter version only checks if the key exists, it does nothing with
* the 'data' field and is probably only useful in conjunction with the single-parameter
* version of Extend().
@@ -1249,11 +1250,11 @@ struct capabinfo_ {
/*************************************************************************/
/*
* Forward declaration reqired, because the base IRCDProto class uses some crap from in here.
*/
class IRCDProto;
struct Uplink;
#include "extern.h"
class IRCDProto {
@@ -1517,4 +1518,23 @@ class IRCDTS6Proto : public IRCDProto
/*************************************************************************/
struct Uplink {
char *host;
int port;
char *password;
Uplink(const char *_host, int _port, const char *_password)
{
host = sstrdup(_host);
port = _port;
password = sstrdup(_password);
}
~Uplink()
{
free(host);
free(password);
}
};
/*************************************************************************/
#endif /* SERVICES_H */