mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
fixup! [temp] Checkpoint test.
This commit is contained in:
parent
50e38b5a82
commit
be48466ef3
5 changed files with 33 additions and 28 deletions
|
@ -39,6 +39,8 @@ IRCD_EXCEPTION(client_error, disconnected)
|
|||
struct sock;
|
||||
struct client;
|
||||
|
||||
extern client *me;
|
||||
|
||||
std::shared_ptr<const client> shared_from(const client &);
|
||||
std::shared_ptr<client> shared_from(client &);
|
||||
std::weak_ptr<const client> weak_from(const client &);
|
||||
|
|
|
@ -34,9 +34,8 @@
|
|||
#ifdef __cplusplus
|
||||
namespace ircd {
|
||||
|
||||
extern bool debugmode;
|
||||
extern std::shared_ptr<client> me;
|
||||
extern bool main_exited;
|
||||
extern bool debugmode; // Set by command line to indicate debug behavior
|
||||
extern bool main_exited; // Set when main context has finished.
|
||||
|
||||
// Set callback for when IRCd's main context has completed.
|
||||
using main_exit_cb = std::function<void ()>;
|
||||
|
@ -62,6 +61,7 @@ void stop();
|
|||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace ircd {
|
||||
|
@ -69,11 +69,11 @@ namespace ircd {
|
|||
|
||||
struct SetOptions
|
||||
{
|
||||
int maxclients; /* max clients allowed */
|
||||
int autoconn; /* autoconn enabled for all servers? */
|
||||
int maxclients; // max clients allowed
|
||||
int autoconn; // autoconn enabled for all servers?
|
||||
|
||||
int floodcount; /* Number of messages in 1 second */
|
||||
int ident_timeout; /* timeout for identd lookups */
|
||||
int floodcount; // Number of messages in 1 second
|
||||
int ident_timeout; // timeout for identd lookups
|
||||
|
||||
int spam_num;
|
||||
int spam_time;
|
||||
|
@ -84,15 +84,14 @@ struct SetOptions
|
|||
|
||||
struct Counter
|
||||
{
|
||||
int oper; /* Opers */
|
||||
int total; /* total clients */
|
||||
int invisi; /* invisible clients */
|
||||
int max_loc; /* MAX local clients */
|
||||
int max_tot; /* MAX global clients */
|
||||
unsigned long totalrestartcount; /* Total client count ever */
|
||||
int oper; // Opers
|
||||
int total; // total clients
|
||||
int invisi; // invisible clients
|
||||
int max_loc; // MAX local clients
|
||||
int max_tot; // MAX global clients
|
||||
unsigned long totalrestartcount; // Total client count ever
|
||||
};
|
||||
|
||||
/*
|
||||
extern struct SetOptions GlobalSetOptions;
|
||||
|
||||
extern volatile sig_atomic_t dorehash;
|
||||
|
@ -132,7 +131,8 @@ extern int maxconnections;
|
|||
void restart(const char *) __attribute__((noreturn));
|
||||
void ircd_shutdown() __attribute__((noreturn));
|
||||
void server_reboot(void) __attribute__((noreturn));
|
||||
*/
|
||||
|
||||
} // namespace ircd
|
||||
#endif // __cplusplus
|
||||
|
||||
*/
|
||||
|
|
|
@ -44,6 +44,7 @@ struct client
|
|||
~client() noexcept;
|
||||
};
|
||||
|
||||
client *me;
|
||||
std::unique_ptr<db::handle> client_db;
|
||||
clist client_list;
|
||||
|
||||
|
|
|
@ -76,11 +76,13 @@ try
|
|||
|
||||
// Translate to oldconf and linefeed
|
||||
bootstrap();
|
||||
/*
|
||||
newconf::translate(newconf::current, []
|
||||
(const std::string &line)
|
||||
{
|
||||
execute(line);
|
||||
});
|
||||
*/
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
|
|
22
ircd/ircd.cc
22
ircd/ircd.cc
|
@ -30,12 +30,12 @@
|
|||
namespace ircd
|
||||
{
|
||||
bool debugmode; // set by command line
|
||||
|
||||
boost::asio::io_service *ios; // user's io service
|
||||
std::shared_ptr<client> me; // That's me
|
||||
main_exit_cb main_exit_func; // Called when main context exits
|
||||
bool main_exited; // Set when IRCd is finished
|
||||
|
||||
bool main_finish; // Set by stop() to request main context exit
|
||||
bool main_exited; // Set when IRCd is finished
|
||||
main_exit_cb main_exit_func; // Called when main context exits
|
||||
ctx::ctx *main_context; // Reference to main context
|
||||
|
||||
void seed_random();
|
||||
|
@ -235,12 +235,12 @@ rb_dlink_list global_client_list;
|
|||
*/
|
||||
|
||||
/* unknown/client pointer lists */
|
||||
rb_dlink_list unknown_list; /* unknown clients ON this server only */
|
||||
rb_dlink_list lclient_list; /* local clients only ON this server */
|
||||
rb_dlink_list serv_list; /* local servers to this server ONLY */
|
||||
rb_dlink_list global_serv_list; /* global servers on the network */
|
||||
rb_dlink_list local_oper_list; /* our opers, duplicated in lclient_list */
|
||||
rb_dlink_list oper_list; /* network opers */
|
||||
//rb_dlink_list unknown_list; /* unknown clients ON this server only */
|
||||
//rb_dlink_list lclient_list; /* local clients only ON this server */
|
||||
//rb_dlink_list serv_list; /* local servers to this server ONLY */
|
||||
//rb_dlink_list global_serv_list; /* global servers on the network */
|
||||
//rb_dlink_list local_oper_list; /* our opers, duplicated in lclient_list */
|
||||
//rb_dlink_list oper_list; /* network opers */
|
||||
|
||||
/*
|
||||
char * const *myargv;
|
||||
|
@ -300,10 +300,10 @@ check_rehash(void *unused)
|
|||
* output - none
|
||||
* side effects - This sets all global set options needed
|
||||
*/
|
||||
/*
|
||||
static void
|
||||
initialize_global_set_options(void)
|
||||
{
|
||||
/*
|
||||
memset(&GlobalSetOptions, 0, sizeof(GlobalSetOptions));
|
||||
// memset( &ConfigFileEntry, 0, sizeof(ConfigFileEntry));
|
||||
|
||||
|
@ -337,8 +337,8 @@ initialize_global_set_options(void)
|
|||
rb_strlcpy(GlobalSetOptions.adminstring,
|
||||
ConfigFileEntry.default_adminstring,
|
||||
sizeof(GlobalSetOptions.adminstring));
|
||||
*/
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue