[IRC-Dev CVS] SF.net SVN: irc-dev:[210] ircd/trunk
Brought to you by:
zolty
|
From: <zo...@us...> - 2008-09-12 00:10:56
|
Revision: 210
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=210&view=rev
Author: zolty
Date: 2008-09-12 00:11:06 +0000 (Fri, 12 Sep 2008)
Log Message:
-----------
Tabla J de Jupes
Modified Paths:
--------------
ircd/trunk/include/ddb.h
ircd/trunk/ircd/ddb.c
ircd/trunk/ircd/ddb_events.c
ircd/trunk/ircd/hash.c
ircd/trunk/ircd/m_nick.c
Modified: ircd/trunk/include/ddb.h
===================================================================
--- ircd/trunk/include/ddb.h 2008-09-11 23:50:46 UTC (rev 209)
+++ ircd/trunk/include/ddb.h 2008-09-12 00:11:06 UTC (rev 210)
@@ -55,6 +55,8 @@
#define DDB_FEATUREDB 'f'
/** Ilines table of %DDB Distributed Databases. */
#define DDB_ILINEDB 'i'
+/** Jupes table of %DDB Distributed Databases. */
+#define DDB_JUPEDB 'j'
/** Nicks table of %DDB Distributed Databases. */
#define DDB_NICKDB 'n'
/** Operators table of %DDB Distributed Databases. */
Modified: ircd/trunk/ircd/ddb.c
===================================================================
--- ircd/trunk/ircd/ddb.c 2008-09-11 23:50:46 UTC (rev 209)
+++ ircd/trunk/ircd/ddb.c 2008-09-12 00:11:06 UTC (rev 210)
@@ -208,6 +208,7 @@
ddb_resident_table[DDB_CHANDB2] = 32768;
ddb_resident_table[DDB_FEATUREDB] = 256;
ddb_resident_table[DDB_ILINEDB] = 256;
+ ddb_resident_table[DDB_JUPEDB] = 256;
ddb_resident_table[DDB_NICKDB] = 32768;
ddb_resident_table[DDB_OPERDB] = 256;
ddb_resident_table[DDB_PRIVSDB] = 256;
Modified: ircd/trunk/ircd/ddb_events.c
===================================================================
--- ircd/trunk/ircd/ddb_events.c 2008-09-11 23:50:46 UTC (rev 209)
+++ ircd/trunk/ircd/ddb_events.c 2008-09-12 00:11:06 UTC (rev 210)
@@ -76,6 +76,7 @@
ddb_events_table[DDB_CHANDB2] = ddb_events_table_d;
ddb_events_table[DDB_FEATUREDB] = ddb_events_table_f;
ddb_events_table[DDB_ILINEDB] = 0;
+ ddb_events_table[DDB_JUPEDB] = 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;
Modified: ircd/trunk/ircd/hash.c
===================================================================
--- ircd/trunk/ircd/hash.c 2008-09-11 23:50:46 UTC (rev 209)
+++ ircd/trunk/ircd/hash.c 2008-09-12 00:11:06 UTC (rev 210)
@@ -487,10 +487,20 @@
void
stats_nickjupes(struct Client* to, const struct StatDesc* sd, char* param)
{
+#if defined(DDB)
+ struct Ddb *ddb;
+#endif
int i;
for (i = 0; i < JUPEHASHSIZE; i++)
if (jupeTable[i][0])
send_reply(to, RPL_STATSJLINE, jupeTable[i]);
+
+#if defined(DDB)
+ for (ddb = ddb_iterator_first(DDB_JUPEDB); ddb;
+ ddb = ddb_iterator_next())
+ send_reply(to, SND_EXPLICIT | RPL_STATSJLINE, "J %s :%s (setted by DDB)",
+ ddb_key(ddb), ddb_content(ddb));
+#endif
}
/** Send more channels to a client in mid-LIST.
Modified: ircd/trunk/ircd/m_nick.c
===================================================================
--- ircd/trunk/ircd/m_nick.c 2008-09-11 23:50:46 UTC (rev 209)
+++ ircd/trunk/ircd/m_nick.c 2008-09-12 00:11:06 UTC (rev 210)
@@ -197,6 +197,14 @@
return 0; /* NICK message ignored */
}
}
+
+ ddb = ddb_find_key(DDB_JUPEDB, nick);
+ if (ddb)
+ {
+ send_reply(sptr, SND_EXPLICIT | ERR_NICKNAMEINUSE, "%s :Nickname is juped: %s",
+ nick, ddb_content(ddb));
+ return 0; /* NICK message ignored */
+ }
#endif /* defined(DDB) */
/*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|