mirror of
https://github.com/anope/anope.git
synced 2026-06-27 11:06:38 +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:
+24
-4
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user