[IRC-Dev CVS] SF.net SVN: irc-dev:[209] ircd/trunk
Brought to you by:
zolty
|
From: <zo...@us...> - 2008-09-11 23:50:35
|
Revision: 209
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=209&view=rev
Author: zolty
Date: 2008-09-11 23:50:46 +0000 (Thu, 11 Sep 2008)
Log Message:
-----------
Tabla u de Uworld
Modified Paths:
--------------
ircd/trunk/include/ddb.h
ircd/trunk/ircd/ddb.c
ircd/trunk/ircd/ddb_events.c
ircd/trunk/ircd/s_conf.c
Modified: ircd/trunk/include/ddb.h
===================================================================
--- ircd/trunk/include/ddb.h 2008-09-11 23:21:45 UTC (rev 208)
+++ ircd/trunk/include/ddb.h 2008-09-11 23:50:46 UTC (rev 209)
@@ -61,6 +61,8 @@
#define DDB_OPERDB 'o'
/** Privileges table of %DDB Distributed Databases. */
#define DDB_PRIVSDB 'p'
+/** Uworld table of %DDB Distributed Databases. */
+#define DDB_UWORLDDB 'u'
/** Vhost table of %DDB Distributed Databases. */
#define DDB_VHOSTDB 'v'
/** Config table of %DDB Distributed Databases. */
Modified: ircd/trunk/ircd/ddb.c
===================================================================
--- ircd/trunk/ircd/ddb.c 2008-09-11 23:21:45 UTC (rev 208)
+++ ircd/trunk/ircd/ddb.c 2008-09-11 23:50:46 UTC (rev 209)
@@ -211,6 +211,7 @@
ddb_resident_table[DDB_NICKDB] = 32768;
ddb_resident_table[DDB_OPERDB] = 256;
ddb_resident_table[DDB_PRIVSDB] = 256;
+ ddb_resident_table[DDB_UWORLDDB] = 256;
ddb_resident_table[DDB_VHOSTDB] = 256;
ddb_resident_table[DDB_CONFIGDB] = 256;
Modified: ircd/trunk/ircd/ddb_events.c
===================================================================
--- ircd/trunk/ircd/ddb_events.c 2008-09-11 23:21:45 UTC (rev 208)
+++ ircd/trunk/ircd/ddb_events.c 2008-09-11 23:50:46 UTC (rev 209)
@@ -78,6 +78,7 @@
ddb_events_table[DDB_ILINEDB] = 0;
ddb_events_table[DDB_NICKDB] = ddb_events_table_n;
ddb_events_table[DDB_OPERDB] = ddb_events_table_o;
+ ddb_events_table[DDB_UWORLDDB] = 0;
ddb_events_table[DDB_VHOSTDB] = ddb_events_table_v;
ddb_events_table[DDB_CONFIGDB] = ddb_events_table_z;
Modified: ircd/trunk/ircd/s_conf.c
===================================================================
--- ircd/trunk/ircd/s_conf.c 2008-09-11 23:21:45 UTC (rev 208)
+++ ircd/trunk/ircd/s_conf.c 2008-09-11 23:50:46 UTC (rev 209)
@@ -933,6 +933,9 @@
{
struct DLink *lp;
struct SLink *sp;
+#if defined(DDB)
+ struct Ddb *ddb;
+#endif
assert(cli_serv(cptr) != NULL);
@@ -943,7 +946,15 @@
if (sp)
cli_serv(cptr)->flags |= SFLAG_UWORLD;
else
+ {
+#if defined(DDB)
+ ddb = ddb_find_key(DDB_UWORLDDB, cli_name(cptr));
+ if (ddb)
+ cli_serv(cptr)->flags |= SFLAG_UWORLD;
+ else
+#endif
cli_serv(cptr)->flags &= ~SFLAG_UWORLD;
+ }
for (lp = cli_serv(cptr)->down; lp; lp = lp->next)
update_uworld_flags(lp->value.cptr);
@@ -988,9 +999,19 @@
stats_uworld(struct Client* to, const struct StatDesc* sd, char* param)
{
struct SLink *sp;
+#if defined(DDB)
+ struct Ddb *ddb;
+#endif
for (sp = uworlds; sp; sp = sp->next)
send_reply(to, RPL_STATSULINE, sp->value.cp);
+
+#if defined(DDB)
+ for (ddb = ddb_iterator_first(DDB_UWORLDDB); ddb;
+ ddb = ddb_iterator_next())
+ send_reply(to, SND_EXPLICIT | RPL_STATSULINE, "U %s (setted by DDB)",
+ ddb_key(ddb));
+#endif
}
/** Free all memory associated with service mapping \a smap.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|