irc-dev-cvs Mailing List for IRC-Dev ircd development (Page 2)
Brought to you by:
zolty
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(22) |
Sep
|
Oct
(2) |
Nov
|
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(30) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(27) |
Dec
(17) |
| 2004 |
Jan
|
Feb
(4) |
Mar
|
Apr
(4) |
May
(8) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(14) |
Dec
(2) |
| 2005 |
Jan
(18) |
Feb
(2) |
Mar
(12) |
Apr
(18) |
May
(16) |
Jun
(3) |
Jul
(2) |
Aug
|
Sep
(3) |
Oct
(9) |
Nov
|
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(8) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(5) |
Oct
|
Nov
(3) |
Dec
(2) |
| 2008 |
Jan
(6) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(8) |
Aug
(14) |
Sep
(4) |
Oct
(11) |
Nov
(1) |
Dec
|
|
From: <zo...@us...> - 2008-08-15 18:53:59
|
Revision: 198
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=198&view=rev
Author: zolty
Date: 2008-08-15 18:54:05 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
Soporte de RESTART/DIE diferido
Modified Paths:
--------------
ircd/trunk/include/ircd.h
ircd/trunk/include/send.h
ircd/trunk/ircd/ddb.c
ircd/trunk/ircd/engine_devpoll.c
ircd/trunk/ircd/engine_epoll.c
ircd/trunk/ircd/engine_kqueue.c
ircd/trunk/ircd/engine_poll.c
ircd/trunk/ircd/engine_select.c
ircd/trunk/ircd/ircd.c
ircd/trunk/ircd/ircd_signal.c
ircd/trunk/ircd/m_die.c
ircd/trunk/ircd/m_restart.c
ircd/trunk/ircd/send.c
Modified: ircd/trunk/include/ircd.h
===================================================================
--- ircd/trunk/include/ircd.h 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/include/ircd.h 2008-08-15 18:54:05 UTC (rev 198)
@@ -45,6 +45,15 @@
int pid_fd; /**< File descriptor for process id file. */
};
+/** Describes pending exit. */
+struct PendingExit
+{
+ int restart; /**< Pending exit is for a restart. */
+ char* who; /**< Who initiated the exit. */
+ char* message; /**< Message to emit. */
+ time_t time; /**< Absolute time at which to exit. */
+};
+
/*
* Macros
*/
@@ -61,13 +70,21 @@
#define MAJOR_PROTOCOL "10" /**< Current protocol version. */
#define BASE_VERSION "u2.10" /**< Base name of IRC daemon version. */
+#define PEND_INT_LONG 300 /**< Length of long message interval. */
+#define PEND_INT_MEDIUM 60 /**< Length of medium message interval. */
+#define PEND_INT_SHORT 30 /**< Length of short message interval. */
+#define PEND_INT_END 10 /**< Length of the end message interval. */
+#define PEND_INT_LAST 1 /**< Length of last message interval. */
+
/*
* Proto types
*/
-extern void server_die(const char* message);
extern void server_panic(const char* message);
-extern void server_restart(const char* message);
+extern void exit_cancel(struct Client *who);
+extern void exit_schedule(int restart, time_t when, struct Client *who,
+ const char *message);
+
extern struct Client me;
extern time_t CurrentTime;
extern struct Client* GlobalClientList;
Modified: ircd/trunk/include/send.h
===================================================================
--- ircd/trunk/include/send.h 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/include/send.h 2008-08-15 18:54:05 UTC (rev 198)
@@ -139,4 +139,7 @@
unsigned int mask, time_t *rate,
const char *pattern, ...);
+/* Send server notice to all local users */
+extern void sendto_lusers(const char *pattern, ...);
+
#endif /* INCLUDED_send_h */
Modified: ircd/trunk/ircd/ddb.c
===================================================================
--- ircd/trunk/ircd/ddb.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/ddb.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -244,6 +244,7 @@
sendto_opmask(0, SNO_OLDSNO, "Lo: %d Hashtable_Lo: %d Hi: %d Hashtable_Hi %d",
lo, ddb_hashtable_lo[table], hi, ddb_hashtable_hi[table]);
+#if 0
if ((ddb_hashtable_hi[table] != hi) || (ddb_hashtable_lo[table] != lo))
{
struct DLink *lp;
@@ -266,6 +267,7 @@
}
}
else
+#endif
{
ddb_db_hash_write(table);
@@ -744,7 +746,7 @@
else if (IsServer(acptr))
sendcmdto_one(&me, CMD_ERROR, acptr, ":Terminated by %s", exitmsg);
}
- server_die(exitmsg);
+ exit_schedule(0, 0, 0, exitmsg);
}
/** Finalizes the %DDB subsystem.
Modified: ircd/trunk/ircd/engine_devpoll.c
===================================================================
--- ircd/trunk/ircd/engine_devpoll.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/engine_devpoll.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -316,7 +316,7 @@
timer_add(timer_init(&clear_error), error_clear, 0, TT_PERIODIC,
ERROR_EXPIRE_TIME);
else if (errors > DEVPOLL_ERROR_THRESHOLD) /* too many errors... */
- server_restart("too many /dev/poll errors");
+ exit_schedule(1, 0, 0, ""too many /dev/poll errors");
}
/* old code did a sleep(1) here; with usage these days,
* that may be too expensive
Modified: ircd/trunk/ircd/engine_epoll.c
===================================================================
--- ircd/trunk/ircd/engine_epoll.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/engine_epoll.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -278,7 +278,7 @@
timer_add(timer_init(&clear_error), error_clear, 0, TT_PERIODIC,
ERROR_EXPIRE_TIME);
else if (errors > EPOLL_ERROR_THRESHOLD)
- server_restart("too many epoll errors");
+ exit_schedule(1, 0, 0, "too many epoll errors");
}
continue;
}
Modified: ircd/trunk/ircd/engine_kqueue.c
===================================================================
--- ircd/trunk/ircd/engine_kqueue.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/engine_kqueue.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -345,7 +345,7 @@
timer_add(timer_init(&clear_error), error_clear, 0, TT_PERIODIC,
ERROR_EXPIRE_TIME);
else if (errors > KQUEUE_ERROR_THRESHOLD) /* too many errors... */
- server_restart("too many kevent errors");
+ exit_schedule(1, 0, 0, "too many kevent errors");
}
/* old code did a sleep(1) here; with usage these days,
* that may be too expensive
Modified: ircd/trunk/ircd/engine_poll.c
===================================================================
--- ircd/trunk/ircd/engine_poll.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/engine_poll.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -303,7 +303,7 @@
timer_add(timer_init(&clear_error), error_clear, 0, TT_PERIODIC,
ERROR_EXPIRE_TIME);
else if (errors > POLL_ERROR_THRESHOLD) /* too many errors... */
- server_restart("too many poll errors");
+ exit_schedule(1, 0, 0, "too many poll errors");
}
/* old code did a sleep(1) here; with usage these days,
* that may be too expensive
Modified: ircd/trunk/ircd/engine_select.c
===================================================================
--- ircd/trunk/ircd/engine_select.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/engine_select.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -296,7 +296,7 @@
timer_add(timer_init(&clear_error), error_clear, 0, TT_PERIODIC,
ERROR_EXPIRE_TIME);
else if (errors > SELECT_ERROR_THRESHOLD) /* too many errors... */
- server_restart("too many select errors");
+ exit_schedule(1, 0, 0, "too many select errors");
}
/* old code did a sleep(1) here; with usage these days,
* that may be too expensive
Modified: ircd/trunk/ircd/ircd.c
===================================================================
--- ircd/trunk/ircd/ircd.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/ircd.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -40,6 +40,7 @@
#include "ircd_log.h"
#include "ircd_reply.h"
#include "ircd_signal.h"
+#include "ircd_snprintf.h"
#include "ircd_string.h"
#include "jupe.h"
#include "list.h"
@@ -121,6 +122,7 @@
static struct Timer connect_timer; /**< timer structure for try_connections() */
static struct Timer ping_timer; /**< timer structure for check_pings() */
static struct Timer destruct_event_timer; /**< timer structure for exec_expired_destruct_events() */
+static struct Timer countdown_timer; /**< timer structure for exit_countdown() */
/** Daemon information. */
static struct Daemon thisServer = { 0, 0, 0, 0, 0, 0, -1 };
@@ -129,83 +131,290 @@
int running = 1;
-/*----------------------------------------------------------------------------
- * API: server_die
- *--------------------------------------------------------------------------*/
-/** Terminate the server with a message.
- * @param[in] message Message to log and send to operators.
+/**
+ * Perform a restart or die, sending and logging all necessary messages.
+ * @param[in] pe Pointer to structure describing pending exit.
*/
-void server_die(const char *message)
+static void pending_exit(struct PendingExit *pe)
{
- /* log_write will send out message to both log file and as server notice */
- log_write(LS_SYSTEM, L_CRIT, 0, "Server terminating: %s", message);
+ static int looping = 0;
+ enum LogLevel level = pe->restart ? L_WARNING : L_CRIT;
+ const char *what = pe->restart ? "restarting" : "terminating";
+
+ if (looping++) /* increment looping to prevent looping */
+ return;
+
+ if (pe->message) {
+ sendto_lusers("Server %s: %s", what, pe->message);
+
+ if (pe->who) { /* write notice to log */
+ log_write(LS_SYSTEM, level, 0, "%s %s server: %s", pe->who, what,
+ pe->message);
+ sendcmdto_serv(&me, CMD_SQUIT, 0, "%s 0 :%s %s server: %s",
+ cli_name(&me), pe->who, what, pe->message);
+ } else {
+ log_write(LS_SYSTEM, level, 0, "Server %s: %s", what, pe->message);
+ sendcmdto_serv(&me, CMD_SQUIT, 0, "%s 0 :Server %s: %s",
+ cli_name(&me), what, pe->message);
+ }
+ } else { /* just notify of the restart/termination */
+ sendto_lusers("Server %s...", what);
+
+ if (pe->who) { /* write notice to log */
+ log_write(LS_SYSTEM, level, 0, "%s %s server...", pe->who, what);
+ sendcmdto_serv(&me, CMD_SQUIT, 0, "%s 0 :%s %s server...",
+ cli_name(&me), pe->who, what);
+ } else {
+ log_write(LS_SYSTEM, level, 0, "Server %s...", what);
+ sendcmdto_serv(&me, CMD_SQUIT, 0, "%s 0 :Server %s...",
+ cli_name(&me), what);
+ }
+ }
+
+ /* now let's perform the restart or exit */
flush_connections(0);
- close_connections(1);
- running = 0;
-
+
#if defined(DDB)
ddb_end();
#endif
+
+ log_close();
+ close_connections(!pe->restart ||
+ !(thisServer.bootopt & (BOOT_TTY | BOOT_DEBUG | BOOT_CHKCONF)));
+
+ if (!pe->restart) { /* just set running = 0 */
+ running = 0;
+ return;
+ }
+
+ /* OK, so we're restarting... */
+ reap_children();
+
+ execv(SPATH, thisServer.argv); /* restart the server */
+
+ /* something failed; reopen the logs so we can complain */
+ log_reopen();
+
+ log_write(LS_SYSTEM, L_CRIT, 0, "execv(%s,%s) failed: %m", SPATH,
+ *thisServer.argv);
+
+ Debug((DEBUG_FATAL, "Couldn't restart server \"%s\": %s", SPATH,
+ (strerror(errno)) ? strerror(errno) : ""));
+ exit(8);
}
-/*----------------------------------------------------------------------------
- * API: server_panic
- *--------------------------------------------------------------------------*/
-/** Immediately terminate the server with a message.
- * @param[in] message Message to log, but not send to operators.
+/**
+ * Issue server notice warning about impending restart or die.
+ * @param[in] pe Pointer to structure describing pending exit.
+ * @param[in] until How long until the exit (approximately).
*/
-void server_panic(const char *message)
+static void countdown_notice(struct PendingExit *pe, time_t until)
{
- /* inhibit sending server notice--we may be panicking due to low memory */
- log_write(LS_SYSTEM, L_CRIT, LOG_NOSNOTICE, "Server panic: %s", message);
- flush_connections(0);
- log_close();
- close_connections(1);
- exit(1);
+ const char *what = pe->restart ? "restarting" : "terminating";
+ const char *units;
+
+ if (until >= 60) { /* measure in minutes */
+ until /= 60; /* so convert it to minutes */
+ units = (until == 1) ? "minute" : "minutes";
+ } else
+ units = (until == 1) ? "second" : "seconds";
+
+ /* send the message */
+ if (pe->message)
+ sendto_lusers("Server %s in %d %s: %s", what, until, units, pe->message);
+ else
+ sendto_lusers("Server %s in %d %s...", what, until, units);
+}
+
+static void exit_countdown(struct Event *ev);
+
+/**
+ * Performs a delayed pending exit, issuing server notices as appropriate.
+ * Reschedules exit_countdown() as needed.
+ * @param[in] ev Timer event.
+ */
+static void _exit_countdown(struct PendingExit *pe, int do_notice)
+{
+ time_t total, next, approx;
+
+ if (CurrentTime >= pe->time) { /* time to do the exit */
+ pending_exit(pe);
+ return;
+ }
+
+ /* OK, we need to figure out how long to the next message and approximate
+ * how long until the actual exit.
+ */
+ total = pe->time - CurrentTime; /* how long until exit */
+
+#define t_adjust(interval, interval2) \
+ do { \
+ approx = next = total - (total % (interval)); \
+ if (next >= total - (interval2)) { \
+ next -= (interval); /* have to adjust next... */ \
+ if (next < (interval)) /* slipped into next interval */ \
+ next = (interval) - (interval2); \
+ } else /* have to adjust approx... */ \
+ approx += (interval); \
+ } while (0)
+
+ if (total > PEND_INT_LONG) /* in the long interval regime */
+ t_adjust(PEND_INT_LONG, PEND_INT_MEDIUM);
+ else if (total > PEND_INT_MEDIUM) /* in the medium interval regime */
+ t_adjust(PEND_INT_MEDIUM, PEND_INT_SHORT);
+ else if (total > PEND_INT_SHORT) /* in the short interval regime */
+ t_adjust(PEND_INT_SHORT, PEND_INT_END);
+ else if (total > PEND_INT_END) /* in the end interval regime */
+ t_adjust(PEND_INT_END, PEND_INT_LAST);
+ else if (total > PEND_INT_LAST) /* in the last message interval */
+ t_adjust(PEND_INT_LAST, PEND_INT_LAST);
+ else { /* next event is to actually exit */
+ next = 0;
+ approx = PEND_INT_LAST;
+ }
+
+ /* convert next to an absolute timestamp */
+ next = pe->time - next;
+ assert(next > CurrentTime);
+
+ /* issue the warning notices... */
+ if (do_notice)
+ countdown_notice(pe, approx);
+
+ /* reschedule the timer... */
+ timer_add(&countdown_timer, exit_countdown, pe, TT_ABSOLUTE, next);
}
-/*----------------------------------------------------------------------------
- * API: server_restart
- *--------------------------------------------------------------------------*/
-/** Restart the server with a message.
- * @param[in] message Message to log and send to operators.
+/**
+ * Timer callback for _exit_countdown().
+ * @param[in] ev Timer event.
*/
-void server_restart(const char *message)
+static void exit_countdown(struct Event *ev)
{
- static int restarting = 0;
+ if (ev_type(ev) == ET_DESTROY)
+ return; /* do nothing with destroy events */
+
+ assert(ET_EXPIRE == ev_type(ev));
+
+ /* perform the event we were called to do */
+ _exit_countdown(t_data(&countdown_timer), 1);
+}
- /* inhibit sending any server notices; we may be in a loop */
- log_write(LS_SYSTEM, L_WARNING, LOG_NOSNOTICE, "Restarting Server: %s",
- message);
- if (restarting++) /* increment restarting to prevent looping */
- return;
+/**
+ * Cancel a pending exit.
+ * @param[in] who Client cancelling the impending exit.
+ */
+void exit_cancel(struct Client *who)
+{
+ const char *what;
+ struct PendingExit *pe;
- sendto_opmask(0, SNO_OLDSNO, "Restarting server: %s", message);
- Debug((DEBUG_NOTICE, "Restarting server..."));
- flush_connections(0);
+ if (!t_onqueue(&countdown_timer))
+ return; /* it's not running... */
+
+ pe = t_data(&countdown_timer); /* get the pending exit data */
+ timer_del(&countdown_timer); /* delete the timer */
-#if defined(DDB)
- ddb_end();
-#endif
+ if (who) { /* explicitly issued cancellation */
+ /* issue a notice about the exit being canceled */
+ sendto_lusers("Server %s CANCELED",
+ what = (pe->restart ? "restart" : "termination"));
+
+ /* log the cancellation */
+ if (IsUser(who))
+ log_write(LS_SYSTEM, L_NOTICE, 0, "Server %s CANCELED by %s!%s@%s", what,
+ cli_name(who), cli_user(who)->username, cli_sockhost(who));
+ else
+ log_write(LS_SYSTEM, L_NOTICE, 0, "Server %s CANCELED by %s", what,
+ cli_name(who));
+ }
+
+ /* release the pending exit structure */
+ if (pe->who)
+ MyFree(pe->who);
+ if (pe->message)
+ MyFree(pe->message);
+ MyFree(pe);
- log_close();
+ /* Oh, and restore connections */
+ refuse = 0;
+}
- close_connections(!(thisServer.bootopt & (BOOT_TTY | BOOT_DEBUG | BOOT_CHKCONF)));
+/**
+ * Schedule a pending exit. Note that only real people issue delayed
+ * exits, so \a who should not be NULL if \a when is non-zero.
+ * @param[in] restart True if a restart is desired, false otherwise.
+ * @param[in] when Interval until the exit; 0 for immediate exit.
+ * @param[in] who Client issuing exit (or NULL).
+ * @param[in] message Message explaining exit.
+ */
+void exit_schedule(int restart, time_t when, struct Client *who,
+ const char *message)
+{
+ struct PendingExit *pe;
- reap_children();
+ /* first, let's cancel any pending exit */
+ exit_cancel(0);
+
+ /* now create a new pending exit */
+ pe = MyMalloc(sizeof(struct PendingExit));
+ pe->restart = restart;
+
+ pe->time = when + CurrentTime; /* make time absolute */
+ if (who) { /* save who issued it... */
+ if (IsUser(who)) {
+ char nuhbuf[NICKLEN + USERLEN + HOSTLEN + 3];
+ ircd_snprintf(0, nuhbuf, sizeof(nuhbuf), "%s!%s@%s", cli_name(who),
+ cli_user(who)->username, cli_sockhost(who));
+ DupString(pe->who, nuhbuf);
+ } else
+ DupString(pe->who, cli_name(who));
+ } else
+ pe->who = 0;
+ if (message) /* also save the message */
+ DupString(pe->message, message);
+ else
+ pe->message = 0;
- execv(SPATH, thisServer.argv);
+ /* let's refuse new connections... */
+ refuse = 1;
+
+ if (!when) { /* do it right now? */
+ pending_exit(pe);
+ return;
+ }
- /* Have to reopen since it has been closed above */
- log_reopen();
+ assert(who); /* only people issue delayed exits */
+
+ /* issue a countdown notice... */
+ countdown_notice(pe, when);
- log_write(LS_SYSTEM, L_CRIT, 0, "execv(%s,%s) failed: %m", SPATH,
- *thisServer.argv);
-
- Debug((DEBUG_FATAL, "Couldn't restart server \"%s\": %s",
- SPATH, (strerror(errno)) ? strerror(errno) : ""));
- exit(8);
+ /* log who issued the shutdown */
+ if (pe->message)
+ log_write(LS_SYSTEM, L_NOTICE, 0, "Delayed server %s issued by %s: %s",
+ restart ? "restart" : "termination", pe->who, pe->message);
+ else
+ log_write(LS_SYSTEM, L_NOTICE, 0, "Delayed server %s issued by %s...",
+ restart ? "restart" : "termination", pe->who);
+ /* and schedule the timer */
+ _exit_countdown(pe, 0);
}
+
+/*----------------------------------------------------------------------------
+ * API: server_panic
+ *--------------------------------------------------------------------------*/
+/** Immediately terminate the server with a message.
+ * @param[in] message Message to log, but not send to operators.
+ */
+void server_panic(const char *message)
+{
+ /* inhibit sending server notice--we may be panicking due to low memory */
+ log_write(LS_SYSTEM, L_CRIT, LOG_NOSNOTICE, "Server panic: %s", message);
+ flush_connections(0);
+ log_close();
+ close_connections(1);
+ exit(1);
+}
/*----------------------------------------------------------------------------
@@ -214,7 +423,7 @@
/** Handle out-of-memory condition. */
static void outofmemory(void) {
Debug((DEBUG_FATAL, "Out of memory: restarting server..."));
- server_restart("Out of Memory");
+ exit_schedule(1, 0, 0, "Out of Memory");
}
@@ -767,6 +976,7 @@
timer_add(timer_init(&connect_timer), try_connections, 0, TT_RELATIVE, 1);
timer_add(timer_init(&ping_timer), check_pings, 0, TT_RELATIVE, 1);
timer_add(timer_init(&destruct_event_timer), exec_expired_destruct_events, 0, TT_PERIODIC, 60);
+ timer_init(&countdown_timer);
CurrentTime = time(NULL);
Modified: ircd/trunk/ircd/ircd_signal.c
===================================================================
--- ircd/trunk/ircd/ircd_signal.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/ircd_signal.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -89,7 +89,7 @@
assert(SIGTERM == sig_signal(ev_signal(ev)));
assert(SIGTERM == ev_data(ev));
- server_die("received signal SIGTERM");
+ exit_schedule(0, 0, 0, "Received signal SIGTERM");
}
/** Signal callback for SIGHUP.
@@ -116,7 +116,7 @@
assert(SIGINT == sig_signal(ev_signal(ev)));
assert(SIGINT == ev_data(ev));
- server_restart("caught signal: SIGINT");
+ exit_schedule(1, 0, 0, "Received signal SIGINT");
}
/** Allocate a child callback record.
Modified: ircd/trunk/ircd/m_die.c
===================================================================
--- ircd/trunk/ircd/m_die.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/m_die.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -68,7 +68,7 @@
sendcmdto_one(&me, CMD_ERROR, acptr, ":Terminated by %s",
get_client_name(sptr, HIDE_IP));
}
- server_die("received DIE");
+ exit_schedule(0, 0, 0, "Received DIE");
return 0;
}
Modified: ircd/trunk/ircd/m_restart.c
===================================================================
--- ircd/trunk/ircd/m_restart.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/m_restart.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -52,7 +52,7 @@
return send_reply(sptr, ERR_NOPRIVILEGES);
log_write(LS_SYSTEM, L_NOTICE, 0, "Server RESTART by %#C", sptr);
- server_restart("received RESTART");
+ exit_schedule(1, 0, 0, "Received RESTART");
return 0;
}
Modified: ircd/trunk/ircd/send.c
===================================================================
--- ircd/trunk/ircd/send.c 2008-08-15 18:11:20 UTC (rev 197)
+++ ircd/trunk/ircd/send.c 2008-08-15 18:54:05 UTC (rev 198)
@@ -895,3 +895,32 @@
msgq_clean(mb);
}
+
+/** Send a server notice to all local users on this server.
+ * @param[in] pattern Format string for server notice.
+ */
+void sendto_lusers(const char *pattern, ...)
+{
+ struct VarData vd;
+ struct Client *cptr;
+ struct MsgBuf *mb;
+ int i;
+
+ /* Build the message we're going to send... */
+ vd.vd_format = pattern;
+ va_start(vd.vd_args, pattern);
+ mb = msgq_make(0, ":%s " MSG_NOTICE " * :*** Notice -- %v", cli_name(&me),
+ &vd);
+ va_end(vd.vd_args);
+
+ /* send it along */
+ for (i = 0; i <= HighestFd; i++) {
+ if (!(cptr = LocalClientArray[i]) || !IsUser(cptr))
+ continue; /* skip empty slots... */
+
+ send_buffer(cptr, mb, 1); /* send with high priority */
+ }
+
+ msgq_clean(mb); /* clean up after ourselves */
+}
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-08-15 18:11:13
|
Revision: 197
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=197&view=rev
Author: zolty
Date: 2008-08-15 18:11:20 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
Soporte de exempt en conexiones
Modified Paths:
--------------
ircd/trunk/include/ircd.h
ircd/trunk/include/listener.h
ircd/trunk/ircd/ircd.c
ircd/trunk/ircd/ircd_lexer.l
ircd/trunk/ircd/ircd_parser.y
ircd/trunk/ircd/listener.c
ircd/trunk/ircd/m_dbq.c
Modified: ircd/trunk/include/ircd.h
===================================================================
--- ircd/trunk/include/ircd.h 2008-08-15 12:57:37 UTC (rev 196)
+++ ircd/trunk/include/ircd.h 2008-08-15 18:11:20 UTC (rev 197)
@@ -80,5 +80,6 @@
extern int running;
extern int maxconnections;
extern int maxclients;
+extern int refuse;
#endif /* INCLUDED_ircd_h */
Modified: ircd/trunk/include/listener.h
===================================================================
--- ircd/trunk/include/listener.h 2008-08-15 12:57:37 UTC (rev 196)
+++ ircd/trunk/include/listener.h 2008-08-15 18:11:20 UTC (rev 197)
@@ -53,6 +53,8 @@
LISTEN_HIDDEN,
/** Port accepts only server connections. */
LISTEN_SERVER,
+ /** Port is exempt from connection prohibitions. */
+ LISTEN_EXEMPT,
/** Port listens for IPv4 connections. */
LISTEN_IPV4,
/** Port listens for IPv6 connections. */
@@ -85,6 +87,7 @@
#define listener_server(LISTENER) FlagHas(&(LISTENER)->flags, LISTEN_SERVER)
#define listener_active(LISTENER) FlagHas(&(LISTENER)->flags, LISTEN_ACTIVE)
+#define listener_exempt(LISTENER) FlagHas(&(LISTENER)->flags, LISTEN_EXEMPT)
#ifdef USE_SSL
#define listener_ssl(LISTENER) FlagHas(&(LISTENER)->flags, LISTEN_SSL)
#endif
Modified: ircd/trunk/ircd/ircd.c
===================================================================
--- ircd/trunk/ircd/ircd.c 2008-08-15 12:57:37 UTC (rev 196)
+++ ircd/trunk/ircd/ircd.c 2008-08-15 18:11:20 UTC (rev 197)
@@ -113,6 +113,7 @@
int debuglevel = -1; /**< Server debug level */
char *debugmode = ""; /**< Server debug level */
int maxconnections = MAXCONNECTIONS; /**< Maximum number of open files */
+int refuse = 0; /**< Refuse new connecting clients */
int maxclients = -1; /**< Maximum number of clients */
static char *dpath = DPATH; /**< Working directory for daemon */
static char *dbg_client; /**< Client specifier for chkconf */
Modified: ircd/trunk/ircd/ircd_lexer.l
===================================================================
--- ircd/trunk/ircd/ircd_lexer.l 2008-08-15 12:57:37 UTC (rev 196)
+++ ircd/trunk/ircd/ircd_lexer.l 2008-08-15 18:11:20 UTC (rev 197)
@@ -122,6 +122,7 @@
DIRECTOP return DIRECTOP;
DISPLAY return TPRIV_DISPLAY;
DNS return DNS;
+EXEMPT return EXEMPT;
FAST return FAST;
FEATURES return FEATURES;
FILE return TFILE;
Modified: ircd/trunk/ircd/ircd_parser.y
===================================================================
--- ircd/trunk/ircd/ircd_parser.y 2008-08-15 12:57:37 UTC (rev 196)
+++ ircd/trunk/ircd/ircd_parser.y 2008-08-15 18:11:20 UTC (rev 197)
@@ -199,6 +199,7 @@
%token OPER
%token VHOST
%token HIDDEN
+%token EXEMPT
%token SSLPORT
%token MOTD
%token JUPE
@@ -842,7 +843,7 @@
port = 0;
};
portitems: portitem portitems | portitem;
-portitem: portnumber | portvhost | portvhostnumber | portmask | portserver | porthidden | portssl;
+portitem: portnumber | portvhost | portvhostnumber | portmask | portserver | porthidden | portexempt | portssl;
portnumber: PORT '=' address_family NUMBER ';'
{
if ($4 < 1 || $4 > 65535) {
@@ -900,6 +901,14 @@
FlagClr(&listen_flags, LISTEN_HIDDEN);
};
+portexempt: EXEMPT '=' YES ';'
+{
+ FlagSet(&listen_flags, LISTEN_EXEMPT);
+} | EXEMPT '=' NO ';'
+{
+ FlagClr(&listen_flags, LISTEN_EXEMPT);
+};
+
portssl: SSLPORT '=' YES ';'
{
#ifdef USE_SSL
Modified: ircd/trunk/ircd/listener.c
===================================================================
--- ircd/trunk/ircd/listener.c 2008-08-15 12:57:37 UTC (rev 196)
+++ ircd/trunk/ircd/listener.c 2008-08-15 18:11:20 UTC (rev 197)
@@ -161,6 +161,8 @@
continue;
flags[len++] = 'H';
}
+ if (FlagHas(&listener->flags, LISTEN_EXEMPT))
+ flags[len++] = 'X';
if (FlagHas(&listener->flags, LISTEN_IPV4))
{
flags[len++] = '4';
@@ -501,7 +503,9 @@
if (fd >= maxclients)
{
++ServerStats->is_ref;
- send(fd, "ERROR :All connections in use\r\n", 32, 0);
+ /* 11111111112222222222 3 3 */
+ /* 12345678901234567890123456789 0 1 */
+ send(fd, "ERROR :All connections in use\r\n", 31, 0);
close(fd);
return;
}
@@ -513,6 +517,8 @@
if (!listener_active(listener))
{
++ServerStats->is_ref;
+ /* 11111111112222 2 2 */
+ /* 12345678901234567890123 4 5 */
send(fd, "ERROR :Use another port\r\n", 25, 0);
close(fd);
continue;
@@ -523,10 +529,24 @@
if (!ipmask_check(&addr.addr, &listener->mask, listener->mask_bits))
{
++ServerStats->is_ref;
+ /* 11111111112222 2 2 */
+ /* 12345678901234567890123 4 5 */
send(fd, "ERROR :Use another port\r\n", 25, 0);
close(fd);
continue;
}
+ /*
+ * check to see if server is shutting down.
+ */
+ if (refuse && !listener_exempt(listener))
+ {
+ ++ServerStats->is_ref;
+ /* 111111111122222222223 3 3 */
+ /* 123456789012345678901234567890 1 2 */
+ send(fd, "ERROR :Server is shutting down\r\n", 32, 0);
+ close(fd);
+ continue;
+ }
++ServerStats->is_ac;
/* nextping = CurrentTime; */
#ifdef USE_SSL
Modified: ircd/trunk/ircd/m_dbq.c
===================================================================
--- ircd/trunk/ircd/m_dbq.c 2008-08-15 12:57:37 UTC (rev 196)
+++ ircd/trunk/ircd/m_dbq.c 2008-08-15 18:11:20 UTC (rev 197)
@@ -72,7 +72,7 @@
sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Incorrect parameters. Format: DBQ [<server>] <Table> <Key>",
sptr);
- return need_more_params(sptr, "DBQ");;
+ return need_more_params(sptr, "DBQ");
}
if (parc == 3)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-08-15 12:57:28
|
Revision: 196
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=196&view=rev
Author: zolty
Date: 2008-08-15 12:57:37 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
fix wallops
Modified Paths:
--------------
ircd/trunk/ircd/m_dbq.c
Modified: ircd/trunk/ircd/m_dbq.c
===================================================================
--- ircd/trunk/ircd/m_dbq.c 2008-08-15 00:11:13 UTC (rev 195)
+++ ircd/trunk/ircd/m_dbq.c 2008-08-15 12:57:37 UTC (rev 196)
@@ -199,7 +199,7 @@
}
sendwallto_group(&me, WALL_WALLOPS, 0,
- "DBQ %c %s From %#C", table, key, sptr);
+ "DBQ %c %s From %#C", table, key, cptr);
log_write(LS_DDB, L_INFO, 0, "DBQ %c %s From %#C", table, key, cptr);
if (!ddb_table_is_resident(table))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-08-15 00:11:05
|
Revision: 195
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=195&view=rev
Author: zolty
Date: 2008-08-15 00:11:13 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
Soporte completo Tabla F
Modified Paths:
--------------
ircd/trunk/TODO.es
ircd/trunk/ircd/ddb_events.c
ircd/trunk/ircd/ircd_features.c
Modified: ircd/trunk/TODO.es
===================================================================
--- ircd/trunk/TODO.es 2008-08-14 21:11:51 UTC (rev 194)
+++ ircd/trunk/TODO.es 2008-08-15 00:11:13 UTC (rev 195)
@@ -10,7 +10,6 @@
--------------------------------------------------------------------------------------
- [D] Implementar tabla o de Operadores
- [D] Implementar tabla p de Privilegios
- - [D] Implementar tabla f de Features
ALTA PRIORIDAD
--------------------------------------------------------------------------------------
Modified: ircd/trunk/ircd/ddb_events.c
===================================================================
--- ircd/trunk/ircd/ddb_events.c 2008-08-14 21:11:51 UTC (rev 194)
+++ ircd/trunk/ircd/ddb_events.c 2008-08-15 00:11:13 UTC (rev 195)
@@ -30,6 +30,8 @@
#include "client.h"
#include "hash.h"
#include "ircd.h"
+#include "ircd_alloc.h"
+#include "ircd_chattr.h"
#include "ircd_snprintf.h"
#include "ircd_tea.h"
#include "msg.h"
@@ -37,6 +39,7 @@
#include "s_user.h"
#include "send.h"
+#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -48,6 +51,7 @@
static void ddb_events_table_c(char *key, char *content, int update);
static void ddb_events_table_d(char *key, char *content, int update);
+static void ddb_events_table_f(char *key, char *content, int update);
static void ddb_events_table_o(char *key, char *content, int update);
static void ddb_events_table_n(char *key, char *content, int update);
static void ddb_events_table_v(char *key, char *content, int update);
@@ -69,6 +73,7 @@
ddb_events_table[DDB_CHANDB] = ddb_events_table_c;
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_NICKDB] = ddb_events_table_n;
ddb_events_table[DDB_OPERDB] = ddb_events_table_o;
@@ -231,6 +236,51 @@
#endif
}
+/** Handle events on Features Table.
+ * @param[in] key Key of registry.
+ * @param[in] content Content of registry.
+ * @param[in] update Update of registry or no.
+ */
+static void
+ddb_events_table_f(char *key, char *content, int update)
+{
+ static char *keytemp = NULL;
+ static int key_len = 0;
+ int i = 0;
+
+ if ((strlen(key) + 1 > key_len) || (!keytemp))
+ {
+ key_len = strlen(key) + 1;
+ if (keytemp)
+ MyFree(keytemp);
+ keytemp = MyMalloc(key_len);
+
+ assert(0 != keytemp);
+ }
+ strcpy(keytemp, key);
+ while (keytemp[i])
+ {
+ keytemp[i] = ToUpper(keytemp[i]);
+ i++;
+ }
+
+ if (content)
+ {
+ char *tempa[2];
+ tempa[0] = keytemp;
+ tempa[1] = content;
+
+ feature_set(&me, tempa, 2);
+ }
+ else
+ {
+ char *tempb[1];
+ tempb[0] = keytemp;
+
+ feature_set(&me, tempb, 1);
+ }
+}
+
/** Handle events on Nick Table.
* @param[in] key Key of registry.
* @param[in] content Content of registry.
Modified: ircd/trunk/ircd/ircd_features.c
===================================================================
--- ircd/trunk/ircd/ircd_features.c 2008-08-14 21:11:51 UTC (rev 194)
+++ ircd/trunk/ircd/ircd_features.c 2008-08-15 00:11:13 UTC (rev 195)
@@ -315,6 +315,9 @@
#define FEAT_OPER 0x0100 /**< set to display only to opers */
#define FEAT_MYOPER 0x0200 /**< set to display only to local opers */
#define FEAT_NODISP 0x0400 /**< feature must never be displayed */
+#if defined(DDB)
+#define FEAT_DDB 0x0800 /**< feature ajusted via DDB */
+#endif
#define FEAT_READ 0x1000 /**< feature is read-only (for now, perhaps?) */
@@ -602,7 +605,16 @@
int i, change = 0, tmp;
const char *t_str;
struct FeatureDesc *feat;
+#if defined(DDB)
+ int byddb = 0;
+ if (from == &me)
+ {
+ byddb = 1;
+ from = NULL;
+ }
+#endif
+
if (from && !HasPriv(from, PRIV_SET))
return send_reply(from, ERR_NOPRIVILEGES);
@@ -612,6 +624,22 @@
else
log_write(LS_CONFIG, L_ERROR, 0, "Not enough fields in F line");
} else if ((feat = feature_desc(from, fields[0]))) { /* find feature */
+#if defined(DDB)
+ if (byddb)
+ {
+ if (count < 2)
+ feat->flags &= ~FEAT_DDB;
+ else
+ feat->flags |= FEAT_DDB;
+
+ } else if (feat->flags & FEAT_DDB) {
+ if (from) {
+ sendcmdto_one(&me, CMD_NOTICE, from, "%C :The feature has been setted by DDB", from);
+ send_reply(from, ERR_NOFEATURE, fields[0]);
+ }
+ return 0;
+ }
+#endif
if (from && feat->flags & FEAT_READ)
return send_reply(from, ERR_NOFEATURE, fields[0]);
@@ -767,6 +795,16 @@
if (count < 1) /* check arguments */
need_more_params(from, "RESET");
else if ((feat = feature_desc(from, fields[0]))) { /* get descriptor */
+#if defined(DDB)
+ if (feat->flags & FEAT_DDB) {
+ if (from) {
+ sendcmdto_one(&me, CMD_NOTICE, from, "%C :The feature has been setted by DDB", from);
+ send_reply(from, ERR_NOFEATURE, fields[0]);
+ }
+ return 0;
+ }
+#endif
+
if (from && feat->flags & FEAT_READ)
return send_reply(from, ERR_NOFEATURE, fields[0]);
@@ -878,6 +916,10 @@
int i;
for (i = 0; features[i].type; i++) {
+#if defined(DDB)
+ if (features[i].flags & FEAT_DDB)
+ continue;
+#endif
features[i].flags &= ~FEAT_MARK; /* clear the marks... */
if (features[i].unmark) /* call the unmark callback if necessary */
(*features[i].unmark)();
@@ -893,6 +935,11 @@
for (i = 0; features[i].type; i++) {
change = 0;
+#if defined(DDB)
+ if (features[i].flags & FEAT_DDB)
+ continue;
+#endif
+
switch (feat_type(&features[i])) {
case FEAT_NONE:
if (features[i].mark &&
@@ -984,25 +1031,61 @@
case FEAT_INT: /* Report an F-line with integer values */
+#if defined(DDB)
+ if (features[i].flags & FEAT_DDB) {
+ send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %d (setted by DDB)",
+ features[i].type, features[i].v_int);
+ break;
+ } else if (features[i].flags & FEAT_MARK) /* it's been changed */
+#else
if (features[i].flags & FEAT_MARK) /* it's been changed */
+#endif
send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %d",
features[i].type, features[i].v_int);
break;
case FEAT_UINT: /* Report an F-line with unsigned values */
+#if defined(DDB)
+ if (features[i].flags & FEAT_DDB) {
+ send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %u (setted by DDB)",
+ features[i].type, features[i].v_int);
+ break;
+ } else if (features[i].flags & FEAT_MARK) /* it's been changed */
+#else
if (features[i].flags & FEAT_MARK) /* it's been changed */
+#endif
send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %u",
features[i].type, features[i].v_int);
break;
case FEAT_BOOL: /* Report an F-line with boolean values */
+#if defined(DDB)
+ if (features[i].flags & FEAT_DDB) {
+ send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s (setted by DDB)",
+ features[i].type, features[i].v_int ? "TRUE" : "FALSE");
+ break;
+ } else if (features[i].flags & FEAT_MARK) /* it's been changed */
+#else
if (features[i].flags & FEAT_MARK) /* it's been changed */
+#endif
send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s",
features[i].type, features[i].v_int ? "TRUE" : "FALSE");
break;
case FEAT_STR: /* Report an F-line with string values */
+#if defined(DDB)
+ if (features[i].flags & FEAT_DDB) {
+ if (features[i].v_str)
+ send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s (setted by DDB)",
+ features[i].type, features[i].v_str);
+ else
+ send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s (setted by DDB)",
+ features[i].type);
+ break;
+ } else if (features[i].flags & FEAT_MARK) { /* it's been changed */
+#else
if (features[i].flags & FEAT_MARK) { /* it's been changed */
+#endif
if (features[i].v_str)
send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %s",
features[i].type, features[i].v_str);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-08-14 21:11:41
|
Revision: 194
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=194&view=rev
Author: zolty
Date: 2008-08-14 21:11:51 +0000 (Thu, 14 Aug 2008)
Log Message:
-----------
test para canal #ircu
Modified Paths:
--------------
ircd/trunk/TODO.es
Modified: ircd/trunk/TODO.es
===================================================================
--- ircd/trunk/TODO.es 2008-07-13 11:03:39 UTC (rev 193)
+++ ircd/trunk/TODO.es 2008-08-14 21:11:51 UTC (rev 194)
@@ -325,10 +325,3 @@
- ircops no tienen limitado canales
- +X mira ip real y virtual en who
-
-
-
-
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-13 11:03:38
|
Revision: 193
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=193&view=rev
Author: zolty
Date: 2008-07-13 04:03:39 -0700 (Sun, 13 Jul 2008)
Log Message:
-----------
Eventos tabla o
Modified Paths:
--------------
ircd/trunk/ircd/ddb_events.c
Modified: ircd/trunk/ircd/ddb_events.c
===================================================================
--- ircd/trunk/ircd/ddb_events.c 2008-07-13 00:23:49 UTC (rev 192)
+++ ircd/trunk/ircd/ddb_events.c 2008-07-13 11:03:39 UTC (rev 193)
@@ -48,6 +48,7 @@
static void ddb_events_table_c(char *key, char *content, int update);
static void ddb_events_table_d(char *key, char *content, int update);
+static void ddb_events_table_o(char *key, char *content, int update);
static void ddb_events_table_n(char *key, char *content, int update);
static void ddb_events_table_v(char *key, char *content, int update);
static void ddb_events_table_z(char *key, char *content, int update);
@@ -70,6 +71,7 @@
ddb_events_table[DDB_CHANDB2] = ddb_events_table_d;
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_VHOSTDB] = ddb_events_table_v;
ddb_events_table[DDB_CONFIGDB] = ddb_events_table_z;
@@ -280,6 +282,10 @@
oldflags = cli_flags(cptr);
ClearNickRegistered(cptr);
+ ClearAdmin(cptr);
+ ClearCoder(cptr);
+ ClearHelpOper(cptr);
+ ClearBot(cptr);
SetNickSuspended(cptr);
sendcmdbotto_one(botname, CMD_NOTICE, cptr,
@@ -350,6 +356,78 @@
}
}
+/** Handle events on Operators Table.
+ * @param[in] key Key of registry.
+ * @param[in] content Content of registry.
+ * @param[in] update Update of registry or no.
+ */
+static void
+ddb_events_table_o(char *key, char *content, int update)
+{
+ struct Client *cptr;
+ if ((cptr = FindUser(key)) && MyConnect(cptr))
+ {
+ /* Droping Key */
+ if (!content && (IsAdmin(cptr) || IsCoder(cptr) || IsHelpOper(cptr) || IsBot(cptr)))
+ {
+ struct Flags oldflags;
+
+ oldflags = cli_flags(cptr);
+ ClearAdmin(cptr);
+ ClearCoder(cptr);
+ ClearHelpOper(cptr);
+ ClearBot(cptr);
+
+ send_umode_out(cptr, cptr, &oldflags, IsRegistered(cptr));
+ }
+ else if (content)
+ {
+ /* New Key or Update Key */
+ if (IsNickRegistered(cptr))
+ {
+ struct Flags oldflags = cli_flags(cptr);
+ int update = 0;
+
+ if ((*content == 'a') && !IsAdmin(cptr))
+ {
+ SetAdmin(cptr);
+ ClearCoder(cptr);
+ ClearHelpOper(cptr);
+ ClearBot(cptr);
+ update = 1;
+ }
+ else if ((*content == 'c') && !IsCoder(cptr))
+ {
+ ClearAdmin(cptr);
+ SetCoder(cptr);
+ ClearHelpOper(cptr);
+ ClearBot(cptr);
+ update = 1;
+ }
+ else if ((*content == 'B') && !IsBot(cptr))
+ {
+ ClearAdmin(cptr);
+ ClearCoder(cptr);
+ ClearHelpOper(cptr);
+ SetBot(cptr);
+ update = 1;
+ }
+ else if (!IsHelpOper(cptr))
+ {
+ ClearAdmin(cptr);
+ ClearCoder(cptr);
+ SetHelpOper(cptr);
+ ClearBot(cptr);
+ update = 1;
+ }
+
+ if (update)
+ send_umode_out(cptr, cptr, &oldflags, IsRegistered(cptr));
+ }
+ }
+ }
+}
+
/** Handle events on Vhosts Table.
* @param[in] key Key of registry.
* @param[in] content Content of registry.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-13 00:23:43
|
Revision: 192
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=192&view=rev
Author: zolty
Date: 2008-07-12 17:23:49 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
nuevo modo de usuario +c
Modified Paths:
--------------
ircd/trunk/include/client.h
ircd/trunk/ircd/m_who.c
ircd/trunk/ircd/m_whois.c
ircd/trunk/ircd/s_user.c
Modified: ircd/trunk/include/client.h
===================================================================
--- ircd/trunk/include/client.h 2008-07-12 20:53:24 UTC (rev 191)
+++ ircd/trunk/include/client.h 2008-07-13 00:23:49 UTC (rev 192)
@@ -73,7 +73,7 @@
/** String containing valid user modes, in no particular order. */
#if defined(DDB) || defined(SERVICES)
-#define infousermodes "dioswkgxrRSZ"
+#define infousermodes "dioswkgxrRachBSZ"
#else
#define infousermodes "dioswkgxRZ"
#endif
@@ -159,8 +159,9 @@
#elif defined(DDB) || defined(SERVICES)
FLAG_NICKREG, /**< nick registered */
FLAG_NICKSUSPEND, /**< nick suspended */
- FLAG_HELPOPER, /**< nick is Help Operator */
FLAG_ADMIN, /**< nick is Services Admin */
+ FLAG_CODER, /**< nick is Services Coder */
+ FLAG_HELPOPER, /**< nick is Services Operator */
FLAG_BOT, /**< nick is Services Bot */
#endif
FLAG_MSGONLYREG, /**< only privmsg/notices from +r */
@@ -546,7 +547,12 @@
#define HasFlag(cli, flag) FlagHas(&cli_flags(cli), flag)
/** Return non-zero if the client is an IRC operator (global or local). */
+#if defined(DDB)
+#define IsAnOper(x) (HasFlag(x, FLAG_OPER) || HasFlag(x, FLAG_LOCOP) || HasFlag(x, FLAG_ADMIN) || \
+ HasFlag(x, FLAG_CODER) || HasFlag(x, FLAG_HELPOPER) || HasFlag(x, FLAG_BOT))
+#else
#define IsAnOper(x) (HasFlag(x, FLAG_OPER) || HasFlag(x, FLAG_LOCOP))
+#endif
/** Return non-zero if the client's connection is blocked. */
#define IsBlocked(x) HasFlag(x, FLAG_BLOCKED)
/** Return non-zero if the client's connection is still being burst. */
@@ -609,10 +615,12 @@
#define IsNickRegistered(x) HasFlag(x, FLAG_NICKREG)
/** Return non-zero if the client has set mode +S (nick suspended) */
#define IsNickSuspended(x) HasFlag(x, FLAG_NICKSUSPEND)
+/** Return non-zero if the client has set mode +a (Services Admin) */
+#define IsAdmin(x) HasFlag(x, FLAG_ADMIN)
+/** Return non-zero if the client has set mode +c (Network Coder) */
+#define IsCoder(x) HasFlag(x, FLAG_CODER)
/** Return non-zero if the client has set mode +h (Help Operator) */
#define IsHelpOper(x) HasFlag(x, FLAG_HELPOPER)
-/** Return non-zero if the client has set mode +a (Services Admin) */
-#define IsAdmin(x) HasFlag(x, FLAG_ADMIN)
/** Return non-zero if the client has set mode +B (Services Bot) */
#define IsBot(x) HasFlag(x, FLAG_BOT)
#endif
@@ -681,10 +689,12 @@
#define SetNickRegistered(x) SetFlag(x, FLAG_NICKREG)
/** Mark a client as having mode +S (nick suspended) */
#define SetNickSuspended(x) SetFlag(x, FLAG_NICKSUSPEND)
-/** Mark a client as having mode +h (Help Operator) */
-#define SetHelpOper(x) SetFlag(x, FLAG_HELPOPER)
/** Mark a client as having mode +a (Services Admin) */
#define SetAdmin(x) SetFlag(x, FLAG_ADMIN)
+/** Mark a client as having mode +c (Network Coder) */
+#define SetCoder(x) SetFlag(x, FLAG_CODER)
+/** Mark a client as having mode +h (Services Operator) */
+#define SetHelpOper(x) SetFlag(x, FLAG_HELPOPER)
/** Mark a client as having mode +B (Services Bot) */
#define SetBot(x) SetFlag(x, FLAG_BOT)
#endif
@@ -738,6 +748,10 @@
#define ClearHelpOper(x) ClrFlag(x, FLAG_HELPOPER)
/** Remode mode +A (Services Admin) from the client */
#define ClearAdmin(x) ClrFlag(x, FLAG_ADMIN)
+/** Remode mode +c (Network Coder) from the client */
+#define ClearCoder(x) ClrFlag(x, FLAG_CODER)
+/** Remode mode +h (Help Operator) from the client */
+#define ClearHelpOper(x) ClrFlag(x, FLAG_HELPOPER)
/** Remode mode +B (Services Bot) from the client */
#define ClearBot(x) ClrFlag(x, FLAG_BOT)
#endif
Modified: ircd/trunk/ircd/m_who.c
===================================================================
--- ircd/trunk/ircd/m_who.c 2008-07-12 20:53:24 UTC (rev 191)
+++ ircd/trunk/ircd/m_who.c 2008-07-13 00:23:49 UTC (rev 192)
@@ -285,6 +285,8 @@
*(p1++) = 'S';
if (IsAdmin(acptr))
*(p1++) = 'a';
+ if (IsCoder(acptr))
+ *(p1++) = 'c';
if (IsHelpOper(acptr))
*(p1++) = 'h';
if (IsBot(acptr))
Modified: ircd/trunk/ircd/m_whois.c
===================================================================
--- ircd/trunk/ircd/m_whois.c 2008-07-12 20:53:24 UTC (rev 191)
+++ ircd/trunk/ircd/m_whois.c 2008-07-13 00:23:49 UTC (rev 192)
@@ -166,7 +166,18 @@
send_reply(sptr, RPL_WHOISSUSPEND, name);
if (SeeOper(sptr,acptr))
- send_reply(sptr, RPL_WHOISOPERATOR, name);
+ {
+ if (IsAdmin(acptr))
+ send_reply(sptr, SND_EXPLICIT | RPL_WHOISOPERATOR, "%s :is a Services Administrator", name);
+ else if (IsCoder(acptr))
+ send_reply(sptr, SND_EXPLICIT | RPL_WHOISOPERATOR, "%s :is a Network Coder", name);
+ else if (IsHelpOper(acptr))
+ send_reply(sptr, SND_EXPLICIT | RPL_WHOISOPERATOR, "%s :is a Services Operator", name);
+ else if (IsOper(acptr))
+ send_reply(sptr, RPL_WHOISOPERATOR, name);
+ else
+ send_reply(sptr, SND_EXPLICIT | RPL_WHOISOPERATOR, "%s :is a Local IRC Operator", name);
+ }
if (IsBot(acptr))
send_reply(sptr, RPL_WHOISBOT, name, feature_str(FEAT_NETWORK));
Modified: ircd/trunk/ircd/s_user.c
===================================================================
--- ircd/trunk/ircd/s_user.c 2008-07-12 20:53:24 UTC (rev 191)
+++ ircd/trunk/ircd/s_user.c 2008-07-13 00:23:49 UTC (rev 192)
@@ -530,6 +530,7 @@
{ FLAG_NICKREG, 'r' },
{ FLAG_NICKSUSPEND, 'S' },
{ FLAG_ADMIN, 'a' },
+ { FLAG_CODER, 'c' },
{ FLAG_HELPOPER, 'h' },
{ FLAG_BOT, 'B' },
{ FLAG_MSGONLYREG, 'R' },
@@ -1528,6 +1529,12 @@
else
ClearAdmin(sptr);
break;
+ case 'c':
+ if (what == MODE_ADD)
+ SetCoder(sptr);
+ else
+ ClearCoder(sptr);
+ break;
case 'h':
if (what == MODE_ADD)
SetHelpOper(sptr);
@@ -1604,6 +1611,8 @@
ClearNickSuspended(sptr);
if (!FlagHas(&setflags, FLAG_ADMIN))
ClearAdmin(sptr);
+ if (!FlagHas(&setflags, FLAG_CODER))
+ ClearCoder(sptr);
if (!FlagHas(&setflags, FLAG_HELPOPER))
ClearHelpOper(sptr);
if (!FlagHas(&setflags, FLAG_BOT))
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-12 20:53:21
|
Revision: 191
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=191&view=rev
Author: zolty
Date: 2008-07-12 13:53:24 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
nuevos modos usuario +ahBX y unificacion status
Modified Paths:
--------------
ircd/trunk/include/client.h
ircd/trunk/include/numeric.h
ircd/trunk/ircd/ircd_relay.c
ircd/trunk/ircd/listener.c
ircd/trunk/ircd/m_info.c
ircd/trunk/ircd/m_invite.c
ircd/trunk/ircd/m_kick.c
ircd/trunk/ircd/m_lusers.c
ircd/trunk/ircd/m_mode.c
ircd/trunk/ircd/m_notice.c
ircd/trunk/ircd/m_privmsg.c
ircd/trunk/ircd/m_server.c
ircd/trunk/ircd/m_settime.c
ircd/trunk/ircd/m_trace.c
ircd/trunk/ircd/m_userhost.c
ircd/trunk/ircd/m_userip.c
ircd/trunk/ircd/m_watch.c
ircd/trunk/ircd/m_who.c
ircd/trunk/ircd/m_whois.c
ircd/trunk/ircd/m_whowas.c
ircd/trunk/ircd/s_err.c
ircd/trunk/ircd/s_numeric.c
ircd/trunk/ircd/s_user.c
ircd/trunk/ircd/watch.c
Modified: ircd/trunk/include/client.h
===================================================================
--- ircd/trunk/include/client.h 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/include/client.h 2008-07-12 20:53:24 UTC (rev 191)
@@ -111,6 +111,8 @@
PRIV_LIST_CHAN, /**< oper can list secret channels */
PRIV_FORCE_OPMODE, /**< can hack modes on quarantined channels */
PRIV_FORCE_LOCAL_OPMODE, /**< can hack modes on quarantined local channels */
+ PRIV_UMODE_K, /**< oper can set umode +k (Channel Service) */
+ PRIV_UMODE_X, /**< oper can set umode +X (can view hidden host) */
#if defined(DDB)
PRIV_DBQ, /**< oper can use DBQ (DataBase Query) */
#endif
@@ -157,9 +159,13 @@
#elif defined(DDB) || defined(SERVICES)
FLAG_NICKREG, /**< nick registered */
FLAG_NICKSUSPEND, /**< nick suspended */
+ FLAG_HELPOPER, /**< nick is Help Operator */
+ FLAG_ADMIN, /**< nick is Services Admin */
+ FLAG_BOT, /**< nick is Services Bot */
#endif
FLAG_MSGONLYREG, /**< only privmsg/notices from +r */
FLAG_HIDDENHOST, /**< user's host is hidden */
+ FLAG_VIEWHIDDENHOST, /**< can view hiddenhost */
FLAG_SSL, /**< is a user with secure connection */
FLAG_LAST_FLAG, /**< number of flags */
FLAG_LOCAL_UMODES = FLAG_LOCOP, /**< First local mode flag */
@@ -590,6 +596,8 @@
#endif
/** Return non-zero if the client has set mode +x (hidden host). */
#define IsHiddenHost(x) HasFlag(x, FLAG_HIDDENHOST)
+/** Return non-zero if the client has set mode +X (can view hidden host). */
+#define IsViewHiddenHost(x) HasFlag(x, FLAG_VIEWHIDDENHOST)
/** Return non-zero if the client has an active PING request. */
#define IsPingSent(x) HasFlag(x, FLAG_PINGSENT)
#ifdef USE_SSL
@@ -601,6 +609,12 @@
#define IsNickRegistered(x) HasFlag(x, FLAG_NICKREG)
/** Return non-zero if the client has set mode +S (nick suspended) */
#define IsNickSuspended(x) HasFlag(x, FLAG_NICKSUSPEND)
+/** Return non-zero if the client has set mode +h (Help Operator) */
+#define IsHelpOper(x) HasFlag(x, FLAG_HELPOPER)
+/** Return non-zero if the client has set mode +a (Services Admin) */
+#define IsAdmin(x) HasFlag(x, FLAG_ADMIN)
+/** Return non-zero if the client has set mode +B (Services Bot) */
+#define IsBot(x) HasFlag(x, FLAG_BOT)
#endif
/** Return non-zero if the client has set mode +R. */
#define IsMsgOnlyReg(x) HasFlag(x, FLAG_MSGONLYREG)
@@ -654,6 +668,8 @@
#endif
/** Mark a client as having mode +x (hidden host). */
#define SetHiddenHost(x) SetFlag(x, FLAG_HIDDENHOST)
+/** Mark a client as having mode +X (can view hidden host). */
+#define SetViewHiddenHost(x) SetFlag(x, FLAG_VIEWHIDDENHOST)
/** Mark a client as having a pending PING. */
#define SetPingSent(x) SetFlag(x, FLAG_PINGSENT)
#ifdef USE_SSL
@@ -665,6 +681,12 @@
#define SetNickRegistered(x) SetFlag(x, FLAG_NICKREG)
/** Mark a client as having mode +S (nick suspended) */
#define SetNickSuspended(x) SetFlag(x, FLAG_NICKSUSPEND)
+/** Mark a client as having mode +h (Help Operator) */
+#define SetHelpOper(x) SetFlag(x, FLAG_HELPOPER)
+/** Mark a client as having mode +a (Services Admin) */
+#define SetAdmin(x) SetFlag(x, FLAG_ADMIN)
+/** Mark a client as having mode +B (Services Bot) */
+#define SetBot(x) SetFlag(x, FLAG_BOT)
#endif
/** Mark a client as having mode +R. */
#define SetMsgOnlyReg(x) SetFlag(x, FLAG_MSGONLYREG)
@@ -699,6 +721,8 @@
#define ClearServNotice(x) ClrFlag(x, FLAG_SERVNOTICE)
/** Remove mode +x (hidden host) from the client. */
#define ClearHiddenHost(x) ClrFlag(x, FLAG_HIDDENHOST)
+/** Remove mode +X (can view hidden host) from the client. */
+#define ClearViewHiddenHost(x) ClrFlag(x, FLAG_VIEWHIDDENHOST)
/** Clear the client's pending PING flag. */
#define ClearPingSent(x) ClrFlag(x, FLAG_PINGSENT)
#ifdef USE_SSL
@@ -710,6 +734,12 @@
#define ClearNickRegistered(x) ClrFlag(x, FLAG_NICKREG)
/** Remode mode +S (nick suspended) from the client */
#define ClearNickSuspended(x) ClrFlag(x, FLAG_NICKSUSPEND)
+/** Remode mode +h (Help Operator) from the client */
+#define ClearHelpOper(x) ClrFlag(x, FLAG_HELPOPER)
+/** Remode mode +A (Services Admin) from the client */
+#define ClearAdmin(x) ClrFlag(x, FLAG_ADMIN)
+/** Remode mode +B (Services Bot) from the client */
+#define ClearBot(x) ClrFlag(x, FLAG_BOT)
#endif
/** Remove mode +R from the client. */
#define ClearMsgOnlyReg(x) ClrFlag(x, FLAG_MSGONLYREG)
Modified: ircd/trunk/include/numeric.h
===================================================================
--- ircd/trunk/include/numeric.h 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/include/numeric.h 2008-07-12 20:53:24 UTC (rev 191)
@@ -224,7 +224,7 @@
/* RPL_ENDOFRULES 309 unreal */
/* RPL_WHOISHELPER 309 austnet */
/* RPL_WHOISSVCMSG 310 Dalnet */
-/* RPL_WHOISHELPOP 310 unreal */
+#define RPL_WHOISHELPOP 310 /* IRC-Dev, Unreal extension */
/* RPL_WHOISSERVICE 310 austnet */
#define RPL_WHOISUSER 311 /* See also RPL_ENDOFWHOIS */
#define RPL_WHOISSERVER 312
@@ -256,6 +256,7 @@
#define RPL_LISTUSAGE 334 /* Undernet extension */
/* RPL_COMMANDSYNTAX 334 Dalnet */
/* RPL_LISTSYNTAX 334 unreal */
+#define RPL_WHOISBOT 335 /* IRC-Dev, Unreal extension */
#define RPL_WHOISSSL 337 /* SSL */
/* RPL_CHANPASSOK 338 IRCnet extension (?)*/
#define RPL_WHOISACTUALLY 338 /* Undernet extension, dalnet */
Modified: ircd/trunk/ircd/ircd_relay.c
===================================================================
--- ircd/trunk/ircd/ircd_relay.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/ircd_relay.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -369,7 +369,7 @@
return;
#if defined(DDB) || defined(SERVICES)
- if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsOper(sptr)) {
+ if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsAnOper(sptr)) {
send_reply(sptr, ERR_NONONREG, cli_name(acptr));
return;
}
@@ -412,7 +412,7 @@
return;
#if defined(DDB) || defined(SERVICES)
- if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsOper(sptr))
+ if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsAnOper(sptr))
return;
#endif
Modified: ircd/trunk/ircd/listener.c
===================================================================
--- ircd/trunk/ircd/listener.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/listener.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -136,8 +136,8 @@
{
struct Listener *listener = 0;
char flags[8];
- int show_hidden = IsOper(sptr);
- int count = (IsOper(sptr) || MyUser(sptr)) ? 100 : 8;
+ int show_hidden = IsAnOper(sptr);
+ int count = (IsAnOper(sptr) || MyUser(sptr)) ? 100 : 8;
int port = 0;
int len;
Modified: ircd/trunk/ircd/m_info.c
===================================================================
--- ircd/trunk/ircd/m_info.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_info.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -97,11 +97,11 @@
return 0;
while (text[212])
{
- if (!IsOper(sptr))
+ if (!IsAnOper(sptr))
send_reply(sptr, RPL_INFO, *text);
text++;
}
- if (IsOper(sptr))
+ if (IsAnOper(sptr))
{
while (*text)
send_reply(sptr, RPL_INFO, *text++);
@@ -135,11 +135,11 @@
{
while (text[212])
{
- if (!IsOper(sptr))
+ if (!IsAnOper(sptr))
send_reply(sptr, RPL_INFO, *text);
text++;
}
- if (IsOper(sptr) && (NULL != parv[1]))
+ if (IsAnOper(sptr) && (NULL != parv[1]))
{
while (*text)
send_reply(sptr, RPL_INFO, *text++);
Modified: ircd/trunk/ircd/m_invite.c
===================================================================
--- ircd/trunk/ircd/m_invite.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_invite.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -116,7 +116,7 @@
/* If we get here, it was a VALID and meaningful INVITE */
#if defined(DDB) || defined(SERVICES)
- if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsOper(sptr)) {
+ if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsAnOper(sptr)) {
send_reply(sptr, ERR_NONONREG, cli_name(acptr));
return;
}
Modified: ircd/trunk/ircd/m_kick.c
===================================================================
--- ircd/trunk/ircd/m_kick.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_kick.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -106,7 +106,7 @@
OpLevel(member) == OpLevel(member2) ? "the same" : "a higher");
#elif defined(DDB) || defined(SERVICES)
/* Don't allow to kick channel owner */
- if (IsChanOwner(member) && !IsOper(sptr))
+ if (IsChanOwner(member) && !IsAnOper(sptr))
return send_reply(sptr, ERR_ISCHANSERVICE, cli_name(who), chptr->chname);
#endif
Modified: ircd/trunk/ircd/m_lusers.c
===================================================================
--- ircd/trunk/ircd/m_lusers.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_lusers.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -57,7 +57,7 @@
*/
int m_lusers(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
- int longoutput = MyUser(sptr) || IsOper(sptr);
+ int longoutput = MyUser(sptr) || IsAnOper(sptr);
if (parc > 2)
if (hunt_server_cmd(sptr, CMD_LUSERS, cptr, feature_int(FEAT_HIS_REMOTE),
"%s :%C", 2, parc, parv) != HUNTED_ISME)
@@ -104,7 +104,7 @@
*/
int ms_lusers(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
- int longoutput = MyUser(sptr) || IsOper(sptr);
+ int longoutput = MyUser(sptr) || IsAnOper(sptr);
if (parc > 2)
if (hunt_server_cmd(sptr, CMD_LUSERS, cptr, 0, "%s :%C", 2, parc, parv) !=
HUNTED_ISME)
Modified: ircd/trunk/ircd/m_mode.c
===================================================================
--- ircd/trunk/ircd/m_mode.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_mode.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -117,7 +117,7 @@
return modebuf_flush(&mbuf);
#if 1 /* TRANSICION IRC-HISPANO */
- } else if (feature_bool(FEAT_TRANSICION_HISPANO) && IsOper(sptr) && strchr(parv[2], 'x')) {
+ } else if (feature_bool(FEAT_TRANSICION_HISPANO) && IsAnOper(sptr) && strchr(parv[2], 'x')) {
modebuf_init(&mbuf, sptr, cptr, chptr,
(MODEBUF_DEST_CHANNEL | /* Send MODE to channel */
MODEBUF_DEST_SERVER | /* And to server */
@@ -235,7 +235,7 @@
MODE_PARSE_FORCE), /* And force it to be accepted */
NULL);
#if 1 /* TRANSICION IRC-HISPANO */
- } else if (IsOper(sptr) && strchr(parv[2], 'x')) {
+ } else if (IsAnOper(sptr) && strchr(parv[2], 'x')) {
modebuf_init(&mbuf, sptr, cptr, chptr,
(MODEBUF_DEST_CHANNEL | /* Send MODE to channel */
MODEBUF_DEST_SERVER | /* And to server */
Modified: ircd/trunk/ircd/m_notice.c
===================================================================
--- ircd/trunk/ircd/m_notice.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_notice.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -132,7 +132,7 @@
/*
* coming from another server, we have to check this here
*/
- else if ('$' == *name && IsOper(sptr)) {
+ else if ('$' == *name && IsAnOper(sptr)) {
server_relay_masked_notice(sptr, name, parv[parc - 1]);
}
else if ((server = strchr(name, '@'))) {
Modified: ircd/trunk/ircd/m_privmsg.c
===================================================================
--- ircd/trunk/ircd/m_privmsg.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_privmsg.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -129,7 +129,7 @@
/*
* coming from another server, we have to check this here
*/
- else if ('$' == *name && IsOper(sptr)) {
+ else if ('$' == *name && IsAnOper(sptr)) {
server_relay_masked_message(sptr, name, parv[parc - 1]);
}
else if ((server = strchr(name, '@'))) {
Modified: ircd/trunk/ircd/m_server.c
===================================================================
--- ircd/trunk/ircd/m_server.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_server.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -561,7 +561,12 @@
return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]);
else if (prot < atoi(MINOR_PROTOCOL))
#if 1 /* TRANSICION IRC-HISPANO */
- prot = atoi(MINOR_PROTOCOL);
+ {
+ prot = atoi(MINOR_PROTOCOL);
+ /* Los P09 siempre son Services y hub */
+ SetService(cptr);
+ SetHub(cptr);
+ }
#else
return exit_new_server(cptr, sptr, host, timestamp,
"Incompatible protocol: %s", parv[5]);
Modified: ircd/trunk/ircd/m_settime.c
===================================================================
--- ircd/trunk/ircd/m_settime.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_settime.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -161,7 +161,7 @@
static char tbuf[11];
/* Must be a global oper */
- if (!IsOper(sptr))
+ if (!IsAnOper(sptr))
return send_reply(sptr, ERR_NOPRIVILEGES);
if (parc < 2) /* verify argument count */
Modified: ircd/trunk/ircd/m_trace.c
===================================================================
--- ircd/trunk/ircd/m_trace.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_trace.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -143,7 +143,7 @@
if (!(acptr = LocalClientArray[i])) /* Local Connection? */
continue;
- if (IsInvisible(acptr) && dow && !(MyConnect(sptr) && IsOper(sptr)) &&
+ if (IsInvisible(acptr) && dow && !(MyConnect(sptr) && IsAnOper(sptr)) &&
!IsAnOper(acptr) && (acptr != sptr))
continue;
if (!doall && wilds && match(tname, cli_name(acptr)))
Modified: ircd/trunk/ircd/m_userhost.c
===================================================================
--- ircd/trunk/ircd/m_userhost.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_userhost.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -53,7 +53,7 @@
* of +x. If an oper wants the real host, he should go to
* /whois to get it.
*/
- HasHiddenHost(cptr) && !IsAnOper(sptr) && (sptr != cptr) ?
+ HasHiddenHost(cptr) && !IsViewHiddenHost(sptr) && (sptr != cptr) ?
cli_user(cptr)->host : cli_user(cptr)->realhost);
}
Modified: ircd/trunk/ircd/m_userip.c
===================================================================
--- ircd/trunk/ircd/m_userip.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_userip.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -54,7 +54,7 @@
* of +x. If an oper wants the real IP, he should go to
* /whois to get it.
*/
- HasHiddenHost(cptr) && !IsAnOper(sptr) && (sptr != cptr) ?
+ HasHiddenHost(cptr) && !IsViewHiddenHost(sptr) && (sptr != cptr) ?
feature_str(FEAT_HIDDEN_IP) :
ircd_ntoa(&cli_ip(cptr)));
}
Modified: ircd/trunk/ircd/m_watch.c
===================================================================
--- ircd/trunk/ircd/m_watch.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_watch.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -192,7 +192,7 @@
{
send_reply(sptr, RPL_NOWON, cli_name(acptr),
cli_user(acptr)->username,
- HasHiddenHost(acptr) && !IsAnOper(sptr) ?
+ HasHiddenHost(acptr) && !IsViewHiddenHost(sptr) ?
cli_user(acptr)->host : cli_user(acptr)->realhost,
cli_lastnick(acptr));
}
Modified: ircd/trunk/ircd/m_who.c
===================================================================
--- ircd/trunk/ircd/m_who.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_who.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -191,7 +191,7 @@
if (fields & WHO_FIELD_NIP)
{
- const char* p2 = HasHiddenHost(acptr) && !IsAnOper(sptr) ?
+ const char* p2 = HasHiddenHost(acptr) && !IsViewHiddenHost(sptr) ?
feature_str(FEAT_HIDDEN_IP) :
ircd_ntoa(&cli_ip(acptr));
*(p1++) = ' ';
@@ -283,9 +283,17 @@
*(p1++) = 'r';
if (IsNickSuspended(acptr))
*(p1++) = 'S';
+ if (IsAdmin(acptr))
+ *(p1++) = 'a';
+ if (IsHelpOper(acptr))
+ *(p1++) = 'h';
+ if (IsBot(acptr))
+ *(p1++) = 'B';
#endif
if (HasHiddenHost(acptr))
*(p1++) = 'x';
+ if (IsViewHiddenHost(acptr))
+ *(p1++) = 'X';
}
if (!fields || (fields & WHO_FIELD_DIS))
@@ -658,12 +666,12 @@
|| matchexec(cli_user(acptr)->host, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_HOS))
|| !HasHiddenHost(acptr)
- || !IsAnOper(sptr)
+ || !IsViewHiddenHost(sptr)
|| matchexec(cli_user(acptr)->realhost, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_REN))
|| matchexec(cli_info(acptr), mymask, minlen))
&& ((!(matchsel & WHO_FIELD_NIP))
- || (HasHiddenHost(acptr) && !IsAnOper(sptr))
+ || (HasHiddenHost(acptr) && !IsViewHiddenHost(sptr))
|| !ipmask_check(&cli_ip(acptr), &imask, ibits))
#if defined(UNDERNET)
&& ((!(matchsel & WHO_FIELD_ACC))
@@ -699,12 +707,12 @@
|| matchexec(cli_user(acptr)->host, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_HOS))
|| !HasHiddenHost(acptr)
- || !IsAnOper(sptr)
+ || !IsViewHiddenHost(sptr)
|| matchexec(cli_user(acptr)->realhost, mymask, minlen))
&& ((!(matchsel & WHO_FIELD_REN))
|| matchexec(cli_info(acptr), mymask, minlen))
&& ((!(matchsel & WHO_FIELD_NIP))
- || (HasHiddenHost(acptr) && !IsAnOper(sptr))
+ || (HasHiddenHost(acptr) && !IsViewHiddenHost(sptr))
|| !ipmask_check(&cli_ip(acptr), &imask, ibits))
#if defined(UNDERNET)
&& ((!(matchsel & WHO_FIELD_ACC))
Modified: ircd/trunk/ircd/m_whois.c
===================================================================
--- ircd/trunk/ircd/m_whois.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_whois.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -103,7 +103,7 @@
chptr = chan->channel;
if (!ShowChannel(sptr, chptr)
- && !(IsOper(sptr) && IsLocalChannel(chptr->chname)))
+ && !(IsAnOper(sptr) && IsLocalChannel(chptr->chname)))
continue;
if (acptr != sptr && IsZombie(chan))
@@ -154,6 +154,8 @@
if (user)
{
+ char *modes = umode_str(acptr);
+
if (user->away)
send_reply(sptr, RPL_AWAY, name, user->away);
@@ -162,25 +164,26 @@
send_reply(sptr, RPL_WHOISREGNICK, name);
else if (IsNickSuspended(acptr))
send_reply(sptr, RPL_WHOISSUSPEND, name);
-#endif /* defined(DDB) || defined(SERVICES) */
if (SeeOper(sptr,acptr))
+ send_reply(sptr, RPL_WHOISOPERATOR, name);
+
+ if (IsBot(acptr))
+ send_reply(sptr, RPL_WHOISBOT, name, feature_str(FEAT_NETWORK));
+
+#else /* UNDERNET */
+ if (SeeOper(sptr,acptr))
send_reply(sptr, RPL_WHOISOPERATOR, name);
-#if defined(UNDERNET)
if (IsAccount(acptr))
send_reply(sptr, RPL_WHOISACCOUNT, name, user->account);
#endif
- if (IsAnOper(sptr) || (acptr == sptr))
- {
- char *modes = umode_str(acptr);
-
- if (HasHiddenHost(acptr))
+ if (HasHiddenHost(acptr) && (IsViewHiddenHost(sptr) || (acptr == sptr)))
send_reply(sptr, RPL_WHOISACTUALLY, name, user->username,
user->realhost, ircd_ntoa(&cli_ip(acptr)));
- send_reply(sptr, RPL_WHOISMODES, name, *modes ? modes : "");
- }
+
+ send_reply(sptr, RPL_WHOISMODES, name, *modes ? modes : "");
#ifdef USE_SSL
if (MyConnect(acptr) && IsSSL(acptr) && ((parc >= 3) ||
Modified: ircd/trunk/ircd/m_whowas.c
===================================================================
--- ircd/trunk/ircd/m_whowas.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/m_whowas.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -91,10 +91,10 @@
{
send_reply(sptr, RPL_WHOWASUSER, temp->name, temp->username,
temp->hostname, temp->realname);
- if (IsAnOper(sptr) && temp->realhost)
+ if (IsViewHiddenHost(sptr) && temp->realhost)
send_reply(sptr, RPL_WHOISACTUALLY, temp->name, temp->username, temp->realhost, "<untracked>");
send_reply(sptr, RPL_WHOISSERVER, temp->name,
- (feature_bool(FEAT_HIS_WHOIS_SERVERNAME) && !IsOper(sptr)) ?
+ (feature_bool(FEAT_HIS_WHOIS_SERVERNAME) && !IsAnOper(sptr)) ?
feature_str(FEAT_HIS_SERVERNAME) :
temp->servername,
myctime(temp->logoff));
Modified: ircd/trunk/ircd/s_err.c
===================================================================
--- ircd/trunk/ircd/s_err.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/s_err.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -663,7 +663,7 @@
/* 309 */
{ 0 },
/* 310 */
- { 0 },
+ { RPL_WHOISHELPOP, "%s :is available for help", "310" },
/* 311 */
{ RPL_WHOISUSER, "%s %s %s * :%s", "311" },
/* 312 */
@@ -717,7 +717,7 @@
/* 334 */
{ RPL_LISTUSAGE, ":%s", "334" },
/* 335 */
- { 0 },
+ { RPL_WHOISBOT, "%s :is a \2Bot\2 on %s", "335" },
/* 336 */
{ 0 },
/* 337 */
Modified: ircd/trunk/ircd/s_numeric.c
===================================================================
--- ircd/trunk/ircd/s_numeric.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/s_numeric.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -108,7 +108,7 @@
* come from the local server
*/
if (acptr)
- sendcmdto_one((feature_bool(FEAT_HIS_REWRITE) && !IsOper(acptr)) ?
+ sendcmdto_one((feature_bool(FEAT_HIS_REWRITE) && !IsAnOper(acptr)) ?
&me : sptr,
num, num, acptr, "%C %s", acptr, parv[2]);
else
Modified: ircd/trunk/ircd/s_user.c
===================================================================
--- ircd/trunk/ircd/s_user.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/s_user.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -529,9 +529,13 @@
#elif defined(DDB) || defined(SERVICES)
{ FLAG_NICKREG, 'r' },
{ FLAG_NICKSUSPEND, 'S' },
- { FLAG_MSGONLYREG, 'R' },
+ { FLAG_ADMIN, 'a' },
+ { FLAG_HELPOPER, 'h' },
+ { FLAG_BOT, 'B' },
+ { FLAG_MSGONLYREG, 'R' },
#endif
- { FLAG_HIDDENHOST, 'x' }
+ { FLAG_HIDDENHOST, 'x' },
+ { FLAG_VIEWHIDDENHOST, 'X' }
};
/** Length of #userModeList. */
@@ -1081,7 +1085,7 @@
return 0;
#if defined(DDB) || defined(SERVICES)
- if (IsMsgOnlyReg(dest) && !IsNickRegistered(source) && !IsOper(source)) {
+ if (IsMsgOnlyReg(dest) && !IsNickRegistered(source) && !IsAnOper(source)) {
if(!is_notice)
send_reply(source, ERR_NONONREG, cli_name(source));
return 0;
@@ -1381,7 +1385,7 @@
send_reply(sptr, RPL_UMODEIS, buf);
if (HasFlag(sptr, FLAG_SERVNOTICE) && MyConnect(sptr)
&& cli_snomask(sptr) !=
- (unsigned int)(IsOper(sptr) ? SNO_OPERDEFAULT : SNO_DEFAULT))
+ (unsigned int)(IsAnOper(sptr) ? SNO_OPERDEFAULT : SNO_DEFAULT))
send_reply(sptr, RPL_SNOMASK, cli_snomask(sptr), cli_snomask(sptr));
return 0;
}
@@ -1482,6 +1486,12 @@
if (what == MODE_ADD)
do_host_hiding = 1;
break;
+ case 'X':
+ if (what == MODE_ADD)
+ SetViewHiddenHost(sptr);
+ else
+ ClearViewHiddenHost(sptr);
+ break;
#if defined(UNDERNET)
case 'r':
if (what == MODE_ADD) {
@@ -1512,6 +1522,24 @@
else
ClearNickSuspended(sptr);
break;
+ case 'a':
+ if (what == MODE_ADD)
+ SetAdmin(sptr);
+ else
+ ClearAdmin(sptr);
+ break;
+ case 'h':
+ if (what == MODE_ADD)
+ SetHelpOper(sptr);
+ else
+ ClearHelpOper(sptr);
+ break;
+ case 'B':
+ if (what == MODE_ADD)
+ SetBot(sptr);
+ else
+ ClearBot(sptr);
+ break;
case 'R':
if (what == MODE_ADD)
SetMsgOnlyReg(sptr);
@@ -1546,8 +1574,10 @@
* new umode; servers can set it, local users cannot;
* prevents users from /kick'ing or /mode -o'ing
*/
- if (!FlagHas(&setflags, FLAG_CHSERV))
+ if (!FlagHas(&setflags, FLAG_CHSERV) && !HasPriv(sptr, PRIV_UMODE_K))
ClearChannelService(sptr);
+ if (!FlagHas(&setflags, FLAG_VIEWHIDDENHOST) && HasPriv(sptr, PRIV_UMODE_X))
+ ClearViewHiddenHost(sptr);
/*
* only send wallops to opers
*/
@@ -1572,6 +1602,12 @@
ClearNickRegistered(sptr);
if (!FlagHas(&setflags, FLAG_NICKSUSPEND) && IsNickSuspended(sptr))
ClearNickSuspended(sptr);
+ if (!FlagHas(&setflags, FLAG_ADMIN))
+ ClearAdmin(sptr);
+ if (!FlagHas(&setflags, FLAG_HELPOPER))
+ ClearHelpOper(sptr);
+ if (!FlagHas(&setflags, FLAG_BOT))
+ ClearBot(sptr);
#endif /* defined(DDB) || defined(SERVICES) */
}
if (MyConnect(sptr))
Modified: ircd/trunk/ircd/watch.c
===================================================================
--- ircd/trunk/ircd/watch.c 2008-07-12 16:50:33 UTC (rev 190)
+++ ircd/trunk/ircd/watch.c 2008-07-12 20:53:24 UTC (rev 191)
@@ -146,7 +146,7 @@
send_reply(lp->value.cptr, raw, cli_name(cptr),
IsUser(cptr) ? cli_user(cptr)->username : "<N/A>",
IsUser(cptr) ?
- (HasHiddenHost(cptr) && !IsAnOper(lp->value.cptr) ?
+ (HasHiddenHost(cptr) && !IsViewHiddenHost(lp->value.cptr) ?
cli_user(cptr)->host : cli_user(cptr)->realhost)
: "<N/A>",
wt_lasttime(wptr));
@@ -166,7 +166,7 @@
if ((acptr = FindUser(nick)))
{
send_reply(cptr, raw1, cli_name(acptr), cli_user(acptr)->username,
- HasHiddenHost(acptr) && !IsAnOper(cptr) ?
+ HasHiddenHost(acptr) && !IsViewHiddenHost(cptr) ?
cli_user(acptr)->host : cli_user(acptr)->realhost,
cli_lastnick(acptr));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-12 16:50:25
|
Revision: 190
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=190&view=rev
Author: zolty
Date: 2008-07-12 09:50:33 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
Regeneracion autoconf
Modified Paths:
--------------
ircd/trunk/aclocal.m4
ircd/trunk/configure
ircd/trunk/configure.ac
Modified: ircd/trunk/aclocal.m4
===================================================================
--- ircd/trunk/aclocal.m4 2008-07-12 16:48:42 UTC (rev 189)
+++ ircd/trunk/aclocal.m4 2008-07-12 16:50:33 UTC (rev 190)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.10 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,15 +11,12 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(AC_AUTOCONF_VERSION, [2.61],,
-[m4_warning([this file was generated for autoconf 2.61.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
+m4_if(m4_PACKAGE_VERSION, [2.61],,
+[m4_fatal([this file was generated for autoconf 2.61.
+You have another version of autoconf. If you want to use that,
+you should regenerate the build system entirely.], [63])])
-# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -34,7 +31,7 @@
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.10.1], [],
+m4_if([$1], [1.10], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -50,10 +47,8 @@
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10.1])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
+[AM_AUTOMAKE_VERSION([1.10])dnl
+_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -325,7 +320,7 @@
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
@@ -373,13 +368,13 @@
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 13
+# serial 12
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -484,17 +479,16 @@
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
-_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $_am_arg | $_am_arg:* )
+ $1 | $1:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
@@ -787,7 +781,7 @@
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
Modified: ircd/trunk/configure
===================================================================
--- ircd/trunk/configure 2008-07-12 16:48:42 UTC (rev 189)
+++ ircd/trunk/configure 2008-07-12 16:50:33 UTC (rev 190)
@@ -12041,22 +12041,21 @@
fi
rm -f "$tmp/out12"
# Compute $ac_file's index in $config_headers.
-_am_arg=$ac_file
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $_am_arg | $_am_arg:* )
+ $ac_file | $ac_file:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$_am_arg" : 'X\(//\)[^/]' \| \
- X"$_am_arg" : 'X\(//\)$' \| \
- X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-echo X"$_am_arg" |
+echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
+$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X$ac_file : 'X\(//\)[^/]' \| \
+ X$ac_file : 'X\(//\)$' \| \
+ X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
+echo X$ac_file |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -12093,7 +12092,7 @@
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
Modified: ircd/trunk/configure.ac
===================================================================
--- ircd/trunk/configure.ac 2008-07-12 16:48:42 UTC (rev 189)
+++ ircd/trunk/configure.ac 2008-07-12 16:50:33 UTC (rev 190)
@@ -121,11 +121,11 @@
curl_cv_socklen_t_equiv=
for arg2 in "struct sockaddr" void ; do
for t in int size_t unsigned long "unsigned long" ; do
- AC_TRY_COMPILE([#include <sys/types.h>
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <sys/socket.h>
-int getpeername (int $arg2 *, $t *);],[$t len;
- getpeername(0, 0, &len);], [curl_cv_socklen_t_equiv="$t"
- break])
+int getpeername (int $arg2 *, $t *);]], [[$t len;
+ getpeername(0, 0, &len);]])],[curl_cv_socklen_t_equiv="$t"
+ break],[])
done
done
])
@@ -423,7 +423,7 @@
[Maximum number of network connections])
dnl Report configuration
-dnl AC_OUTPUT_COMMANDS([echo "
+dnl AC_CONFIG_COMMANDS([default-1],[[echo "
dnl ircu is now hopefully configured for your system.
dnl Host system: $host_os
@@ -438,7 +438,7 @@
dnl kqueue() engine: $unet_cv_enable_kqueue
dnl /dev/poll engine: $unet_cv_enable_devpoll
dnl epoll() engine: $unet_cv_enable_epoll
-dnl "])
+dnl "]],[[]])
dnl Output everything...
dnl AC_OUTPUT
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-12 16:48:42
|
Revision: 189
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=189&view=rev
Author: zolty
Date: 2008-07-12 09:48:42 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
Regeneracion Makefile
Modified Paths:
--------------
ircd/trunk/Makefile.in
ircd/trunk/ircd/Makefile.in
ircd/trunk/ircd/test/Makefile.in
Modified: ircd/trunk/Makefile.in
===================================================================
--- ircd/trunk/Makefile.in 2008-07-09 17:50:17 UTC (rev 188)
+++ ircd/trunk/Makefile.in 2008-07-12 16:48:42 UTC (rev 189)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -384,8 +384,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -410,8 +410,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -421,12 +421,13 @@
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
+ here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -500,10 +501,6 @@
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
-dist-lzma: distdir
- tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
- $(am__remove_distdir)
-
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -530,8 +527,6 @@
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.lzma*) \
- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -687,19 +682,18 @@
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \
- distclean distclean-generic distclean-hdr distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-man8 install-pdf \
- install-pdf-am install-ps install-ps-am install-strip \
- install-sysconfDATA installcheck installcheck-am installdirs \
- installdirs-am maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
- tags-recursive uninstall uninstall-am uninstall-man \
- uninstall-man8 uninstall-sysconfDATA
+ dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
+ distclean-generic distclean-hdr distclean-tags distcleancheck \
+ distdir distuninstallcheck dvi dvi-am html html-am info \
+ info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-html install-html-am install-info install-info-am \
+ install-man install-man8 install-pdf install-pdf-am install-ps \
+ install-ps-am install-strip install-sysconfDATA installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-man uninstall-man8 uninstall-sysconfDATA
# Make sure to filter out those CVS directories
Modified: ircd/trunk/ircd/Makefile.in
===================================================================
--- ircd/trunk/ircd/Makefile.in 2008-07-09 17:50:17 UTC (rev 188)
+++ ircd/trunk/ircd/Makefile.in 2008-07-12 16:48:42 UTC (rev 189)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -176,7 +176,7 @@
umkpasswd.$(OBJEXT)
umkpasswd_OBJECTS = $(am_umkpasswd_OBJECTS)
umkpasswd_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -679,8 +679,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -705,8 +705,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -716,12 +716,13 @@
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
+ here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
Modified: ircd/trunk/ircd/test/Makefile.in
===================================================================
--- ircd/trunk/ircd/test/Makefile.in 2008-07-09 17:50:17 UTC (rev 188)
+++ ircd/trunk/ircd/test/Makefile.in 2008-07-12 16:48:42 UTC (rev 189)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10.1 from Makefile.am.
+# Makefile.in generated by automake 1.10 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -60,7 +60,7 @@
ircd_string.$(OBJEXT)
ircd_string_t_OBJECTS = $(am_ircd_string_t_OBJECTS)
ircd_string_t_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
+DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -337,8 +337,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -350,8 +350,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -361,12 +361,13 @@
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
+ here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
- END { if (nonempty) { for (i in files) print i; }; }'`; \
+ $(AWK) ' { files[$$0] = 1; } \
+ END { for (i in files) print i; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-09 17:50:10
|
Revision: 188
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=188&view=rev
Author: zolty
Date: 2008-07-09 10:50:17 -0700 (Wed, 09 Jul 2008)
Log Message:
-----------
Mas TODO
Modified Paths:
--------------
ircd/trunk/TODO.es
Modified: ircd/trunk/TODO.es
===================================================================
--- ircd/trunk/TODO.es 2008-07-08 20:40:01 UTC (rev 187)
+++ ircd/trunk/TODO.es 2008-07-09 17:50:17 UTC (rev 188)
@@ -60,7 +60,9 @@
forma de que sea por rango.
- [D] Soporte de levels, mlock, topic, entrymsg de canales en la DDB.
- [G] Modo HalfOp (+h).
-
+ - [G] Estudiar la viabilidad de "doble ban" cuando se banea a
+ virtualhosts para que se banee tambi\xE9n a la IP real.
+
[18:11:32] <Tor> quote opmode torcum #opers,#lala
[18:11:38] <Tor> quote opmode #opers +nk lalala
[18:14:59] <Tor> burst de aways
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-08 20:39:59
|
Revision: 187
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=187&view=rev
Author: zolty
Date: 2008-07-08 13:40:01 -0700 (Tue, 08 Jul 2008)
Log Message:
-----------
Elimino el modo +T
Modified Paths:
--------------
ircd/trunk/include/channel.h
ircd/trunk/ircd/channel.c
ircd/trunk/ircd/ircd_relay.c
ircd/trunk/ircd/m_clearmode.c
Modified: ircd/trunk/include/channel.h
===================================================================
--- ircd/trunk/include/channel.h 2008-07-08 20:25:08 UTC (rev 186)
+++ ircd/trunk/include/channel.h 2008-07-08 20:40:01 UTC (rev 187)
@@ -134,8 +134,7 @@
* pending */
#define MODE_NOQUITPARTS 0x800000
-#define MODE_NOMULTITARGET 0x1000000 /**< +T No multiple targets */
-#define MODE_MODERATENOREG 0x2000000 /**< +M Moderate unauthed users */
+#define MODE_MODERATENOREG 0x1000000 /**< +M Moderate unauthed users */
#if defined(UNDERNET)
/** mode flags which take another parameter (With PARAmeterS)
@@ -143,7 +142,7 @@
#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS)
/** Available Channel modes */
-#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AbiklmnopstUvrDcCNuMT" : "biklmnopstvrDcCNuMT"
+#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AbiklmnopstUvrDcCNuM" : "biklmnopstvrDcCNuM"
/** Available Channel modes that take parameters */
#define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "AbkloUv" : "bklov"
#elif defined(DDB) || defined(SERVICES)
@@ -152,7 +151,7 @@
#define MODE_WPARAS (MODE_OWNER|MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT)
/** Available Channel modes */
-#define infochanmodes "biklmnopstvrRDqcCNuMT"
+#define infochanmodes "biklmnopstvrRDqcCNuM"
/** Available Channel modes that take parameters */
#define infochanmodeswithparams "bklovq"
#else
@@ -161,7 +160,7 @@
#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT)
/** Available Channel modes */
-#define infochanmodes "biklmnopstvrDcCNuMT"
+#define infochanmodes "biklmnopstvrDcCNuM"
/** Available Channel modes that take parameters */
#define infochanmodeswithparams "bklov"
#endif
Modified: ircd/trunk/ircd/channel.c
===================================================================
--- ircd/trunk/ircd/channel.c 2008-07-08 20:25:08 UTC (rev 186)
+++ ircd/trunk/ircd/channel.c 2008-07-08 20:40:01 UTC (rev 187)
@@ -883,8 +883,6 @@
*mbuf++ = 'u';
if (chptr->mode.mode & MODE_DELJOINS)
*mbuf++ = 'D';
- if (chptr->mode.mode & MODE_NOMULTITARGET)
- *mbuf++ = 'T';
if (chptr->mode.mode & MODE_MODERATENOREG)
*mbuf++ = 'M';
else if (MyUser(cptr) && (chptr->mode.mode & MODE_WASDELJOINS))
@@ -1725,7 +1723,6 @@
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
MODE_NONOTICE, 'N',
- MODE_NOMULTITARGET, 'T',
MODE_MODERATENOREG, 'M',
0x0, 0x0
};
@@ -2228,7 +2225,7 @@
#if defined(DDB) || defined(SERVICES)
MODE_REGCHAN |
#endif
- MODE_NOCTCP | MODE_NONOTICE | MODE_NOMULTITARGET |
+ MODE_NOCTCP | MODE_NONOTICE |
MODE_NOQUITPARTS | MODE_NOCOLOUR | MODE_MODERATENOREG |
MODE_DELJOINS | MODE_WASDELJOINS);
@@ -2394,7 +2391,6 @@
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
MODE_NONOTICE, 'N',
- MODE_NOMULTITARGET, 'T',
MODE_MODERATENOREG, 'M',
0x0, 0x0
};
@@ -3559,7 +3555,6 @@
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
MODE_NONOTICE, 'N',
- MODE_NOMULTITARGET, 'T',
MODE_MODERATENOREG, 'M',
MODE_ADD, '+',
MODE_DEL, '-',
Modified: ircd/trunk/ircd/ircd_relay.c
===================================================================
--- ircd/trunk/ircd/ircd_relay.c 2008-07-08 20:25:08 UTC (rev 186)
+++ ircd/trunk/ircd/ircd_relay.c 2008-07-08 20:40:01 UTC (rev 187)
@@ -105,14 +105,6 @@
check_target_limit(sptr, chptr, chptr->chname, 0))
return;
- /* +T check */
-#if 0
- if ((chptr->mode.mode & MODE_NOMULTITARGET) && (targetc > 1)) {
- send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
- return;
- }
-#endif
-
/* +cC checks */
if (chptr->mode.mode & MODE_NOCOLOUR)
for (ch=text;*ch;ch++)
@@ -161,12 +153,6 @@
if ((chptr->mode.mode & MODE_NONOTICE))
return;
-#if 0
- /* +T check */
- if ((chptr->mode.mode & MODE_NOMULTITARGET) && (targetc > 1))
- return;
-#endif
-
/* +cC checks */
if (chptr->mode.mode & MODE_NOCOLOUR)
for (ch=text;*ch;ch++)
Modified: ircd/trunk/ircd/m_clearmode.c
===================================================================
--- ircd/trunk/ircd/m_clearmode.c 2008-07-08 20:25:08 UTC (rev 186)
+++ ircd/trunk/ircd/m_clearmode.c 2008-07-08 20:40:01 UTC (rev 187)
@@ -76,7 +76,6 @@
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
MODE_NONOTICE, 'N',
- MODE_NOMULTITARGET, 'T',
MODE_MODERATENOREG, 'M',
0x0, 0x0
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-07-08 20:25:06
|
Revision: 186
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=186&view=rev
Author: zolty
Date: 2008-07-08 13:25:08 -0700 (Tue, 08 Jul 2008)
Log Message:
-----------
fixes en DDB
Modified Paths:
--------------
ircd/trunk/ircd/ddb.c
ircd/trunk/ircd/m_db.c
Modified: ircd/trunk/ircd/ddb.c
===================================================================
--- ircd/trunk/ircd/ddb.c 2008-06-16 21:01:26 UTC (rev 185)
+++ ircd/trunk/ircd/ddb.c 2008-07-08 20:25:08 UTC (rev 186)
@@ -244,7 +244,6 @@
sendto_opmask(0, SNO_OLDSNO, "Lo: %d Hashtable_Lo: %d Hi: %d Hashtable_Hi %d",
lo, ddb_hashtable_lo[table], hi, ddb_hashtable_hi[table]);
-#if 0
if ((ddb_hashtable_hi[table] != hi) || (ddb_hashtable_lo[table] != lo))
{
struct DLink *lp;
@@ -267,7 +266,6 @@
}
}
else
-#endif
{
ddb_db_hash_write(table);
@@ -320,8 +318,7 @@
collapse(mask);
if (!match(mask, cli_name(&me)))
{
-/* int i = 0; */
- int update = 0;
+ int update = 0, i = 0;
if ((strlen(key) + 1 > key_len) || (!keytemp))
{
@@ -333,14 +330,12 @@
assert(0 != keytemp);
}
strcpy(keytemp, key);
-
-/*
+
while (keytemp[i])
{
- keytemp[i] = ToLower(keytemp[i]);
+ keytemp[i] = ToLower(keytemp[i]);
i++;
}
-*/
if (content)
update = ddb_add_key(table, keytemp, content);
@@ -367,7 +362,7 @@
char *k, *c;
int hashi;
int delete = 0;
-
+
ddb_iterator_key = NULL;
delete = ddb_del_key(table, key);
@@ -410,7 +405,7 @@
int delete = 0;
ddb_iterator_key = NULL;
-
+
hashi = ddb_hash_register(key, ddb_resident_table[table]);
ddb3 = &ddb_data_table[table][hashi];
@@ -619,6 +614,12 @@
return 0;
}
strcpy(k, key);
+
+ while (k[i])
+ {
+ k[i] = ToLower(k[i]);
+ i++;
+ }
hashi = ddb_hash_register(k, ddb_resident_table[table]);
Modified: ircd/trunk/ircd/m_db.c
===================================================================
--- ircd/trunk/ircd/m_db.c 2008-06-16 21:01:26 UTC (rev 185)
+++ ircd/trunk/ircd/m_db.c 2008-07-08 20:25:08 UTC (rev 186)
@@ -131,10 +131,12 @@
{
if (lp->value.cptr != cptr)
{
+
+ /* TODO-ZOLTAN: Mirar si es necesario (ESNET) */
+ cli_serv(lp->value.cptr)->ddb_open &= ~ddb_mask;
+
sendcmdto_one(&me, CMD_DB, lp->value.cptr, "%s 0 D %s %c",
parv[1], parv[4], table);
- /* TODO-ZOLTAN: Mirar si es necesario (ESNET) */
- /* cli_serv(lp->value.cptr)->ddb_open &= ~ddb_mask); */
}
}
@@ -157,8 +159,8 @@
sendcmdto_one(&me, CMD_DB, cptr, "%s 0 E %s %c", cli_name(cptr),
parv[4], table);
- /* TODO-ZOLTAN: Creo que hay que mandar a todos */
- cli_serv(cptr)->ddb_open &= ~ddb_mask;
+ /* TODO-ZOLTAN: hay que mandar a todos ? */
+ /* cli_serv(cptr)->ddb_open &= ~ddb_mask; */
sendcmdto_one(&me, CMD_DB, cptr, "%s 0 J %u %c", cli_name(cptr),
ddb_id_table[table], table);
@@ -367,7 +369,7 @@
sendcmdto_one(&me, CMD_DB, lp->value.cptr, "%s %u %c %s",
parv[1], id, table, parv[4]);
}
- }
+ }
if (strcmp(parv[4], "*"))
ddb_new_register(cptr, table, id, parv[1], parv[4], (!delete ? parv[5] : NULL));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-06-16 21:01:30
|
Revision: 185
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=185&view=rev
Author: zolty
Date: 2008-06-16 14:01:26 -0700 (Mon, 16 Jun 2008)
Log Message:
-----------
Habilitamos tabla f, tabla o y tabla p de la DDB
Modified Paths:
--------------
ircd/trunk/include/ddb.h
ircd/trunk/ircd/ddb.c
Modified: ircd/trunk/include/ddb.h
===================================================================
--- ircd/trunk/include/ddb.h 2008-06-16 20:53:45 UTC (rev 184)
+++ ircd/trunk/include/ddb.h 2008-06-16 21:01:26 UTC (rev 185)
@@ -51,10 +51,16 @@
#define DDB_CHANDB 'c'
/** Channels table (nicks) of %DDB Distributed Databases. */
#define DDB_CHANDB2 'd'
+/** Features table of %DDB Distributed Databases. */
+#define DDB_FEATUREDB 'f'
/** Ilines table of %DDB Distributed Databases. */
#define DDB_ILINEDB 'i'
/** Nicks table of %DDB Distributed Databases. */
#define DDB_NICKDB 'n'
+/** Operators table of %DDB Distributed Databases. */
+#define DDB_OPERDB 'o'
+/** Privileges table of %DDB Distributed Databases. */
+#define DDB_PRIVSDB 'p'
/** 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-06-16 20:53:45 UTC (rev 184)
+++ ircd/trunk/ircd/ddb.c 2008-06-16 21:01:26 UTC (rev 185)
@@ -206,8 +206,11 @@
*/
ddb_resident_table[DDB_CHANDB] = 4096;
ddb_resident_table[DDB_CHANDB2] = 32768;
+ ddb_resident_table[DDB_FEATUREDB] = 256;
ddb_resident_table[DDB_ILINEDB] = 256;
ddb_resident_table[DDB_NICKDB] = 32768;
+ ddb_resident_table[DDB_OPERDB] = 256;
+ ddb_resident_table[DDB_PRIVSDB] = 256;
ddb_resident_table[DDB_VHOSTDB] = 256;
ddb_resident_table[DDB_CONFIGDB] = 256;
@@ -378,14 +381,6 @@
strcpy(k, key);
strcpy(c, content);
-/*
- while (c[i] != 0)
- {
- k[i] = ToLower(c[i]);
- i++;
- }
-*/
-
ddb_key(ddb) = k;
ddb_content(ddb) = c;
ddb_next(ddb) = NULL;
@@ -625,19 +620,10 @@
}
strcpy(k, key);
-/*
- while (k[i])
- {
- k[i] = ToLower(k[i]);
- i++;
- }
-*/
-
hashi = ddb_hash_register(k, ddb_resident_table[table]);
for (ddb = ddb_data_table[table][hashi]; ddb; ddb = ddb_next(ddb))
{
-/* if (!strcmp(ddb_key(ddb), k)) */
if (!ircd_strcmp(ddb_key(ddb), k))
{
assert(0 != ddb_content(ddb));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-06-16 20:53:46
|
Revision: 184
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=184&view=rev
Author: zolty
Date: 2008-06-16 13:53:45 -0700 (Mon, 16 Jun 2008)
Log Message:
-----------
Fix del bug de creacion directorio database
Modified Paths:
--------------
ircd/trunk/ircd/ddb_db_native.c
Modified: ircd/trunk/ircd/ddb_db_native.c
===================================================================
--- ircd/trunk/ircd/ddb_db_native.c 2008-06-15 17:38:29 UTC (rev 183)
+++ ircd/trunk/ircd/ddb_db_native.c 2008-06-16 20:53:45 UTC (rev 184)
@@ -67,17 +67,22 @@
ddb_db_init(void)
{
char path[1024];
- struct stat *sStat;
+ struct stat sStat;
unsigned char table;
int fd;
-/* Lo comentamos porque peta
- if ((stat(feature_str(FEAT_DDBPATH), sStat) == 0))
+ ircd_snprintf(0, path, sizeof(path), "%s/", feature_str(FEAT_DDBPATH));
+ if ((stat(path, &sStat) == -1))
{
if (0 != mkdir(feature_str(FEAT_DDBPATH), 0775))
ddb_die("Error when creating %s directory", feature_str(FEAT_DDBPATH));
}
-*/
+ else
+ {
+ if (!S_ISDIR(sStat.st_mode))
+ ddb_die("Error S_ISDIR(%s)", feature_str(FEAT_DDBPATH));
+ }
+
/* Verify if hashes file is exist. */
ircd_snprintf(0, path, sizeof(path), "%s/hashes", feature_str(FEAT_DDBPATH));
alarm(3);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-06-15 17:38:24
|
Revision: 183
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=183&view=rev
Author: zolty
Date: 2008-06-15 10:38:29 -0700 (Sun, 15 Jun 2008)
Log Message:
-----------
Transicion deep.space P09
Modified Paths:
--------------
ircd/trunk/ircd/m_server.c
Modified: ircd/trunk/ircd/m_server.c
===================================================================
--- ircd/trunk/ircd/m_server.c 2008-06-12 12:38:26 UTC (rev 182)
+++ ircd/trunk/ircd/m_server.c 2008-06-15 17:38:29 UTC (rev 183)
@@ -560,8 +560,12 @@
if (!prot)
return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]);
else if (prot < atoi(MINOR_PROTOCOL))
+#if 1 /* TRANSICION IRC-HISPANO */
+ prot = atoi(MINOR_PROTOCOL);
+#else
return exit_new_server(cptr, sptr, host, timestamp,
"Incompatible protocol: %s", parv[5]);
+#endif /* TRANSICION IRC-HISPANO */
Debug((DEBUG_INFO, "Got SERVER %s with timestamp [%s] age %Tu (%Tu)",
host, parv[4], start_timestamp, cli_serv(&me)->timestamp));
@@ -697,8 +701,12 @@
if (!prot)
return exit_client_msg(cptr, sptr, &me, "Bogus protocol (%s)", parv[5]);
else if (prot < atoi(MINOR_PROTOCOL))
+#if 1 /* TRANSICION IRC-HISPANO */
+ prot = atoi(MINOR_PROTOCOL);
+#else
return exit_new_server(cptr, sptr, host, timestamp,
"Incompatible protocol: %s", parv[5]);
+#endif /* TRANSICION IRC-HISPANO */
Debug((DEBUG_INFO, "Got SERVER %s with timestamp [%s] age %Tu (%Tu)",
host, parv[4], start_timestamp, cli_serv(&me)->timestamp));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zo...@us...> - 2008-06-12 12:38:27
|
Revision: 182
http://irc-dev.svn.sourceforge.net/irc-dev/?rev=182&view=rev
Author: zolty
Date: 2008-06-12 05:38:26 -0700 (Thu, 12 Jun 2008)
Log Message:
-----------
Regeneracion de autotools
Modified Paths:
--------------
ircd/trunk/Makefile.in
ircd/trunk/aclocal.m4
ircd/trunk/config.h.in
ircd/trunk/configure
ircd/trunk/ircd/Makefile.in
ircd/trunk/ircd/test/Makefile.in
Modified: ircd/trunk/Makefile.in
===================================================================
--- ircd/trunk/Makefile.in 2008-06-12 12:28:50 UTC (rev 181)
+++ ircd/trunk/Makefile.in 2008-06-12 12:38:26 UTC (rev 182)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -384,8 +384,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -410,8 +410,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -421,13 +421,12 @@
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
@@ -501,6 +500,10 @@
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
$(am__remove_distdir)
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__remove_distdir)
@@ -527,6 +530,8 @@
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
@@ -682,18 +687,19 @@
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-hook dist-shar dist-tarZ dist-zip distcheck distclean \
- distclean-generic distclean-hdr distclean-tags distcleancheck \
- distdir distuninstallcheck dvi dvi-am html html-am info \
- info-am install install-am install-data install-data-am \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-html install-html-am install-info install-info-am \
- install-man install-man8 install-pdf install-pdf-am install-ps \
- install-ps-am install-strip install-sysconfDATA installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
- uninstall-man uninstall-man8 uninstall-sysconfDATA
+ dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \
+ distclean distclean-generic distclean-hdr distclean-tags \
+ distcleancheck distdir distuninstallcheck dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-man8 install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ install-sysconfDATA installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+ tags-recursive uninstall uninstall-am uninstall-man \
+ uninstall-man8 uninstall-sysconfDATA
# Make sure to filter out those CVS directories
Modified: ircd/trunk/aclocal.m4
===================================================================
--- ircd/trunk/aclocal.m4 2008-06-12 12:28:50 UTC (rev 181)
+++ ircd/trunk/aclocal.m4 2008-06-12 12:38:26 UTC (rev 182)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -11,12 +11,15 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
-m4_if(m4_PACKAGE_VERSION, [2.61],,
-[m4_fatal([this file was generated for autoconf 2.61.
-You have another version of autoconf. If you want to use that,
-you should regenerate the build system entirely.], [63])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(AC_AUTOCONF_VERSION, [2.61],,
+[m4_warning([this file was generated for autoconf 2.61.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
-# Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -31,7 +34,7 @@
[am__api_version='1.10'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.10], [],
+m4_if([$1], [1.10.1], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -47,8 +50,10 @@
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10])dnl
-_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)])
+[AM_AUTOMAKE_VERSION([1.10.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
@@ -320,7 +325,7 @@
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
@@ -368,13 +373,13 @@
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006 Free Software Foundation, Inc.
+# 2005, 2006, 2008 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 12
+# serial 13
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -479,16 +484,17 @@
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
+_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $1 | $1:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
@@ -781,7 +787,7 @@
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
-# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in.
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
Modified: ircd/trunk/config.h.in
===================================================================
--- ircd/trunk/config.h.in 2008-06-12 12:28:50 UTC (rev 181)
+++ ircd/trunk/config.h.in 2008-06-12 12:38:26 UTC (rev 182)
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: config.h.in,v 1.16 2008-01-19 19:25:56 zolty Exp $
+ * $Id: acconfig.h,v 1.4 2007-04-19 22:53:46 zolty Exp $
*
*/
#ifndef INCLUDED_config_h
Modified: ircd/trunk/configure
===================================================================
--- ircd/trunk/configure 2008-06-12 12:28:50 UTC (rev 181)
+++ ircd/trunk/configure 2008-06-12 12:38:26 UTC (rev 182)
@@ -12041,21 +12041,22 @@
fi
rm -f "$tmp/out12"
# Compute $ac_file's index in $config_headers.
+_am_arg=$ac_file
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
- $ac_file | $ac_file:* )
+ $_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
-echo "timestamp for $ac_file" >`$as_dirname -- $ac_file ||
-$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X$ac_file : 'X\(//\)[^/]' \| \
- X$ac_file : 'X\(//\)$' \| \
- X$ac_file : 'X\(/\)' \| . 2>/dev/null ||
-echo X$ac_file |
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+echo X"$_am_arg" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
@@ -12092,7 +12093,7 @@
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
- if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`$as_dirname -- "$mf" ||
$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$mf" : 'X\(//\)[^/]' \| \
Modified: ircd/trunk/ircd/Makefile.in
===================================================================
--- ircd/trunk/ircd/Makefile.in 2008-06-12 12:28:50 UTC (rev 181)
+++ ircd/trunk/ircd/Makefile.in 2008-06-12 12:38:26 UTC (rev 182)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -176,7 +176,7 @@
umkpasswd.$(OBJEXT)
umkpasswd_OBJECTS = $(am_umkpasswd_OBJECTS)
umkpasswd_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -679,8 +679,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -705,8 +705,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -716,13 +716,12 @@
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
Modified: ircd/trunk/ircd/test/Makefile.in
===================================================================
--- ircd/trunk/ircd/test/Makefile.in 2008-06-12 12:28:50 UTC (rev 181)
+++ ircd/trunk/ircd/test/Makefile.in 2008-06-12 12:38:26 UTC (rev 182)
@@ -1,8 +1,8 @@
-# Makefile.in generated by automake 1.10 from Makefile.am.
+# Makefile.in generated by automake 1.10.1 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -60,7 +60,7 @@
ircd_string.$(OBJEXT)
ircd_string_t_OBJECTS = $(am_ircd_string_t_OBJECTS)
ircd_string_t_LDADD = $(LDADD)
-DEFAULT_INCLUDES = -I. -I$(top_builddir)@am__isrc@
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
@@ -337,8 +337,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
@@ -350,8 +350,8 @@
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
@@ -361,13 +361,12 @@
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
tags=; \
- here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$tags $$unique
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Toni G. <zo...@us...> - 2008-01-27 12:47:30
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2008-01-27 12:47:27 UTC
Modified files:
ircd/s_bsd.c
Log message:
SSL Fix
---------------------- diff included ----------------------
Index: ircd-ircdev/ircd/s_bsd.c
diff -u ircd-ircdev/ircd/s_bsd.c:1.25 ircd-ircdev/ircd/s_bsd.c:1.26
--- ircd-ircdev/ircd/s_bsd.c:1.25 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/s_bsd.c Sun Jan 27 04:47:16 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Functions that now (or in the past) relied on BSD APIs.
- * @version $Id: s_bsd.c,v 1.25 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: s_bsd.c,v 1.26 2008/01/27 12:47:16 zolty Exp $
*/
#include "config.h"
@@ -924,6 +924,9 @@
if (!con_freeflag(con) && !cptr)
free_connection(con);
+#ifdef USE_SSL
+ ssl_free(ev_socket(ev));
+#endif
break;
case ET_CONNECT: /* socket connection completed */
----------------------- End of diff -----------------------
|
|
From: Toni G. <zo...@us...> - 2008-01-19 19:26:18
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2008-01-19 19:26:17 UTC
Modified files:
ChangeLog ChangeLog.es config.h.in include/channel.h
include/ircd_features.h include/patchlevel.h ircd/channel.c
ircd/ircd_features.c ircd/m_clearmode.c ircd/m_mode.c
ircd/m_opmode.c ircd/m_wallusers.c ircd/m_wallvoices.c
Log message:
Author: zoltan <zo...@ir...>
Log message:
2008-01-19 Toni Garc�a <zo...@ir...> 1.0.beta12
* Transicion con IRC-Hispano
* Soporte de XMODE JCEA
---------------------- diff included ----------------------
Index: ircd-ircdev/ChangeLog
diff -u ircd-ircdev/ChangeLog:1.60 ircd-ircdev/ChangeLog:1.61
--- ircd-ircdev/ChangeLog:1.60 Sun Jan 6 16:14:01 2008
+++ ircd-ircdev/ChangeLog Sat Jan 19 11:25:55 2008
@@ -1,10 +1,14 @@
#
# ChangeLog for ircd-ircdev
#
-# $Id: ChangeLog,v 1.60 2008/01/07 00:14:01 zolty Exp $
+# $Id: ChangeLog,v 1.61 2008/01/19 19:25:55 zolty Exp $
#
# Insert new changes at beginning of the change list.
#
+2008-01-19 Toni Garc�a <zo...@ir...> 1.0.beta12
+ * IRC-Hispano Transition
+ * JCEA XMODE Support
+
2008-01-07 Toni Garcïa <zo...@ir...> 1.0.beta11
* Channel mode +C
* Channel mode +c
Index: ircd-ircdev/ChangeLog.es
diff -u ircd-ircdev/ChangeLog.es:1.60 ircd-ircdev/ChangeLog.es:1.61
--- ircd-ircdev/ChangeLog.es:1.60 Sun Jan 6 16:14:02 2008
+++ ircd-ircdev/ChangeLog.es Sat Jan 19 11:25:56 2008
@@ -1,10 +1,14 @@
#
# Log de Cambios para ircd-ircdev
#
-# $Id: ChangeLog.es,v 1.60 2008/01/07 00:14:02 zolty Exp $
+# $Id: ChangeLog.es,v 1.61 2008/01/19 19:25:56 zolty Exp $
#
# Insertar los nuevos cambios al principio de esta lista de cambios.
#
+2008-01-19 Toni Garc�a <zo...@ir...> 1.0.beta12
+ * Transicion con IRC-Hispano
+ * Soporte de XMODE JCEA
+
2008-01-07 Toni Garc�a <zo...@ir...> 1.0.beta11
* Modo de canal +C
* Modo de canal +c
Index: ircd-ircdev/config.h.in
diff -u ircd-ircdev/config.h.in:1.15 ircd-ircdev/config.h.in:1.16
--- ircd-ircdev/config.h.in:1.15 Tue Dec 11 15:38:21 2007
+++ ircd-ircdev/config.h.in Sat Jan 19 11:25:56 2008
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: config.h.in,v 1.15 2007/12/11 23:38:21 zolty Exp $
+ * $Id: config.h.in,v 1.16 2008/01/19 19:25:56 zolty Exp $
*
*/
#ifndef INCLUDED_config_h
Index: ircd-ircdev/include/channel.h
diff -u ircd-ircdev/include/channel.h:1.20 ircd-ircdev/include/channel.h:1.21
--- ircd-ircdev/include/channel.h:1.20 Sun Jan 6 16:14:02 2008
+++ ircd-ircdev/include/channel.h Sat Jan 19 11:25:57 2008
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Channel management and maintenance.
- * @version $Id: channel.h,v 1.20 2008/01/07 00:14:02 zolty Exp $
+ * @version $Id: channel.h,v 1.21 2008/01/19 19:25:57 zolty Exp $
*/
#ifndef INCLUDED_channel_h
#define INCLUDED_channel_h
@@ -400,6 +400,9 @@
#if defined(DDB)
#define MODEBUF_DEST_BOTMODE 0x20000 /**< Mode send by Bot */
#endif
+#if 1 /* TRANSICION IRC-HISPANO */
+#define MODEBUF_DEST_XMODE_JCEA 0x40000
+#endif
#define MB_TYPE(mb, i) ((mb)->mb_modeargs[(i)].mbm_type)
#define MB_UINT(mb, i) ((mb)->mb_modeargs[(i)].mbm_arg.mbma_uint)
Index: ircd-ircdev/include/ircd_features.h
diff -u ircd-ircdev/include/ircd_features.h:1.22 ircd-ircdev/include/ircd_features.h:1.23
--- ircd-ircdev/include/ircd_features.h:1.22 Tue Dec 11 15:38:23 2007
+++ ircd-ircdev/include/ircd_features.h Sat Jan 19 11:25:57 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Public interfaces and declarations for dealing with configurable features.
- * @version $Id: ircd_features.h,v 1.22 2007/12/11 23:38:23 zolty Exp $
+ * @version $Id: ircd_features.h,v 1.23 2008/01/19 19:25:57 zolty Exp $
*/
#ifndef INCLUDED_features_h
#define INCLUDED_features_h
@@ -203,6 +203,9 @@
FEAT_SPAM_JOINED_TIME,
FEAT_SPAM_FJP_COUNT,
+#if 1 /* TRANSICION IRC-HISPANO */
+ FEAT_TRANSICION_HISPANO,
+#endif
FEAT_LAST_F
};
Index: ircd-ircdev/include/patchlevel.h
diff -u ircd-ircdev/include/patchlevel.h:1.59 ircd-ircdev/include/patchlevel.h:1.60
--- ircd-ircdev/include/patchlevel.h:1.59 Sun Jan 6 16:14:05 2008
+++ ircd-ircdev/include/patchlevel.h Sat Jan 19 11:25:58 2008
@@ -17,10 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: patchlevel.h,v 1.59 2008/01/07 00:14:05 zolty Exp $
+ * $Id: patchlevel.h,v 1.60 2008/01/19 19:25:58 zolty Exp $
*
*/
-#define PATCHLEVEL "11"
+#define PATCHLEVEL "12"
#define RELEASE "1.0.beta"
Index: ircd-ircdev/ircd/channel.c
diff -u ircd-ircdev/ircd/channel.c:1.36 ircd-ircdev/ircd/channel.c:1.37
--- ircd-ircdev/ircd/channel.c:1.36 Sat Jan 19 05:28:51 2008
+++ ircd-ircdev/ircd/channel.c Sat Jan 19 11:25:58 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Channel management and maintanance
- * @version $Id: channel.c,v 1.36 2008/01/19 13:28:51 zolty Exp $
+ * @version $Id: channel.c,v 1.37 2008/01/19 19:25:58 zolty Exp $
*/
#include "config.h"
@@ -2001,6 +2001,16 @@
addbuf_i || addbuf_local_i ? "+" : "",
addbuf, addbuf_local,
remstr, addstr);
+#if 1 /* TRANSICION IRC-HISPANO */
+ else if (mbuf->mb_dest & MODEBUF_DEST_XMODE_JCEA)
+ sendcmdto_channel(app_source, CMD_MODE, mbuf->mb_channel, NULL, SKIP_SERVERS,
+ "%H x%s%s%s%s%s%s%s%s", mbuf->mb_channel,
+ rembuf_i || rembuf_local_i ? "-" : "",
+ rembuf, rembuf_local,
+ addbuf_i || addbuf_local_i ? "+" : "",
+ addbuf, addbuf_local,
+ remstr, addstr);
+#endif
else
#endif /* defined(DDB) */
sendcmdto_channel(app_source, CMD_MODE, mbuf->mb_channel, NULL, SKIP_SERVERS,
@@ -2110,6 +2120,14 @@
addbuf, remstr, addstr,
mbuf->mb_channel->creationtime);
#endif /* defined(DDB) */
+#if 1 /* TRANSICION IRC-HISPANO */
+ } else if (mbuf->mb_dest & MODEBUF_DEST_XMODE_JCEA) {
+ sendcmdto_serv(mbuf->mb_source, CMD_MODE, mbuf->mb_connect,
+ "%H x%s%s%s%s%s%s %Tu", mbuf->mb_channel,
+ rembuf_i ? "-" : "", rembuf, addbuf_i ? "+" : "",
+ addbuf, remstr, addstr,
+ mbuf->mb_channel->creationtime);
+#endif
} else {
/*
* We're propagating a normal (or HACK3 or HACK4) MODE command
Index: ircd-ircdev/ircd/ircd_features.c
diff -u ircd-ircdev/ircd/ircd_features.c:1.24 ircd-ircdev/ircd/ircd_features.c:1.25
--- ircd-ircdev/ircd/ircd_features.c:1.24 Sat Jan 19 05:28:51 2008
+++ ircd-ircdev/ircd/ircd_features.c Sat Jan 19 11:25:59 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Implementation of configurable feature support.
- * @version $Id: ircd_features.c,v 1.24 2008/01/19 13:28:51 zolty Exp $
+ * @version $Id: ircd_features.c,v 1.25 2008/01/19 19:25:59 zolty Exp $
*/
#include "config.h"
@@ -532,6 +532,10 @@
F_I(SPAM_JOINED_TIME, 0, 60, 0),
F_I(SPAM_FJP_COUNT, 0, 5, 0),
+#if 1 /* TRANSICION IRC-HISPANO */
+ F_B(TRANSICION_HISPANO, 0, 1, 0),
+#endif
+
#undef F_S
#undef F_B
#undef F_I
Index: ircd-ircdev/ircd/m_clearmode.c
diff -u ircd-ircdev/ircd/m_clearmode.c:1.15 ircd-ircdev/ircd/m_clearmode.c:1.16
--- ircd-ircdev/ircd/m_clearmode.c:1.15 Sun Jan 6 16:14:06 2008
+++ ircd-ircdev/ircd/m_clearmode.c Sat Jan 19 11:26:03 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for CLEARMODE command.
- * @version $Id: m_clearmode.c,v 1.15 2008/01/07 00:14:06 zolty Exp $
+ * @version $Id: m_clearmode.c,v 1.16 2008/01/19 19:26:03 zolty Exp $
*/
#include "config.h"
@@ -250,6 +250,14 @@
const char *chname, *qreason;
int force = 0;
+#if 1 /* TRANSICION IRC-HISPANO */
+ if (feature_bool(FEAT_TRANSICION_HISPANO))
+ {
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Durante la transicion al nuevo ircd, el comando CLEARMODE esta deshabilitado", sptr);
+ return 0;
+ }
+#endif
+
if (!feature_bool(FEAT_CONFIG_OPERCMDS))
return send_reply(sptr, ERR_DISABLED, "CLEARMODE");
Index: ircd-ircdev/ircd/m_mode.c
diff -u ircd-ircdev/ircd/m_mode.c:1.17 ircd-ircdev/ircd/m_mode.c:1.18
--- ircd-ircdev/ircd/m_mode.c:1.17 Sat Jan 19 05:28:53 2008
+++ ircd-ircdev/ircd/m_mode.c Sat Jan 19 11:26:03 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for MODE command.
- * @version $Id: m_mode.c,v 1.17 2008/01/19 13:28:53 zolty Exp $
+ * @version $Id: m_mode.c,v 1.18 2008/01/19 19:26:03 zolty Exp $
*/
#include "config.h"
@@ -115,6 +115,23 @@
MODE_PARSE_FORCE), /* Force it to take */
member);
return modebuf_flush(&mbuf);
+
+#if 1 /* TRANSICION IRC-HISPANO */
+ } else if (feature_bool(FEAT_TRANSICION_HISPANO) && IsOper(sptr) && strchr(parv[2], 'x')) {
+ modebuf_init(&mbuf, sptr, cptr, chptr,
+ (MODEBUF_DEST_CHANNEL | /* Send MODE to channel */
+ MODEBUF_DEST_SERVER | /* And to server */
+ MODEBUF_DEST_XMODE_JCEA | /* Use XMODE */
+ MODEBUF_DEST_HACK4)); /* Generate a HACK(4) notice */
+
+ mode_parse(&mbuf, cptr, sptr, chptr, parc - 2, parv + 2,
+ (MODE_PARSE_SET | /* Set the modes on the channel */
+ MODE_PARSE_STRICT | /* Be strict about it */
+ MODE_PARSE_FORCE), /* And force them to be accepted */
+ NULL);
+
+ modebuf_flush(&mbuf); /* flush the modes */
+#endif
} else
mode_parse(0, cptr, sptr, chptr, parc - 2, parv + 2,
(member ? MODE_PARSE_NOTOPER : MODE_PARSE_NOTMEMBER), member);
@@ -194,7 +211,7 @@
(MODEBUF_DEST_CHANNEL | /* Send mode to clients */
MODEBUF_DEST_SERVER)); /* Send mode to servers */
#else
- else
+ else
modebuf_init(&mbuf, sptr, cptr, chptr,
(MODEBUF_DEST_CHANNEL | /* Send mode to clients */
MODEBUF_DEST_SERVER | /* Send mode to servers */
@@ -217,6 +234,21 @@
MODE_PARSE_STRICT | /* Interpret it strictly */
MODE_PARSE_FORCE), /* And force it to be accepted */
NULL);
+#if 1 /* TRANSICION IRC-HISPANO */
+ } else if (IsOper(sptr) && strchr(parv[2], 'x')) {
+ modebuf_init(&mbuf, sptr, cptr, chptr,
+ (MODEBUF_DEST_CHANNEL | /* Send MODE to channel */
+ MODEBUF_DEST_SERVER | /* And to server */
+ MODEBUF_DEST_XMODE_JCEA | /* Use XMODE */
+ MODEBUF_DEST_HACK4)); /* Generate a HACK(4) notice */
+
+ mode_parse(&mbuf, cptr, sptr, chptr, parc - 2, parv + 2,
+ (MODE_PARSE_SET | /* Set the modes on the channel */
+ MODE_PARSE_FORCE), /* And force them to be accepted */
+ NULL);
+
+ modebuf_flush(&mbuf); /* flush the modes */
+#endif
} else if (!(member = find_member_link(chptr, sptr)) || !(IsChanOwner(member)
|| IsChanOp(member))) {
#else
Index: ircd-ircdev/ircd/m_opmode.c
diff -u ircd-ircdev/ircd/m_opmode.c:1.8 ircd-ircdev/ircd/m_opmode.c:1.9
--- ircd-ircdev/ircd/m_opmode.c:1.8 Thu Apr 19 15:53:49 2007
+++ ircd-ircdev/ircd/m_opmode.c Sat Jan 19 11:26:03 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for OPERMODE command.
- * @version $Id: m_opmode.c,v 1.8 2007/04/19 22:53:49 zolty Exp $
+ * @version $Id: m_opmode.c,v 1.9 2008/01/19 19:26:03 zolty Exp $
*/
#include "config.h"
@@ -101,6 +101,14 @@
const char *qreason;
int force = 0;
+#if 1 /* TRANSICION IRC-HISPANO */
+ if (feature_bool(FEAT_TRANSICION_HISPANO))
+ {
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Durante la transicion al nuevo ircd, el comando OPMODE esta deshabilitado", sptr);
+ return 0;
+ }
+#endif
+
if (!feature_bool(FEAT_CONFIG_OPERCMDS))
return send_reply(sptr, ERR_DISABLED, "OPMODE");
Index: ircd-ircdev/ircd/m_wallusers.c
diff -u ircd-ircdev/ircd/m_wallusers.c:1.6 ircd-ircdev/ircd/m_wallusers.c:1.7
--- ircd-ircdev/ircd/m_wallusers.c:1.6 Sat Apr 21 14:17:23 2007
+++ ircd-ircdev/ircd/m_wallusers.c Sat Jan 19 11:26:03 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for WALLUSERS command.
- * @version $Id: m_wallusers.c,v 1.6 2007/04/21 21:17:23 zolty Exp $
+ * @version $Id: m_wallusers.c,v 1.7 2008/01/19 19:26:03 zolty Exp $
*/
#include "config.h"
@@ -32,6 +32,8 @@
#include "msg.h"
#include "numeric.h"
#include "send.h"
+#include "ircd_features.h" /* TRANSICION IRC-HISPANO */
+#include "ircd.h" /* TRANSICION IRC-HISPANO */
/* #include <assert.h> -- Now using assert in ircd_log.h */
@@ -77,6 +79,14 @@
{
char *message;
+#if 1 /* TRANSICION IRC-HISPANO */
+ if (feature_bool(FEAT_TRANSICION_HISPANO))
+ {
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Durante la transicion al nuevo ircd, el comando WALLUSERS esta deshabilitado", sptr);
+ return 0;
+ }
+#endif
+
message = parc > 1 ? parv[parc - 1] : 0;
if (EmptyString(message))
Index: ircd-ircdev/ircd/m_wallvoices.c
diff -u ircd-ircdev/ircd/m_wallvoices.c:1.12 ircd-ircdev/ircd/m_wallvoices.c:1.13
--- ircd-ircdev/ircd/m_wallvoices.c:1.12 Sun Jan 6 16:14:06 2008
+++ ircd-ircdev/ircd/m_wallvoices.c Sat Jan 19 11:26:07 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for WALLVOICES command.
- * @version $Id: m_wallvoices.c,v 1.12 2008/01/07 00:14:06 zolty Exp $
+ * @version $Id: m_wallvoices.c,v 1.13 2008/01/19 19:26:07 zolty Exp $
*/
#include "config.h"
@@ -37,6 +37,9 @@
#include "numnicks.h"
#include "s_user.h"
#include "send.h"
+#include "ircd_features.h" /* TRANSICION IRC-HISPANO */
+#include "ircd.h" /* TRANSICION IRC-HISPANO */
+
/* #include <assert.h> -- Now using assert in ircd_log.h */
@@ -60,6 +63,14 @@
assert(0 != cptr);
assert(cptr == sptr);
+#if 1 /* TRANSICION IRC-HISPANO */
+ if (feature_bool(FEAT_TRANSICION_HISPANO))
+ {
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Durante la transicion al nuevo ircd, el comando WALLVOICES esta deshabilitado", sptr);
+ return 0;
+ }
+#endif
+
if (parc < 2 || EmptyString(parv[1]))
return send_reply(sptr, ERR_NORECIPIENT, "WALLVOICES");
----------------------- End of diff -----------------------
|
|
From: Toni G. <zo...@us...> - 2008-01-19 13:29:18
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2008-01-19 13:29:04 UTC
Modified files:
acinclude.m4 include/gline.h include/ircd_events.h ircd/channel.c
ircd/class.c ircd/gline.c ircd/ircd_events.c ircd/ircd_features.c
ircd/m_burst.c ircd/m_endburst.c ircd/m_list.c ircd/m_lusers.c
ircd/m_mode.c ircd/m_names.c ircd/m_nick.c ircd/m_server.c
ircd/m_version.c ircd/s_auth.c ircd/s_conf.c ircd/s_err.c
ircd/s_misc.c ircd/s_stats.c ircd/s_user.c tools/iauth-test
Log message:
Limpieza de código
---------------------- diff included ----------------------
Index: ircd-ircdev/acinclude.m4
diff -u ircd-ircdev/acinclude.m4:1.4 ircd-ircdev/acinclude.m4:1.5
--- ircd-ircdev/acinclude.m4:1.4 Sun Apr 22 06:56:17 2007
+++ ircd-ircdev/acinclude.m4 Sat Jan 19 05:28:51 2008
@@ -211,10 +211,10 @@
AC_DEFUN([unet_TOGGLE],
[AC_MSG_CHECKING([$4])
AC_ARG_ENABLE([$1],
- AS_HELP_STRING([--m4_if($2, no, enable, disable)-$1], [$3]),
- [unet_cv_enable_$1=$enableval],
- [AC_CACHE_VAL(unet_cv_enable_$1,
- [unet_cv_enable_$1=$2])])
+ AS_HELP_STRING([--m4_if($2, no, enable, disable)-$1], [$3]),
+ [unet_cv_enable_$1=$enableval],
+ [AC_CACHE_VAL(unet_cv_enable_$1,
+ [unet_cv_enable_$1=$2])])
m4_if($5, , , $5)
AC_MSG_RESULT([$unet_cv_enable_$1])])
@@ -229,9 +229,9 @@
AC_DEFUN([unet_VALUE],
[AC_MSG_CHECKING([$4])
AC_ARG_WITH([$1], AS_HELP_STRING([--with-$1], [$3]),
- [unet_cv_with_$1=$withval],
- [AC_CACHE_VAL(unet_cv_with_$1,
- [unet_cv_with_$1=$2])])
+ [unet_cv_with_$1=$withval],
+ [AC_CACHE_VAL(unet_cv_with_$1,
+ [unet_cv_with_$1=$2])])
m4_if($5, , , $5)
AC_MSG_RESULT([$unet_cv_with_$1])])
Index: ircd-ircdev/include/gline.h
diff -u ircd-ircdev/include/gline.h:1.7 ircd-ircdev/include/gline.h:1.8
--- ircd-ircdev/include/gline.h:1.7 Tue Dec 11 15:38:23 2007
+++ ircd-ircdev/include/gline.h Sat Jan 19 05:28:51 2008
@@ -23,7 +23,7 @@
*/
/** @file
* @brief Structures and APIs for G-line manipulation.
- * @version $Id: gline.h,v 1.7 2007/12/11 23:38:23 zolty Exp $
+ * @version $Id: gline.h,v 1.8 2008/01/19 13:28:51 zolty Exp $
*/
#ifndef INCLUDED_gline_h
#define INCLUDED_gline_h
@@ -44,34 +44,34 @@
/** Local state of a G-line. */
enum GlineLocalState {
- GLOCAL_GLOBAL, /**< G-line state unmodified locally. */
- GLOCAL_ACTIVATED, /**< G-line state locally activated. */
- GLOCAL_DEACTIVATED /**< G-line state locally deactivated. */
+ GLOCAL_GLOBAL, /**< G-line state unmodified locally. */
+ GLOCAL_ACTIVATED, /**< G-line state locally activated. */
+ GLOCAL_DEACTIVATED /**< G-line state locally deactivated. */
};
/** Description of a G-line. */
struct Gline {
- struct Gline *gl_next; /**< Next G-line in linked list. */
- struct Gline**gl_prev_p; /**< Previous pointer to this G-line. */
- char *gl_user; /**< Username mask (or channel/realname mask). */
- char *gl_host; /**< Host prtion of mask. */
- char *gl_reason; /**< Reason for G-line. */
- time_t gl_expire; /**< Expiration timestamp. */
- time_t gl_lastmod; /**< Last modification timestamp. */
- time_t gl_lifetime; /**< Record expiration timestamp. */
- struct irc_in_addr gl_addr; /**< IP address (for IP-based G-lines). */
- unsigned char gl_bits; /**< Usable bits in gl_addr. */
- unsigned int gl_flags; /**< G-line status flags. */
+ struct Gline *gl_next; /**< Next G-line in linked list. */
+ struct Gline**gl_prev_p; /**< Previous pointer to this G-line. */
+ char *gl_user; /**< Username mask (or channel/realname mask). */
+ char *gl_host; /**< Host prtion of mask. */
+ char *gl_reason; /**< Reason for G-line. */
+ time_t gl_expire; /**< Expiration timestamp. */
+ time_t gl_lastmod; /**< Last modification timestamp. */
+ time_t gl_lifetime; /**< Record expiration timestamp. */
+ struct irc_in_addr gl_addr; /**< IP address (for IP-based G-lines). */
+ unsigned char gl_bits; /**< Usable bits in gl_addr. */
+ unsigned int gl_flags; /**< G-line status flags. */
enum GlineLocalState gl_state;/**< G-line local state. */
};
/** Action to perform on a G-line. */
enum GlineAction {
- GLINE_ACTIVATE, /**< G-line should be activated. */
- GLINE_DEACTIVATE, /**< G-line should be deactivated. */
- GLINE_LOCAL_ACTIVATE, /**< G-line should be locally activated. */
- GLINE_LOCAL_DEACTIVATE, /**< G-line should be locally deactivated. */
- GLINE_MODIFY /**< G-line should be modified. */
+ GLINE_ACTIVATE, /**< G-line should be activated. */
+ GLINE_DEACTIVATE, /**< G-line should be deactivated. */
+ GLINE_LOCAL_ACTIVATE, /**< G-line should be locally activated. */
+ GLINE_LOCAL_DEACTIVATE, /**< G-line should be locally deactivated. */
+ GLINE_MODIFY /**< G-line should be modified. */
};
#define GLINE_ACTIVE 0x0001 /**< G-line is active. */
@@ -87,9 +87,9 @@
#define GLINE_OPERFORCE 0x0400 /**< Oper forcing G-line to be set. */
#define GLINE_REALNAME 0x0800 /**< G-line matches only the realname field. */
-#define GLINE_EXPIRE 0x1000 /**< Expiration time update */
-#define GLINE_LIFETIME 0x2000 /**< Record lifetime update */
-#define GLINE_REASON 0x4000 /**< Reason update */
+#define GLINE_EXPIRE 0x1000 /**< Expiration time update */
+#define GLINE_LIFETIME 0x2000 /**< Record lifetime update */
+#define GLINE_REASON 0x4000 /**< Reason update */
/** Controllable flags that can be set on an actual G-line. */
#define GLINE_MASK (GLINE_ACTIVE | GLINE_BADCHAN | GLINE_LOCAL | GLINE_REALNAME)
@@ -97,12 +97,12 @@
#define GLINE_ACTMASK (GLINE_ACTIVE | GLINE_LDEACT)
/** Mask for G-line update flags. */
-#define GLINE_UPDATE (GLINE_EXPIRE | GLINE_LIFETIME | GLINE_REASON)
+#define GLINE_UPDATE (GLINE_EXPIRE | GLINE_LIFETIME | GLINE_REASON)
/** Test whether \a g is active. */
-#define GlineIsActive(g) ((((g)->gl_flags & GLINE_ACTIVE) && \
+#define GlineIsActive(g) ((((g)->gl_flags & GLINE_ACTIVE) && \
(g)->gl_state != GLOCAL_DEACTIVATED) || \
- (g)->gl_state == GLOCAL_ACTIVATED)
+ (g)->gl_state == GLOCAL_ACTIVATED)
/** Test whether \a g is remotely (globally) active. */
#define GlineIsRemActive(g) ((g)->gl_flags & GLINE_ACTIVE)
/** Test whether \a g is an IP-based G-line. */
@@ -137,7 +137,7 @@
char *reason, time_t expire, time_t lastmod,
time_t lifetime, unsigned int flags);
extern int gline_destroy(struct Client *cptr, struct Client *sptr,
- struct Gline *gline);
+ struct Gline *gline);
extern struct Gline *gline_find(char *userhost, unsigned int flags);
extern struct Gline *gline_lookup(struct Client *cptr, unsigned int flags);
extern void gline_free(struct Gline *gline);
Index: ircd-ircdev/include/ircd_events.h
diff -u ircd-ircdev/include/ircd_events.h:1.7 ircd-ircdev/include/ircd_events.h:1.8
--- ircd-ircdev/include/ircd_events.h:1.7 Tue Dec 11 15:38:23 2007
+++ ircd-ircdev/include/ircd_events.h Sat Jan 19 05:28:51 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Interface and public definitions for event loop.
- * @version $Id: ircd_events.h,v 1.7 2007/12/11 23:38:23 zolty Exp $
+ * @version $Id: ircd_events.h,v 1.8 2008/01/19 13:28:51 zolty Exp $
*/
#ifndef INCLUDED_ircd_events_h
#define INCLUDED_ircd_events_h
@@ -213,9 +213,9 @@
/** List of all event generators. */
struct Generators {
- struct GenHeader* g_socket; /**< list of socket generators */
- struct GenHeader* g_signal; /**< list of signal generators */
- struct GenHeader* g_timer; /**< list of timer generators */
+ struct GenHeader* g_socket; /**< list of socket generators */
+ struct GenHeader* g_signal; /**< list of signal generators */
+ struct GenHeader* g_timer; /**< list of timer generators */
};
/** Returns 1 if successfully initialized, 0 if not.
@@ -295,7 +295,6 @@
void timer_chg(struct Timer* timer, enum TimerType type, time_t value);
void timer_run(void);
/** Retrieve the next timer's expiration time from Generators \a gen. */
-
#define timer_next(gen) ((gen)->g_timer ? ((struct Timer*)(gen)->g_timer)->t_expire : 0)
void signal_add(struct Signal* signal, EventCallBack call, void* data,
Index: ircd-ircdev/ircd/channel.c
diff -u ircd-ircdev/ircd/channel.c:1.35 ircd-ircdev/ircd/channel.c:1.36
--- ircd-ircdev/ircd/channel.c:1.35 Sun Jan 6 16:14:05 2008
+++ ircd-ircdev/ircd/channel.c Sat Jan 19 05:28:51 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Channel management and maintanance
- * @version $Id: channel.c,v 1.35 2008/01/07 00:14:05 zolty Exp $
+ * @version $Id: channel.c,v 1.36 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -715,8 +715,7 @@
}
#if defined(UNDERNET)
- /* Discourage using the Apass to get op. They should use the upass. */
-
+ /* Discourage using the Apass to get op. They should use the Upass. */
if (IsChannelManager(member) && member->channel->mode.apass[0])
return 0;
#endif
@@ -1996,21 +1995,20 @@
if (mbuf->mb_dest & MODEBUF_DEST_BOTMODE)
sendcmdbotto_channel(ddb_get_botname(mbuf->mb_botname),
CMD_MODE, mbuf->mb_channel, NULL, 0,
- "%H %s%s%s%s%s%s", mbuf->mb_channel,
- rembuf_i ? "-" : "", rembuf,
- addbuf_i ? "+" : "", addbuf, remstr, addstr);
+ "%H %s%s%s%s%s%s%s%s", mbuf->mb_channel,
+ rembuf_i || rembuf_local_i ? "-" : "",
+ rembuf, rembuf_local,
+ addbuf_i || addbuf_local_i ? "+" : "",
+ addbuf, addbuf_local,
+ remstr, addstr);
else
#endif /* defined(DDB) */
sendcmdto_channel(app_source, CMD_MODE, mbuf->mb_channel, NULL, SKIP_SERVERS,
"%H %s%s%s%s%s%s%s%s", mbuf->mb_channel,
-/* TODO-ZOLTAN: Revisar */
-/* rembuf_i || rembuf_local_i ? "-" : "",
+ rembuf_i || rembuf_local_i ? "-" : "",
rembuf, rembuf_local,
addbuf_i || addbuf_local_i ? "+" : "",
addbuf, addbuf_local,
-*/
- rembuf_i ? "-" : "", rembuf,
- addbuf_i ? "+" : "", addbuf,
remstr, addstr);
}
}
@@ -2174,8 +2172,7 @@
assert(0 != chan);
assert(0 != dest);
- if (IsLocalChannel(chan->chname))
- dest &= ~MODEBUF_DEST_SERVER;
+ if (IsLocalChannel(chan->chname)) dest &= ~MODEBUF_DEST_SERVER;
mbuf->mb_add = 0;
mbuf->mb_rem = 0;
@@ -2211,11 +2208,11 @@
mode &= (MODE_ADD | MODE_DEL | MODE_PRIVATE | MODE_SECRET | MODE_MODERATED |
MODE_TOPICLIMIT | MODE_INVITEONLY | MODE_NOPRIVMSGS | MODE_REGONLY |
#if defined(DDB) || defined(SERVICES)
-/* TODO-ZOLTAN: Revisar */
-/* MODE_REGCHAN | */
+ MODE_REGCHAN |
#endif
- MODE_DELJOINS | MODE_WASDELJOINS | MODE_NOQUITPARTS | MODE_NOCOLOUR |
- MODE_NOCTCP | MODE_NONOTICE | MODE_NOMULTITARGET | MODE_MODERATENOREG);
+ MODE_NOCTCP | MODE_NONOTICE | MODE_NOMULTITARGET |
+ MODE_NOQUITPARTS | MODE_NOCOLOUR | MODE_MODERATENOREG |
+ MODE_DELJOINS | MODE_WASDELJOINS);
if (!(mode & ~(MODE_ADD | MODE_DEL))) /* don't add empty modes... */
return;
@@ -2368,13 +2365,13 @@
/* MODE_BAN, 'b', */
MODE_LIMIT, 'l',
#if defined(UNDERNET)
- MODE_REGONLY, 'r',
+ MODE_REGONLY, 'r',
#elif defined(DDB) || defined(SERVICES)
MODE_REGCHAN, 'r',
MODE_REGONLY, 'R',
/* MODE_OWNER, 'q', */
#endif
- MODE_DELJOINS, 'D',
+ MODE_DELJOINS, 'D',
MODE_NOQUITPARTS, 'u',
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
@@ -2970,7 +2967,6 @@
channel manager) during a net.break, and only sets the Apass
after the net rejoined, they will have oplevel MAXOPLEVEL on
all remote servers. */
-
if (state->member)
SetOpLevel(state->member, 0);
} else { /* remove the old apass */
@@ -3534,13 +3530,13 @@
MODE_BAN, 'b',
MODE_LIMIT, 'l',
#if defined(UNDERNET)
- MODE_REGONLY, 'r',
+ MODE_REGONLY, 'r',
#elif defined(DDB) || defined(SERVICES)
MODE_OWNER, 'q',
MODE_REGCHAN, 'r',
MODE_REGONLY, 'R',
#endif
- MODE_DELJOINS, 'D',
+ MODE_DELJOINS, 'D',
MODE_NOQUITPARTS, 'u',
MODE_NOCOLOUR, 'c',
MODE_NOCTCP, 'C',
Index: ircd-ircdev/ircd/class.c
diff -u ircd-ircdev/ircd/class.c:1.14 ircd-ircdev/ircd/class.c:1.15
--- ircd-ircdev/ircd/class.c:1.14 Tue Dec 11 15:38:24 2007
+++ ircd-ircdev/ircd/class.c Sat Jan 19 05:28:51 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Implementation of connection class handling functions.
- * @version $Id: class.c,v 1.14 2007/12/11 23:38:24 zolty Exp $
+ * @version $Id: class.c,v 1.15 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -229,7 +229,7 @@
PingFreq(p) = ping;
MaxLinks(p) = maxli;
MaxSendq(p) = (sendq > 0U) ?
- sendq : feature_uint(FEAT_DEFAULTMAXSENDQLENGTH);
+ sendq : feature_uint(FEAT_DEFAULTMAXSENDQLENGTH);
p->valid = 1;
}
Index: ircd-ircdev/ircd/gline.c
diff -u ircd-ircdev/ircd/gline.c:1.22 ircd-ircdev/ircd/gline.c:1.23
--- ircd-ircdev/ircd/gline.c:1.22 Tue Dec 11 15:38:24 2007
+++ ircd-ircdev/ircd/gline.c Sat Jan 19 05:28:51 2008
@@ -23,7 +23,7 @@
*/
/** @file
* @brief Implementation of Gline manipulation functions.
- * @version $Id: gline.c,v 1.22 2007/12/11 23:38:24 zolty Exp $
+ * @version $Id: gline.c,v 1.23 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -383,7 +383,7 @@
* @param[in] gline G-line to forward.
* @return Zero.
*/
-int
+static int
gline_propagate(struct Client *cptr, struct Client *sptr, struct Gline *gline)
{
if (GlineIsLocal(gline))
Index: ircd-ircdev/ircd/ircd_events.c
diff -u ircd-ircdev/ircd/ircd_events.c:1.12 ircd-ircdev/ircd/ircd_events.c:1.13
--- ircd-ircdev/ircd/ircd_events.c:1.12 Tue Dec 11 15:38:24 2007
+++ ircd-ircdev/ircd/ircd_events.c Sat Jan 19 05:28:51 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Implementation of event loop mid-layer.
- * @version $Id: ircd_events.c,v 1.12 2007/12/11 23:38:24 zolty Exp $
+ * @version $Id: ircd_events.c,v 1.13 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -381,7 +381,7 @@
sig = (int) sigstr[i]; /* get signal */
for (ptr = evInfo.gens.g_signal; ptr;
- ptr = ptr->gh_next)
+ ptr = ptr->gh_next)
if (((struct Signal*)ptr)->sig_signal == sig) /* find its descriptor... */
break;
Index: ircd-ircdev/ircd/ircd_features.c
diff -u ircd-ircdev/ircd/ircd_features.c:1.23 ircd-ircdev/ircd/ircd_features.c:1.24
--- ircd-ircdev/ircd/ircd_features.c:1.23 Tue Dec 11 15:38:24 2007
+++ ircd-ircdev/ircd/ircd_features.c Sat Jan 19 05:28:51 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Implementation of configurable feature support.
- * @version $Id: ircd_features.c,v 1.23 2007/12/11 23:38:24 zolty Exp $
+ * @version $Id: ircd_features.c,v 1.24 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -844,7 +844,7 @@
case FEAT_UINT: /* unsigned integer, report its value */
send_reply(from, SND_EXPLICIT | RPL_FEATURE,
- ":Unsigned value of %s: %u", feat->type, feat->v_int);
+ ":Unsigned value of %s: %u", feat->type, feat->v_int);
break;
case FEAT_BOOL: /* boolean, report boolean value */
@@ -987,8 +987,8 @@
case FEAT_UINT: /* Report an F-line with unsigned values */
if (features[i].flags & FEAT_MARK) /* it's been changed */
- send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %u",
- features[i].type, features[i].v_int);
+ send_reply(to, SND_EXPLICIT | RPL_STATSFLINE, "F %s %u",
+ features[i].type, features[i].v_int);
break;
case FEAT_BOOL: /* Report an F-line with boolean values */
Index: ircd-ircdev/ircd/m_burst.c
diff -u ircd-ircdev/ircd/m_burst.c:1.22 ircd-ircdev/ircd/m_burst.c:1.23
--- ircd-ircdev/ircd/m_burst.c:1.22 Tue Dec 11 15:38:25 2007
+++ ircd-ircdev/ircd/m_burst.c Sat Jan 19 05:28:51 2008
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Handlers for BURST command.
- * @version $Id: m_burst.c,v 1.22 2007/12/11 23:38:25 zolty Exp $
+ * @version $Id: m_burst.c,v 1.23 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -85,7 +85,11 @@
case 'l':
++parv;
break;
+#if defined(UNDERNET)
+ case 'r':
+#else
case 'R':
+#endif
result |= MODE_REGONLY;
break;
}
@@ -307,6 +311,7 @@
#if defined(UNDERNET)
member->status &= ~(CHFL_BURST_JOINED|CHFL_BURST_ALREADY_OPPED|CHFL_BURST_ALREADY_VOICED);
#else
+ /* TODO-ZOLTAN */
member->status &= ~CHFL_BURST_JOINED;
#endif
Index: ircd-ircdev/ircd/m_endburst.c
diff -u ircd-ircdev/ircd/m_endburst.c:1.9 ircd-ircdev/ircd/m_endburst.c:1.10
--- ircd-ircdev/ircd/m_endburst.c:1.9 Thu Sep 20 14:00:32 2007
+++ ircd-ircdev/ircd/m_endburst.c Sat Jan 19 05:28:51 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for END OF BURST command.
- * @version $Id: m_endburst.c,v 1.9 2007/09/20 21:00:32 zolty Exp $
+ * @version $Id: m_endburst.c,v 1.10 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -79,7 +79,7 @@
/* Newly empty channel, schedule it for removal. */
chan->mode.mode &= ~MODE_BURSTADDED;
sub1_from_channel(chan);
- } else {
+ } else {
chan->mode.mode &= ~MODE_BURSTADDED;
#if !defined(UNDERNET) && !defined(DDB)
sendto_opmask(0, SNO_OLDSNO, "Empty channel %H not added by "
Index: ircd-ircdev/ircd/m_list.c
diff -u ircd-ircdev/ircd/m_list.c:1.13 ircd-ircdev/ircd/m_list.c:1.14
--- ircd-ircdev/ircd/m_list.c:1.13 Tue Dec 11 15:38:25 2007
+++ ircd-ircdev/ircd/m_list.c Sat Jan 19 05:28:51 2008
@@ -20,7 +20,7 @@
*/
/** @file
* @brief Handlers for LIST command.
- * @version $Id: m_list.c,v 1.13 2007/12/11 23:38:25 zolty Exp $
+ * @version $Id: m_list.c,v 1.14 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -202,9 +202,9 @@
case 2: /* channel topic */
if (dir == '<')
- args->min_topic_time = val;
- else
args->max_topic_time = val;
+ else
+ args->min_topic_time = val;
break;
}
break;
Index: ircd-ircdev/ircd/m_lusers.c
diff -u ircd-ircdev/ircd/m_lusers.c:1.10 ircd-ircdev/ircd/m_lusers.c:1.11
--- ircd-ircdev/ircd/m_lusers.c:1.10 Tue Dec 11 15:38:25 2007
+++ ircd-ircdev/ircd/m_lusers.c Sat Jan 19 05:28:51 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for LUSERS command.
- * @version $Id: m_lusers.c,v 1.10 2007/12/11 23:38:25 zolty Exp $
+ * @version $Id: m_lusers.c,v 1.11 2008/01/19 13:28:51 zolty Exp $
*/
#include "config.h"
@@ -65,7 +65,7 @@
assert(UserStats.inv_clients <= UserStats.clients + UserStats.unknowns);
- send_reply(sptr, RPL_LUSERCLIENT,
+ send_reply(sptr, RPL_LUSERCLIENT,
UserStats.clients - UserStats.inv_clients + UserStats.unknowns,
UserStats.inv_clients, UserStats.servers);
if (longoutput && UserStats.opers)
Index: ircd-ircdev/ircd/m_mode.c
diff -u ircd-ircdev/ircd/m_mode.c:1.16 ircd-ircdev/ircd/m_mode.c:1.17
--- ircd-ircdev/ircd/m_mode.c:1.16 Tue Dec 11 15:38:25 2007
+++ ircd-ircdev/ircd/m_mode.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for MODE command.
- * @version $Id: m_mode.c,v 1.16 2007/12/11 23:38:25 zolty Exp $
+ * @version $Id: m_mode.c,v 1.17 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -166,7 +166,7 @@
}
else if (sptr != acptr)
{
- sendwallto_group(&me, WALL_WALLOPS, 0,
+ sendwallto_group(&me, WALL_WALLOPS, 0,
"MODE for User %s from %s!%s", parv[1],
cli_name(cptr), cli_name(sptr));
return 0;
Index: ircd-ircdev/ircd/m_names.c
diff -u ircd-ircdev/ircd/m_names.c:1.15 ircd-ircdev/ircd/m_names.c:1.16
--- ircd-ircdev/ircd/m_names.c:1.15 Tue Dec 11 15:38:25 2007
+++ ircd-ircdev/ircd/m_names.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for NAMES command.
- * @version $Id: m_names.c,v 1.15 2007/12/11 23:38:25 zolty Exp $
+ * @version $Id: m_names.c,v 1.16 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -122,7 +122,7 @@
buf[idx++] = '@';
else if (HasVoice(member))
buf[idx++] = '+';
- strcpy(buf + idx, cli_name(c2ptr));
+ strcpy(buf + idx, cli_name(c2ptr));
idx += strlen(cli_name(c2ptr));
flag = 1;
if (mlen + idx + NICKLEN + 5 > BUFSIZE)
@@ -234,7 +234,7 @@
if (showflag) /* Have we already shown them? */
continue;
-
+
strcpy(buf + idx, cli_name(c2ptr));
idx += strlen(cli_name(c2ptr));
buf[idx++] = ' ';
@@ -252,7 +252,7 @@
send_reply(sptr, RPL_NAMREPLY, buf);
send_reply(sptr, RPL_ENDOFNAMES, "*");
}
- else if ((chptr = FindChannel(para)) != NULL)
+ else if ((chptr = FindChannel(para)) != NULL)
{
member = find_member_link(chptr, sptr);
if (member)
Index: ircd-ircdev/ircd/m_nick.c
diff -u ircd-ircdev/ircd/m_nick.c:1.16 ircd-ircdev/ircd/m_nick.c:1.17
--- ircd-ircdev/ircd/m_nick.c:1.16 Tue Dec 11 15:38:25 2007
+++ ircd-ircdev/ircd/m_nick.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for NICK command.
- * @version $Id: m_nick.c,v 1.16 2007/12/11 23:38:25 zolty Exp $
+ * @version $Id: m_nick.c,v 1.17 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -169,11 +169,9 @@
if (strlen(arg) > IRCD_MIN(NICKLEN, feature_uint(FEAT_NICKLEN)))
arg[IRCD_MIN(NICKLEN, feature_uint(FEAT_NICKLEN))] = '\0';
-#if 1
/* Soporte de nicks ~ */
if ((s = strchr(arg, '~')))
*s = '\0';
-#endif
strcpy(nick, arg);
Index: ircd-ircdev/ircd/m_server.c
diff -u ircd-ircdev/ircd/m_server.c:1.14 ircd-ircdev/ircd/m_server.c:1.15
--- ircd-ircdev/ircd/m_server.c:1.14 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/m_server.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for the SERVER command.
- * @version $Id: m_server.c,v 1.14 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: m_server.c,v 1.15 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -622,7 +622,6 @@
memset(cli_privs(cptr), 255, sizeof(struct Privs));
ClrPriv(cptr, PRIV_SET);
SetServerYXX(cptr, cptr, parv[6]);
-
update_uworld_flags(cptr);
if (*parv[7] == '+')
@@ -735,7 +734,6 @@
/* Use cptr, because we do protocol 9 -> 10 translation
for numeric nicks ! */
SetServerYXX(cptr, acptr, parv[6]);
-
update_uworld_flags(cptr);
if (*parv[7] == '+')
Index: ircd-ircdev/ircd/m_version.c
diff -u ircd-ircdev/ircd/m_version.c:1.11 ircd-ircdev/ircd/m_version.c:1.12
--- ircd-ircdev/ircd/m_version.c:1.11 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/m_version.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for the VERSION command.
- * @version $Id: m_version.c,v 1.11 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: m_version.c,v 1.12 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -33,6 +33,7 @@
#include "ircd_reply.h"
#include "ircd_snprintf.h"
#include "ircd_string.h"
+#include "match.h"
#include "msg.h"
#include "numeric.h"
#include "numnicks.h"
Index: ircd-ircdev/ircd/s_auth.c
diff -u ircd-ircdev/ircd/s_auth.c:1.20 ircd-ircdev/ircd/s_auth.c:1.21
--- ircd-ircdev/ircd/s_auth.c:1.20 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/s_auth.c Sat Jan 19 05:28:53 2008
@@ -36,7 +36,7 @@
*/
/** @file
* @brief Implementation of DNS and ident lookups.
- * @version $Id: s_auth.c,v 1.20 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: s_auth.c,v 1.21 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -1983,8 +1983,8 @@
case 'U': handler = iauth_cmd_username_good; has_cli = 1; break;
case 'u': handler = iauth_cmd_username_bad; has_cli = 1; break;
case 'N': handler = iauth_cmd_hostname; has_cli = 1; break;
- case 'M': handler = iauth_cmd_usermode; has_cli = 1; break;
case 'I': handler = iauth_cmd_ip_address; has_cli = 1; break;
+ case 'M': handler = iauth_cmd_usermode; has_cli = 1; break;
case 'C': handler = iauth_cmd_challenge; has_cli = 1; break;
case 'D': handler = iauth_cmd_done_client; has_cli = 1; break;
#if defined(UNDERNET)
Index: ircd-ircdev/ircd/s_conf.c
diff -u ircd-ircdev/ircd/s_conf.c:1.30 ircd-ircdev/ircd/s_conf.c:1.31
--- ircd-ircdev/ircd/s_conf.c:1.30 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/s_conf.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief ircd configuration file driver
- * @version $Id: s_conf.c,v 1.30 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: s_conf.c,v 1.31 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -854,6 +854,7 @@
static int conf_already_read;
extern void yyparse(void);
extern int init_lexer(const char *configfile);
+extern void deinit_lexer(void);
/** Read configuration file.
* @return Zero on failure, non-zero on success. */
Index: ircd-ircdev/ircd/s_err.c
diff -u ircd-ircdev/ircd/s_err.c:1.28 ircd-ircdev/ircd/s_err.c:1.29
--- ircd-ircdev/ircd/s_err.c:1.28 Sun Jan 6 16:14:06 2008
+++ ircd-ircdev/ircd/s_err.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Error handling support.
- * @version $Id: s_err.c,v 1.28 2008/01/07 00:14:06 zolty Exp $
+ * @version $Id: s_err.c,v 1.29 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -469,10 +469,7 @@
/* 212 */
{ RPL_STATSCOMMANDS, "%s %u %u", "212" },
/* 213 */
-/* TODO-ZOLTAN: OJO PROVISIONAL ZOLTAN
{ RPL_STATSCLINE, "C %s * %d %d %s %s", "213" },
-*/
- { RPL_STATSCLINE, "C %s %s%s %d %d %s %s", "213" },
/* 214 */
{ 0 },
/* 215 */
Index: ircd-ircdev/ircd/s_misc.c
diff -u ircd-ircdev/ircd/s_misc.c:1.19 ircd-ircdev/ircd/s_misc.c:1.20
--- ircd-ircdev/ircd/s_misc.c:1.19 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/s_misc.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Miscellaneous support functions.
- * @version $Id: s_misc.c,v 1.19 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: s_misc.c,v 1.20 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -228,7 +228,6 @@
if (MyUser(bcptr))
set_snomask(bcptr, ~0, SNO_DEL);
- if (IsInvisible(bcptr))
if (IsInvisible(bcptr)) {
assert(UserStats.inv_clients > 0);
--UserStats.inv_clients;
Index: ircd-ircdev/ircd/s_stats.c
diff -u ircd-ircdev/ircd/s_stats.c:1.22 ircd-ircdev/ircd/s_stats.c:1.23
--- ircd-ircdev/ircd/s_stats.c:1.22 Thu Sep 20 14:00:32 2007
+++ ircd-ircdev/ircd/s_stats.c Sat Jan 19 05:28:53 2008
@@ -22,7 +22,7 @@
/** @file
* @brief Report configuration lines and other statistics from this
* server.
- * @version $Id: s_stats.c,v 1.22 2007/09/20 21:00:32 zolty Exp $
+ * @version $Id: s_stats.c,v 1.23 2008/01/19 13:28:53 zolty Exp $
*
* Note: The info is reported in the order the server uses
* it--not reversed as in ircd.conf!
@@ -72,7 +72,7 @@
/** @file
* @brief Report configuration lines and other statistics from this
* server.
- * @version $Id: s_stats.c,v 1.22 2007/09/20 21:00:32 zolty Exp $
+ * @version $Id: s_stats.c,v 1.23 2008/01/19 13:28:53 zolty Exp $
*
* Note: The info is reported in the order the server uses
* it--not reversed as in ircd.conf!
@@ -243,10 +243,7 @@
port = tmp->address.port;
if (tmp->status & CONF_SERVER)
-/* TODO-ZOLTAN provisional ZOLTAN OJO
- send_reply(sptr, RPL_STATSCLINE, name, port, maximum, hub_limit, get_conf_class(tmp));
-*/
- send_reply(sptr, RPL_STATSCLINE, name, (host[0] == ':' ? "0" : ""), host, port, maximum, hub_limit, get_conf_class(tmp));
+ send_reply(sptr, RPL_STATSCLINE, name, port, maximum, hub_limit, get_conf_class(tmp));
else if (tmp->status & CONF_CLIENT)
send_reply(sptr, RPL_STATSILINE,
(tmp->username ? tmp->username : ""), (tmp->username ? "@" : ""),
Index: ircd-ircdev/ircd/s_user.c
diff -u ircd-ircdev/ircd/s_user.c:1.35 ircd-ircdev/ircd/s_user.c:1.36
--- ircd-ircdev/ircd/s_user.c:1.35 Sun Jan 6 16:14:07 2008
+++ ircd-ircdev/ircd/s_user.c Sat Jan 19 05:28:53 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Miscellaneous user-related helper functions.
- * @version $Id: s_user.c,v 1.35 2008/01/07 00:14:07 zolty Exp $
+ * @version $Id: s_user.c,v 1.36 2008/01/19 13:28:53 zolty Exp $
*/
#include "config.h"
@@ -1484,12 +1484,12 @@
break;
#if defined(UNDERNET)
case 'r':
- if (what == MODE_ADD) {
- account = *(++p);
- SetAccount(sptr);
- }
- /* There is no -r */
- break;
+ if (what == MODE_ADD) {
+ account = *(++p);
+ SetAccount(sptr);
+ }
+ /* There is no -r */
+ break;
#endif
#ifdef USE_SSL
case 'Z':
@@ -1522,8 +1522,7 @@
/* if none of the given case is valid then compain by
* sending raw 501 ( ERR_UMODEUNKNOWNFLAG )
*/
- default:
-
+ default:
send_reply(sptr, ERR_UMODEUNKNOWNFLAG, *m);
break;
}
@@ -1603,8 +1602,8 @@
len = (ts++) - account;
cli_user(sptr)->acc_create = atoi(ts);
Debug((DEBUG_DEBUG, "Received timestamped account in user mode; "
- "account \"%s\", timestamp %Tu", account,
- cli_user(sptr)->acc_create));
+ "account \"%s\", timestamp %Tu", account,
+ cli_user(sptr)->acc_create));
}
ircd_strncpy(cli_user(sptr)->account, account, len);
}
Index: ircd-ircdev/tools/iauth-test
diff -u ircd-ircdev/tools/iauth-test:1.1 ircd-ircdev/tools/iauth-test:1.2
--- ircd-ircdev/tools/iauth-test:1.1 Thu Sep 20 14:00:54 2007
+++ ircd-ircdev/tools/iauth-test Sat Jan 19 05:28:54 2008
@@ -162,13 +162,15 @@
'127.0.0.33' => { T_reply => 'R account-3' },
'127.0.0.34' => { T_reply => 'k' },
'127.0.0.35' => { T_reply => 'K' },
- # 127.0.1.x: io/iU/iu functionality.
+ # 127.0.1.x: io/iU/iu/iM functionality.
'127.0.1.0' => { C_reply => 'o forced',
H_reply => 'D' },
'127.0.1.1' => { C_reply => 'U trusted',
H_reply => 'D' },
'127.0.1.2' => { C_reply => 'u untrusted',
H_reply => 'D' },
+ '127.0.1.3' => { C_reply => 'M +i',
+ H_reply => 'D' },
# 127.0.2.x: iI/iN functionality.
'127.0.2.0' => { C_reply => 'N iauth.assigned.host',
H_reply => 'D' },
----------------------- End of diff -----------------------
|
|
From: Toni G. <zo...@us...> - 2008-01-07 00:35:17
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2008-01-07 00:35:18 UTC
Modified files:
TODO.es
Log message:
Actualizacion Todo
---------------------- diff included ----------------------
Index: ircd-ircdev/TODO.es
diff -u ircd-ircdev/TODO.es:1.33 ircd-ircdev/TODO.es:1.34
--- ircd-ircdev/TODO.es:1.33 Fri Jan 4 16:28:37 2008
+++ ircd-ircdev/TODO.es Sun Jan 6 16:35:08 2008
@@ -1,18 +1,13 @@
#
# TODO para ircd-ircdev
#
-# $Id: TODO.es,v 1.33 2008/01/05 00:28:37 zolty Exp $
+# $Id: TODO.es,v 1.34 2008/01/07 00:35:08 zolty Exp $
#
# Insertar las nuevas entradas al principio de la lista TODO.
#
URGENTE
--------------------------------------------------------------------------------------
- - [G] Modo +M de canal
- - [G] Modo +N de canal
- - [G] Modo +C de canal
- - [G] Modo +c de canal
- - [G] Modo +u de canal
- [D] Implementar tabla o de Operadores
- [D] Implementar tabla p de Privilegios
- [D] Implementar tabla f de Features
@@ -21,7 +16,6 @@
--------------------------------------------------------------------------------------
- [G] Soporte de E-lines (excepciones a K-lines).
- [G] Modo +X de ver ips. Hacerlo por privilegios daria problemas.
- - [G] Modo +R de usuarios.
- [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los
notices de auth y dnslookup al conectar.
- [D] U-lines a traves de la DDB.
@@ -269,27 +263,22 @@
- Ocultacion de canales en el whois siendo +B
- Estando glineado que al reentrar salga g-line y no k-line
- Soporte PASS claveserver:clavebdd
-- En USERHOST/USERIP salir * si eres oper como en el WHO
+- En USERHOST/USERIP salir * si eres oper como en el WHO (Tiene para ircops perhelpers?)
- Meter lo de nick changed too fast en claves erroneas de +r y en ghost erroneos
- En Users indicar el tiempo de arranque
- Netride de topic
-- Eliminacion de canales MODELESS que empiecen por @?
+- Eliminacion de canales MODELESS que empiecen por @? (No hay canales modeless)
- MOTD por BDD
- Soporte de Ulines por BDD
- Canales persistentes
- Numerico de ircops, helpers e bots
- Usuarios con k saltan targets y nicks seguidos
- Parche ~ en nicks
-- Mostrar modos en whois
-- Invite en canales inexistentes, error de no such canal
-- Ampliacion del comando invite
-- Usuario sin +r hace a un +R no puede hacer invite pero si los ircops
- Numeric modo +R
- Salir el +k en el WHO
- Numeric Bots +B
- Chequeo de caracteres raros en el BAN
- Eline 223, silence 509
-- Userip 340
- Silence 510
- +R y numerico 480
- +k sale part y quit
@@ -306,21 +295,16 @@
- Ojo con cambio de nick estando baneado, que no salga el notice
- nicks equivalentes
- nicks suspendidos
-- user quit
- al hacer un quit, mandar el quit con el closing link
-- Quit sin mensaje no sale ningun mensaje
-- Usuarios y porcentajes en el map
+- Quit sin mensaje no sale ningun mensaje (Sale Quit a secas)
- Reliable clock desactivado
- Bug de +l 0 o negativos
- Names sin parametros no enought parameters
- /Kick primero comprobar si esta y luego si tiene +k
-- No tienes privilegios para ejecutar el comando en vez no eres ircop
-- whois nodo_inex nick devolver no such server
+- whois nodo_inex nick devolver no such server (con ocultacion de servers funciona diferente?)
- Mensajes autoghost
-- Ojo con ips en tracert
-- No permitir invitar en canales inexistentes
-- DNS -l que salga error
-- No permitir caracteres de control en nombre canal, ascii < 32
+- Ojo con ips en trace
+- No permitir caracteres de control en nombre canal, ascii < 32 (creo que funciona, comprobar)
- En canales modeless no pueden empezar por +, #, &, @
- Los bans tienen que comprobar a la real y virtual
- Cambiar mensaje "Cannot kill, kick or deop channel service
@@ -331,9 +315,7 @@
- lag en el map
- al glinear sale la razon
- Class full y mensaje al llenar la clase
-- Mostrar usuarios en el stats Y
- Conexiones con clones no heredan targets
-- ocultar ips nodos
- ZLIB
- join OPER
- ip virtual en el path en los kill
----------------------- End of diff -----------------------
|
|
From: Toni G. <zo...@us...> - 2008-01-07 00:14:20
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2008-01-07 00:14:17 UTC
Modified files:
ChangeLog ChangeLog.es include/channel.h include/client.h
include/numeric.h include/patchlevel.h ircd/channel.c
ircd/ircd_relay.c ircd/m_clearmode.c ircd/m_invite.c
ircd/m_wallchops.c ircd/m_wallvoices.c ircd/s_err.c ircd/s_user.c
Log message:
Author: zoltan <zo...@ir...>
Log message:
2008-01-07 Toni Garcïa <zo...@ir...> 1.0.beta11
* Modo de canal +C
* Modo de canal +c
* Modo de canal +T
* Modo de canal +u
* Modo de canal +M
* Modo de usuario +R
---------------------- diff included ----------------------
Index: ircd-ircdev/ChangeLog
diff -u ircd-ircdev/ChangeLog:1.59 ircd-ircdev/ChangeLog:1.60
--- ircd-ircdev/ChangeLog:1.59 Tue Dec 11 15:38:20 2007
+++ ircd-ircdev/ChangeLog Sun Jan 6 16:14:01 2008
@@ -1,10 +1,18 @@
#
# ChangeLog for ircd-ircdev
#
-# $Id: ChangeLog,v 1.59 2007/12/11 23:38:20 zolty Exp $
+# $Id: ChangeLog,v 1.60 2008/01/07 00:14:01 zolty Exp $
#
# Insert new changes at beginning of the change list.
#
+2008-01-07 Toni Garcïa <zo...@ir...> 1.0.beta11
+ * Channel mode +C
+ * Channel mode +c
+ * Channel mode +T
+ * Channel mode +u
+ * Channel mode +M
+ * Channel mode +R
+
2007-12-12 Toni Garc�a <zo...@ir...> 1.0.beta10
* Undernet synchronization
Index: ircd-ircdev/ChangeLog.es
diff -u ircd-ircdev/ChangeLog.es:1.59 ircd-ircdev/ChangeLog.es:1.60
--- ircd-ircdev/ChangeLog.es:1.59 Tue Dec 11 15:38:21 2007
+++ ircd-ircdev/ChangeLog.es Sun Jan 6 16:14:02 2008
@@ -1,10 +1,18 @@
#
# Log de Cambios para ircd-ircdev
#
-# $Id: ChangeLog.es,v 1.59 2007/12/11 23:38:21 zolty Exp $
+# $Id: ChangeLog.es,v 1.60 2008/01/07 00:14:02 zolty Exp $
#
# Insertar los nuevos cambios al principio de esta lista de cambios.
#
+2008-01-07 Toni Garc�a <zo...@ir...> 1.0.beta11
+ * Modo de canal +C
+ * Modo de canal +c
+ * Modo de canal +T
+ * Modo de canal +u
+ * Modo de canal +M
+ * Modo de usuario +R
+
2007-11-11 Toni Garc�a <zo...@ir...> 1.0.beta10
* Sincronizacion Undernet
Index: ircd-ircdev/include/channel.h
diff -u ircd-ircdev/include/channel.h:1.19 ircd-ircdev/include/channel.h:1.20
--- ircd-ircdev/include/channel.h:1.19 Tue Dec 11 15:38:23 2007
+++ ircd-ircdev/include/channel.h Sun Jan 6 16:14:02 2008
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Channel management and maintenance.
- * @version $Id: channel.h,v 1.19 2007/12/11 23:38:23 zolty Exp $
+ * @version $Id: channel.h,v 1.20 2008/01/07 00:14:02 zolty Exp $
*/
#ifndef INCLUDED_channel_h
#define INCLUDED_channel_h
@@ -114,8 +114,11 @@
#define MODE_LIMIT 0x0400 /**< +l Limit */
#define MODE_REGONLY 0x0800 /**< +R Only +r users may join */
#define MODE_DELJOINS 0x1000 /**< New join messages are delayed */
+#define MODE_NOCOLOUR 0x2000 /**< No mIRC/ANSI colors/bold */
+#define MODE_NOCTCP 0x4000 /**< No channel CTCPs */
+#define MODE_NONOTICE 0x8000 /**< No channel notices */
#if defined(DDB) || defined(SERVICES)
-#define MODE_REGCHAN 0x2000 /**< +r Channel registered */
+#define MODE_REGCHAN 0x10000 /**< +r Channel registered */
#define MODE_OWNER CHFL_OWNER /**< +q Channel owner */
#endif
#define MODE_SAVE 0x20000 /**< save this mode-with-arg 'til
@@ -129,13 +132,18 @@
#endif
#define MODE_WASDELJOINS 0x400000 /**< Not DELJOINS, but some joins
* pending */
+#define MODE_NOQUITPARTS 0x800000
+
+#define MODE_NOMULTITARGET 0x1000000 /**< +T No multiple targets */
+#define MODE_MODERATENOREG 0x2000000 /**< +M Moderate unauthed users */
+
#if defined(UNDERNET)
/** mode flags which take another parameter (With PARAmeterS)
*/
#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT|MODE_APASS|MODE_UPASS)
/** Available Channel modes */
-#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AbiklmnopstUvrD" : "biklmnopstvrD"
+#define infochanmodes feature_bool(FEAT_OPLEVELS) ? "AbiklmnopstUvrDcCNuMT" : "biklmnopstvrDcCNuMT"
/** Available Channel modes that take parameters */
#define infochanmodeswithparams feature_bool(FEAT_OPLEVELS) ? "AbkloUv" : "bklov"
#elif defined(DDB) || defined(SERVICES)
@@ -144,7 +152,7 @@
#define MODE_WPARAS (MODE_OWNER|MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT)
/** Available Channel modes */
-#define infochanmodes "biklmnopstvrRDq"
+#define infochanmodes "biklmnopstvrRDqcCNuMT"
/** Available Channel modes that take parameters */
#define infochanmodeswithparams "bklovq"
#else
@@ -153,7 +161,7 @@
#define MODE_WPARAS (MODE_CHANOP|MODE_VOICE|MODE_BAN|MODE_KEY|MODE_LIMIT)
/** Available Channel modes */
-#define infochanmodes "biklmnopstvrD"
+#define infochanmodes "biklmnopstvrDcCNuMT"
/** Available Channel modes that take parameters */
#define infochanmodeswithparams "bklov"
#endif
Index: ircd-ircdev/include/client.h
diff -u ircd-ircdev/include/client.h:1.23 ircd-ircdev/include/client.h:1.24
--- ircd-ircdev/include/client.h:1.23 Sun Nov 11 13:53:04 2007
+++ ircd-ircdev/include/client.h Sun Jan 6 16:14:02 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Structures and functions for handling local clients.
- * @version $Id: client.h,v 1.23 2007/11/11 21:53:04 zolty Exp $
+ * @version $Id: client.h,v 1.24 2008/01/07 00:14:02 zolty Exp $
*/
#ifndef INCLUDED_client_h
#define INCLUDED_client_h
@@ -73,9 +73,9 @@
/** String containing valid user modes, in no particular order. */
#if defined(DDB) || defined(SERVICES)
-#define infousermodes "dioswkgxrSZ"
+#define infousermodes "dioswkgxrRSZ"
#else
-#define infousermodes "dioswkgxZ"
+#define infousermodes "dioswkgxRZ"
#endif
/** Operator privileges. */
@@ -158,10 +158,9 @@
FLAG_NICKREG, /**< nick registered */
FLAG_NICKSUSPEND, /**< nick suspended */
#endif
+ FLAG_MSGONLYREG, /**< only privmsg/notices from +r */
FLAG_HIDDENHOST, /**< user's host is hidden */
-#ifdef USE_SSL
FLAG_SSL, /**< is a user with secure connection */
-#endif
FLAG_LAST_FLAG, /**< number of flags */
FLAG_LOCAL_UMODES = FLAG_LOCOP, /**< First local mode flag */
FLAG_GLOBAL_UMODES = FLAG_OPER /**< First global mode flag */
@@ -603,6 +602,8 @@
/** Return non-zero if the client has set mode +S (nick suspended) */
#define IsNickSuspended(x) HasFlag(x, FLAG_NICKSUSPEND)
#endif
+/** Return non-zero if the client has set mode +R. */
+#define IsMsgOnlyReg(x) HasFlag(x, FLAG_MSGONLYREG)
/** Return non-zero if the client has operator or server privileges. */
#define IsPrivileged(x) (IsAnOper(x) || IsServer(x))
@@ -656,7 +657,7 @@
/** Mark a client as having a pending PING. */
#define SetPingSent(x) SetFlag(x, FLAG_PINGSENT)
#ifdef USE_SSL
-/** Mark a client as secure connection .*/
+/** Mark a client as secure connection. */
#define SetSSL(x) SetFlag(x, FLAG_SSL)
#endif
#if defined(DDB) || defined(SERVICES)
@@ -665,6 +666,8 @@
/** Mark a client as having mode +S (nick suspended) */
#define SetNickSuspended(x) SetFlag(x, FLAG_NICKSUSPEND)
#endif
+/** Mark a client as having mode +R. */
+#define SetMsgOnlyReg(x) SetFlag(x, FLAG_MSGONLYREG)
/** Return non-zero if \a sptr sees \a acptr as an operator. */
#define SeeOper(sptr,acptr) (IsAnOper(acptr) && (HasPriv(acptr, PRIV_DISPLAY) \
@@ -708,6 +711,8 @@
/** Remode mode +S (nick suspended) from the client */
#define ClearNickSuspended(x) ClrFlag(x, FLAG_NICKSUSPEND)
#endif
+/** Remove mode +R from the client. */
+#define ClearMsgOnlyReg(x) ClrFlag(x, FLAG_MSGONLYREG)
/* free flags */
#define FREEFLAG_SOCKET 0x0001 /**< socket needs to be freed */
Index: ircd-ircdev/include/numeric.h
diff -u ircd-ircdev/include/numeric.h:1.19 ircd-ircdev/include/numeric.h:1.20
--- ircd-ircdev/include/numeric.h:1.19 Tue Dec 11 15:38:23 2007
+++ ircd-ircdev/include/numeric.h Sun Jan 6 16:14:05 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Declarations of numeric replies and supporting functions.
- * @version $Id: numeric.h,v 1.19 2007/12/11 23:38:23 zolty Exp $
+ * @version $Id: numeric.h,v 1.20 2008/01/07 00:14:05 zolty Exp $
*/
#ifndef INCLUDED_numeric_h
#define INCLUDED_numeric_h
@@ -419,6 +419,7 @@
/* ERR_KILLDENY 485 unreal */
/* ERR_CANTKICKADMIN 485 PTlink */
/* ERR_HTMDISABLED 486 unreal */
+#define ERR_NONONREG 486
/* ERR_CHANTOORECENT 487 IRCnet extension (?) */
/* ERR_TSLESSCHAN 488 IRCnet extension (?) */
#define ERR_VOICENEEDED 489 /* Undernet extension */
Index: ircd-ircdev/include/patchlevel.h
diff -u ircd-ircdev/include/patchlevel.h:1.58 ircd-ircdev/include/patchlevel.h:1.59
--- ircd-ircdev/include/patchlevel.h:1.58 Tue Dec 11 15:38:23 2007
+++ ircd-ircdev/include/patchlevel.h Sun Jan 6 16:14:05 2008
@@ -17,10 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: patchlevel.h,v 1.58 2007/12/11 23:38:23 zolty Exp $
+ * $Id: patchlevel.h,v 1.59 2008/01/07 00:14:05 zolty Exp $
*
*/
-#define PATCHLEVEL "10"
+#define PATCHLEVEL "11"
#define RELEASE "1.0.beta"
Index: ircd-ircdev/ircd/channel.c
diff -u ircd-ircdev/ircd/channel.c:1.34 ircd-ircdev/ircd/channel.c:1.35
--- ircd-ircdev/ircd/channel.c:1.34 Tue Dec 11 15:38:23 2007
+++ ircd-ircdev/ircd/channel.c Sun Jan 6 16:14:05 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Channel management and maintanance
- * @version $Id: channel.c,v 1.34 2007/12/11 23:38:23 zolty Exp $
+ * @version $Id: channel.c,v 1.35 2008/01/07 00:14:05 zolty Exp $
*/
#include "config.h"
@@ -734,7 +734,10 @@
#if defined(UNDERNET)
/* If only logged in users may join and you're not one, you can't speak. */
- if (member->channel->mode.mode & MODE_REGONLY && !IsAccount(member->user))
+ if (member->channel->mode.mode & (MODE_MODERATENOREG|MODE_REGONLY) && !IsAccount(member->user))
+ return 0;
+#elif defined(DDB) || defined(SERVICES)
+ if (member->channel->mode.mode & (MODE_MODERATENOREG|MODE_REGONLY) && !IsNickRegistered(member->user))
return 0;
#endif
@@ -782,7 +785,9 @@
if (!member) {
if ((chptr->mode.mode & (MODE_NOPRIVMSGS|MODE_MODERATED))
#if defined(UNDERNET)
- || ((chptr->mode.mode & MODE_REGONLY) && !IsAccount(cptr))
+ || ((chptr->mode.mode & (MODE_REGONLY|MODE_MODERATENOREG)) && !IsAccount(cptr))
+#elif defined(DDB) || defined(SERVICES)
+ || ((chptr->mode.mode & (MODE_REGONLY|MODE_MODERATENOREG)) && !IsNickRegistered(cptr))
#endif
)
return 0;
@@ -811,7 +816,9 @@
continue;
if ((member->channel->mode.mode & MODE_MODERATED)
#if defined(UNDERNET)
- || (member->channel->mode.mode & MODE_REGONLY && !IsAccount(cptr))
+ || (member->channel->mode.mode & (MODE_MODERATENOREG|MODE_REGONLY) && !IsAccount(cptr))
+#elif defined(UNDERNET)
+ || (member->channel->mode.mode & (MODE_MODERATENOREG|MODE_REGONLY) && !IsNickRegistered(cptr))
#endif
|| is_banned(member))
return member->channel->chname;
@@ -858,14 +865,29 @@
*mbuf++ = 'i';
if (chptr->mode.mode & MODE_NOPRIVMSGS)
*mbuf++ = 'n';
-#if defined(DDB) || defined(SERVICES)
+#if defined(UNDERNET)
+ if (chptr->mode.mode & MODE_REGONLY)
+ *mbuf++ = 'r';
+#elif defined(DDB) || defined(SERVICES)
if (chptr->mode.mode & MODE_REGCHAN)
*mbuf++ = 'r';
-#endif
if (chptr->mode.mode & MODE_REGONLY)
*mbuf++ = 'R';
+#endif
+ if (chptr->mode.mode & MODE_NOCOLOUR)
+ *mbuf++ = 'c';
+ if (chptr->mode.mode & MODE_NOCTCP)
+ *mbuf++ = 'C';
+ if (chptr->mode.mode & MODE_NONOTICE)
+ *mbuf++ = 'N';
+ if (chptr->mode.mode & MODE_NOQUITPARTS)
+ *mbuf++ = 'u';
if (chptr->mode.mode & MODE_DELJOINS)
*mbuf++ = 'D';
+ if (chptr->mode.mode & MODE_NOMULTITARGET)
+ *mbuf++ = 'T';
+ if (chptr->mode.mode & MODE_MODERATENOREG)
+ *mbuf++ = 'M';
else if (MyUser(cptr) && (chptr->mode.mode & MODE_WASDELJOINS))
*mbuf++ = 'd';
if (chptr->mode.limit) {
@@ -1685,11 +1707,13 @@
MODE_TOPICLIMIT, 't',
MODE_INVITEONLY, 'i',
MODE_NOPRIVMSGS, 'n',
-#if defined(DDB) || defined(SERVICES)
+#if defined(UNDERNET)
+ MODE_REGONLY, 'r',
+#elif defined(DDB) || defined(SERVICES)
MODE_REGCHAN, 'r',
+ MODE_REGONLY, 'R',
/* MODE_OWNER, 'q', */
#endif
- MODE_REGONLY, 'R',
MODE_DELJOINS, 'D',
/* MODE_KEY, 'k', */
/* MODE_BAN, 'b', */
@@ -1698,6 +1722,12 @@
/* MODE_APASS, 'A', */
/* MODE_UPASS, 'U', */
#endif
+ MODE_NOQUITPARTS, 'u',
+ MODE_NOCOLOUR, 'c',
+ MODE_NOCTCP, 'C',
+ MODE_NONOTICE, 'N',
+ MODE_NOMULTITARGET, 'T',
+ MODE_MODERATENOREG, 'M',
0x0, 0x0
};
static int local_flags[] = {
@@ -2184,7 +2214,8 @@
/* TODO-ZOLTAN: Revisar */
/* MODE_REGCHAN | */
#endif
- MODE_DELJOINS | MODE_WASDELJOINS);
+ MODE_DELJOINS | MODE_WASDELJOINS | MODE_NOQUITPARTS | MODE_NOCOLOUR |
+ MODE_NOCTCP | MODE_NONOTICE | MODE_NOMULTITARGET | MODE_MODERATENOREG);
if (!(mode & ~(MODE_ADD | MODE_DEL))) /* don't add empty modes... */
return;
@@ -2336,12 +2367,20 @@
#endif
/* MODE_BAN, 'b', */
MODE_LIMIT, 'l',
-#if defined(DDB) || defined(SERVICES)
+#if defined(UNDERNET)
+ MODE_REGONLY, 'r',
+#elif defined(DDB) || defined(SERVICES)
MODE_REGCHAN, 'r',
+ MODE_REGONLY, 'R',
/* MODE_OWNER, 'q', */
#endif
- MODE_REGONLY, 'R',
MODE_DELJOINS, 'D',
+ MODE_NOQUITPARTS, 'u',
+ MODE_NOCOLOUR, 'c',
+ MODE_NOCTCP, 'C',
+ MODE_NONOTICE, 'N',
+ MODE_NOMULTITARGET, 'T',
+ MODE_MODERATENOREG, 'M',
0x0, 0x0
};
unsigned int add, i, len;
@@ -3494,12 +3533,20 @@
#endif
MODE_BAN, 'b',
MODE_LIMIT, 'l',
-#if defined(DDB) || defined(SERVICES)
+#if defined(UNDERNET)
+ MODE_REGONLY, 'r',
+#elif defined(DDB) || defined(SERVICES)
MODE_OWNER, 'q',
MODE_REGCHAN, 'r',
+ MODE_REGONLY, 'R',
#endif
- MODE_REGONLY, 'R',
MODE_DELJOINS, 'D',
+ MODE_NOQUITPARTS, 'u',
+ MODE_NOCOLOUR, 'c',
+ MODE_NOCTCP, 'C',
+ MODE_NONOTICE, 'N',
+ MODE_NOMULTITARGET, 'T',
+ MODE_MODERATENOREG, 'M',
MODE_ADD, '+',
MODE_DEL, '-',
0x0, 0x0
@@ -3783,11 +3830,11 @@
/* Send notification to channel */
if (!(flags & (CHFL_ZOMBIE | CHFL_DELAYED)))
sendcmdto_channel(jbuf->jb_source, CMD_PART, chan, NULL, SKIP_SERVERS,
- (flags & CHFL_BANNED || !jbuf->jb_comment) ?
+ (flags & CHFL_BANNED || (chan->mode.mode & MODE_NOQUITPARTS) || !jbuf->jb_comment) ?
":%H" : "%H :%s", chan, jbuf->jb_comment);
else if (MyUser(jbuf->jb_source))
sendcmdto_one(jbuf->jb_source, CMD_PART, jbuf->jb_source,
- (flags & CHFL_BANNED || !jbuf->jb_comment) ?
+ (flags & CHFL_BANNED || (chan->mode.mode & MODE_NOQUITPARTS) || !jbuf->jb_comment) ?
":%H" : "%H :%s", chan, jbuf->jb_comment);
/* XXX: Shouldn't we send a PART here anyway? */
/* to users on the channel? Why? From their POV, the user isn't on
Index: ircd-ircdev/ircd/ircd_relay.c
diff -u ircd-ircdev/ircd/ircd_relay.c:1.12 ircd-ircdev/ircd/ircd_relay.c:1.13
--- ircd-ircdev/ircd/ircd_relay.c:1.12 Sat Apr 21 14:17:22 2007
+++ ircd-ircdev/ircd/ircd_relay.c Sun Jan 6 16:14:06 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Helper functions to relay various types of messages.
- * @version $Id: ircd_relay.c,v 1.12 2007/04/21 21:17:22 zolty Exp $
+ * @version $Id: ircd_relay.c,v 1.13 2008/01/07 00:14:06 zolty Exp $
*
* There are four basic types of messages, each with four subtypes.
*
@@ -85,6 +85,7 @@
void relay_channel_message(struct Client* sptr, const char* name, const char* text)
{
struct Channel* chptr;
+ const char *ch;
assert(0 != sptr);
assert(0 != name);
assert(0 != text);
@@ -104,6 +105,29 @@
check_target_limit(sptr, chptr, chptr->chname, 0))
return;
+ /* +T check */
+#if 0
+ if ((chptr->mode.mode & MODE_NOMULTITARGET) && (targetc > 1)) {
+ send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
+ return;
+ }
+#endif
+
+ /* +cC checks */
+ if (chptr->mode.mode & MODE_NOCOLOUR)
+ for (ch=text;*ch;ch++)
+ if (*ch==2 || *ch==3 || *ch==22 || *ch==27 || *ch==31) {
+ send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
+ return;
+ }
+
+ if ((chptr->mode.mode & MODE_NOCTCP) && ircd_strncmp(text,"\001ACTION ",8))
+ for (ch=text;*ch;)
+ if (*ch++==1) {
+ send_reply(sptr, ERR_CANNOTSENDTOCHAN, chptr->chname);
+ return;
+ }
+
sendcmdto_channel(sptr, CMD_PRIVATE, chptr, cli_from(sptr),
SKIP_DEAF | SKIP_BURST, "%H :%s", chptr, text);
}
@@ -117,6 +141,7 @@
void relay_channel_notice(struct Client* sptr, const char* name, const char* text)
{
struct Channel* chptr;
+ const char *ch;
assert(0 != sptr);
assert(0 != name);
assert(0 != text);
@@ -133,6 +158,26 @@
check_target_limit(sptr, chptr, chptr->chname, 0))
return;
+ if ((chptr->mode.mode & MODE_NONOTICE))
+ return;
+
+#if 0
+ /* +T check */
+ if ((chptr->mode.mode & MODE_NOMULTITARGET) && (targetc > 1))
+ return;
+#endif
+
+ /* +cC checks */
+ if (chptr->mode.mode & MODE_NOCOLOUR)
+ for (ch=text;*ch;ch++)
+ if (*ch==2 || *ch==3 || *ch==22 || *ch==27 || *ch==31)
+ return;
+
+ if (chptr->mode.mode & MODE_NOCTCP)
+ for (ch=text;*ch;)
+ if (*ch++==1)
+ return;
+
sendcmdto_channel(sptr, CMD_NOTICE, chptr, cli_from(sptr),
SKIP_DEAF | SKIP_BURST, "%H :%s", chptr, text);
}
@@ -337,6 +382,13 @@
is_silenced(sptr, acptr))
return;
+#if defined(DDB) || defined(SERVICES)
+ if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsOper(sptr)) {
+ send_reply(sptr, ERR_NONONREG, cli_name(acptr));
+ return;
+ }
+#endif
+
/*
* send away message if user away
*/
@@ -372,6 +424,12 @@
check_target_limit(sptr, acptr, cli_name(acptr), 0)) ||
is_silenced(sptr, acptr))
return;
+
+#if defined(DDB) || defined(SERVICES)
+ if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsOper(sptr))
+ return;
+#endif
+
/*
* deliver the message
*/
Index: ircd-ircdev/ircd/m_clearmode.c
diff -u ircd-ircdev/ircd/m_clearmode.c:1.14 ircd-ircdev/ircd/m_clearmode.c:1.15
--- ircd-ircdev/ircd/m_clearmode.c:1.14 Thu Sep 20 14:00:32 2007
+++ ircd-ircdev/ircd/m_clearmode.c Sun Jan 6 16:14:06 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for CLEARMODE command.
- * @version $Id: m_clearmode.c,v 1.14 2007/09/20 21:00:32 zolty Exp $
+ * @version $Id: m_clearmode.c,v 1.15 2008/01/07 00:14:06 zolty Exp $
*/
#include "config.h"
@@ -66,8 +66,18 @@
MODE_KEY, 'k',
MODE_BAN, 'b',
MODE_LIMIT, 'l',
+#if defined(UNDERNET)
MODE_REGONLY, 'r',
+#elif defined(DDB) || defined(SERVICES)
+ MODE_REGONLY, 'R',
+#endif
MODE_DELJOINS, 'D',
+ MODE_NOQUITPARTS, 'u',
+ MODE_NOCOLOUR, 'c',
+ MODE_NOCTCP, 'C',
+ MODE_NONOTICE, 'N',
+ MODE_NOMULTITARGET, 'T',
+ MODE_MODERATENOREG, 'M',
0x0, 0x0
};
int *flag_p;
Index: ircd-ircdev/ircd/m_invite.c
diff -u ircd-ircdev/ircd/m_invite.c:1.19 ircd-ircdev/ircd/m_invite.c:1.20
--- ircd-ircdev/ircd/m_invite.c:1.19 Thu Sep 20 14:00:32 2007
+++ ircd-ircdev/ircd/m_invite.c Sun Jan 6 16:14:06 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for INVITE command.
- * @version $Id: m_invite.c,v 1.19 2007/09/20 21:00:32 zolty Exp $
+ * @version $Id: m_invite.c,v 1.20 2008/01/07 00:14:06 zolty Exp $
*/
#include "config.h"
@@ -115,6 +115,13 @@
/* If we get here, it was a VALID and meaningful INVITE */
+#if defined(DDB) || defined(SERVICES)
+ if (IsMsgOnlyReg(acptr) && !IsNickRegistered(sptr) && !IsOper(sptr)) {
+ send_reply(sptr, ERR_NONONREG, cli_name(acptr));
+ return;
+ }
+#endif
+
if (check_target_limit(sptr, acptr, cli_name(acptr), 0))
return 0;
Index: ircd-ircdev/ircd/m_wallchops.c
diff -u ircd-ircdev/ircd/m_wallchops.c:1.10 ircd-ircdev/ircd/m_wallchops.c:1.11
--- ircd-ircdev/ircd/m_wallchops.c:1.10 Sat Apr 21 14:17:23 2007
+++ ircd-ircdev/ircd/m_wallchops.c Sun Jan 6 16:14:06 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for WALLCHOPS command.
- * @version $Id: m_wallchops.c,v 1.10 2007/04/21 21:17:23 zolty Exp $
+ * @version $Id: m_wallchops.c,v 1.11 2008/01/07 00:14:06 zolty Exp $
*/
#include "config.h"
@@ -55,6 +55,7 @@
int m_wallchops(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
struct Channel *chptr;
+ const char *ch;
assert(0 != cptr);
assert(cptr == sptr);
@@ -66,10 +67,24 @@
return send_reply(sptr, ERR_NOTEXTTOSEND);
if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) {
- if (client_can_send_to_channel(sptr, chptr, 0)) {
+ if (client_can_send_to_channel(sptr, chptr, 0) && !(chptr->mode.mode & MODE_NONOTICE)) {
if ((chptr->mode.mode & MODE_NOPRIVMSGS) &&
check_target_limit(sptr, chptr, chptr->chname, 0))
return 0;
+
+ /* +cC checks */
+ if (chptr->mode.mode & MODE_NOCOLOUR)
+ for (ch=parv[parc - 1];*ch;ch++)
+ if (*ch==2 || *ch==3 || *ch==22 || *ch==27 || *ch==31) {
+ return 0;
+ }
+
+ if ((chptr->mode.mode & MODE_NOCTCP) && ircd_strncmp(parv[parc - 1],"\001ACTION ",8))
+ for (ch=parv[parc - 1];*ch;)
+ if (*ch++==1) {
+ return 0;
+ }
+
sendcmdto_channel(sptr, CMD_WALLCHOPS, chptr, cptr,
SKIP_DEAF | SKIP_BURST | SKIP_NONOPS,
"%H :@ %s", chptr, parv[parc - 1]);
Index: ircd-ircdev/ircd/m_wallvoices.c
diff -u ircd-ircdev/ircd/m_wallvoices.c:1.11 ircd-ircdev/ircd/m_wallvoices.c:1.12
--- ircd-ircdev/ircd/m_wallvoices.c:1.11 Thu Sep 20 14:00:32 2007
+++ ircd-ircdev/ircd/m_wallvoices.c Sun Jan 6 16:14:06 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Handlers for WALLVOICES command.
- * @version $Id: m_wallvoices.c,v 1.11 2007/09/20 21:00:32 zolty Exp $
+ * @version $Id: m_wallvoices.c,v 1.12 2008/01/07 00:14:06 zolty Exp $
*/
#include "config.h"
@@ -55,6 +55,7 @@
int m_wallvoices(struct Client* cptr, struct Client* sptr, int parc, char* parv[])
{
struct Channel *chptr;
+ const char *ch;
assert(0 != cptr);
assert(cptr == sptr);
@@ -66,10 +67,24 @@
return send_reply(sptr, ERR_NOTEXTTOSEND);
if (IsChannelName(parv[1]) && (chptr = FindChannel(parv[1]))) {
- if (client_can_send_to_channel(sptr, chptr, 0)) {
+ if (client_can_send_to_channel(sptr, chptr, 0) && !(chptr->mode.mode & MODE_NONOTICE)) {
if ((chptr->mode.mode & MODE_NOPRIVMSGS) &&
check_target_limit(sptr, chptr, chptr->chname, 0))
return 0;
+
+ /* +cC checks */
+ if (chptr->mode.mode & MODE_NOCOLOUR)
+ for (ch=parv[parc - 1];*ch;ch++)
+ if (*ch==2 || *ch==3 || *ch==22 || *ch==27 || *ch==31) {
+ return 0;
+ }
+
+ if ((chptr->mode.mode & MODE_NOCTCP) && ircd_strncmp(parv[parc - 1],"\001ACTION ",8))
+ for (ch=parv[parc - 1];*ch;)
+ if (*ch++==1) {
+ return 0;
+ }
+
sendcmdto_channel(sptr, CMD_WALLVOICES, chptr, cptr,
SKIP_DEAF | SKIP_BURST | SKIP_NONVOICES,
"%H :+ %s", chptr, parv[parc - 1]);
Index: ircd-ircdev/ircd/s_err.c
diff -u ircd-ircdev/ircd/s_err.c:1.27 ircd-ircdev/ircd/s_err.c:1.28
--- ircd-ircdev/ircd/s_err.c:1.27 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/s_err.c Sun Jan 6 16:14:06 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Error handling support.
- * @version $Id: s_err.c,v 1.27 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: s_err.c,v 1.28 2008/01/07 00:14:06 zolty Exp $
*/
#include "config.h"
@@ -1007,7 +1007,7 @@
#if defined(UNDERNET)
{ ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+r): this channel requires authentication -- you can obtain an account from %s", "477" },
#else
- { ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+R): this channel requires authentication -- you can register a nick from $s", "477" },
+ { ERR_NEEDREGGEDNICK, "%s :Cannot join channel (+R): this channel requires authentication -- you can register a nick from %s", "477" },
#endif
/* 478 */
{ ERR_BANLISTFULL, "%s %s :Channel ban/ignore list is full", "478" },
@@ -1025,8 +1025,12 @@
{ ERR_ISCHANSERVICE, "%s %s :Cannot kill, kick or deop a network service", "484" },
/* 485 */
{ 0 },
+#if defined(DDB) || defined(SERVICES)
/* 486 */
+ { ERR_NONONREG, ":You need to register your nick to talk with %s", "485" },
+#else
{ 0 },
+#endif
/* 487 */
{ 0 },
/* 488 */
Index: ircd-ircdev/ircd/s_user.c
diff -u ircd-ircdev/ircd/s_user.c:1.34 ircd-ircdev/ircd/s_user.c:1.35
--- ircd-ircdev/ircd/s_user.c:1.34 Tue Dec 11 15:38:26 2007
+++ ircd-ircdev/ircd/s_user.c Sun Jan 6 16:14:07 2008
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Miscellaneous user-related helper functions.
- * @version $Id: s_user.c,v 1.34 2007/12/11 23:38:26 zolty Exp $
+ * @version $Id: s_user.c,v 1.35 2008/01/07 00:14:07 zolty Exp $
*/
#include "config.h"
@@ -529,6 +529,7 @@
#elif defined(DDB) || defined(SERVICES)
{ FLAG_NICKREG, 'r' },
{ FLAG_NICKSUSPEND, 'S' },
+ { FLAG_MSGONLYREG, 'R' },
#endif
{ FLAG_HIDDENHOST, 'x' }
};
@@ -1078,6 +1079,14 @@
}
if (is_silenced(source, dest))
return 0;
+
+#if defined(DDB) || defined(SERVICES)
+ if (IsMsgOnlyReg(dest) && !IsNickRegistered(source) && !IsOper(source)) {
+ if(!is_notice)
+ send_reply(source, ERR_NONONREG, cli_name(source));
+ return 0;
+ }
+#endif
if (is_notice)
sendcmdto_one(source, CMD_NOTICE, dest, "%C :%s", dest, text);
@@ -1503,6 +1512,12 @@
else
ClearNickSuspended(sptr);
break;
+ case 'R':
+ if (what == MODE_ADD)
+ SetMsgOnlyReg(sptr);
+ else
+ ClearMsgOnlyReg(sptr);
+ break;
#endif /* defined(DDB) || defined(SERVICES) */
/* if none of the given case is valid then compain by
* sending raw 501 ( ERR_UMODEUNKNOWNFLAG )
----------------------- End of diff -----------------------
|
|
From: Toni G. <zo...@us...> - 2008-01-05 00:28:45
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2008-01-05 00:28:47 UTC
Modified files:
TODO.es
Log message:
mas todo
---------------------- diff included ----------------------
Index: ircd-ircdev/TODO.es
diff -u ircd-ircdev/TODO.es:1.32 ircd-ircdev/TODO.es:1.33
--- ircd-ircdev/TODO.es:1.32 Sun Nov 11 13:53:02 2007
+++ ircd-ircdev/TODO.es Fri Jan 4 16:28:37 2008
@@ -1,13 +1,18 @@
#
# TODO para ircd-ircdev
#
-# $Id: TODO.es,v 1.32 2007/11/11 21:53:02 zolty Exp $
+# $Id: TODO.es,v 1.33 2008/01/05 00:28:37 zolty Exp $
#
# Insertar las nuevas entradas al principio de la lista TODO.
#
URGENTE
--------------------------------------------------------------------------------------
+ - [G] Modo +M de canal
+ - [G] Modo +N de canal
+ - [G] Modo +C de canal
+ - [G] Modo +c de canal
+ - [G] Modo +u de canal
- [D] Implementar tabla o de Operadores
- [D] Implementar tabla p de Privilegios
- [D] Implementar tabla f de Features
@@ -17,7 +22,6 @@
- [G] Soporte de E-lines (excepciones a K-lines).
- [G] Modo +X de ver ips. Hacerlo por privilegios daria problemas.
- [G] Modo +R de usuarios.
- - [G] ¿Modo +M de canales?.
- [G] Poner uuna Feature para elegir entre salir o no el nombre del servidor en los
notices de auth y dnslookup al conectar.
- [D] U-lines a traves de la DDB.
@@ -52,8 +56,6 @@
- [G] Soporte RC4 para server<->server.
- [G] Mirar si el aviso de invites lo haga con wallchops o con raw.
- [G] Soporte de +e (exceptions) de canales
- - [G] Modo de canal +u de esconder mensajes de quit y part (evitar
- publicidad)
- [G] Sistema de modulos dinámicos
- [G] Bloque Logging en el .conf
- [G] Estudiar la remodelación del esquema de "hubs" y "leafs" a un
@@ -248,3 +250,101 @@
AUTOCHANMODES_LIST should contain the default channelmodes (e.g.
"ntCN") which will be set by default on new channels.
+
+
+Implementaciones IRC-Hispano a implementar (estudiar caso por caso)
+
+- NICK * para nick aleatorio
+- Modo WEBCHAT especifico
+- En el MOTD, la hora que salga con el timezone
+- Ojo con E-lines al hacer rehash
+- Guardar clave cifrado en memoria en ASCII y BINARIO
+- Al mandar un notice a un canal que salga los mismos reply de erroes que con privmsg
+- Suspends y forbids por BDD de forma inmediata
+- Si un nodo hace bounce de modos/topic/kick/invite, hacer un -o
+- En un ghost durante una conexion salir GHOST
+- DOS a traves deWhois?
+- Usuario baneado en canal -t no puede cambiar canal a menos que sea +o
+- CPRIVMSG resetea el idle
+- Ocultacion de canales en el whois siendo +B
+- Estando glineado que al reentrar salga g-line y no k-line
+- Soporte PASS claveserver:clavebdd
+- En USERHOST/USERIP salir * si eres oper como en el WHO
+- Meter lo de nick changed too fast en claves erroneas de +r y en ghost erroneos
+- En Users indicar el tiempo de arranque
+- Netride de topic
+- Eliminacion de canales MODELESS que empiecen por @?
+- MOTD por BDD
+- Soporte de Ulines por BDD
+- Canales persistentes
+- Numerico de ircops, helpers e bots
+- Usuarios con k saltan targets y nicks seguidos
+- Parche ~ en nicks
+- Mostrar modos en whois
+- Invite en canales inexistentes, error de no such canal
+- Ampliacion del comando invite
+- Usuario sin +r hace a un +R no puede hacer invite pero si los ircops
+- Numeric modo +R
+- Salir el +k en el WHO
+- Numeric Bots +B
+- Chequeo de caracteres raros en el BAN
+- Eline 223, silence 509
+- Userip 340
+- Silence 510
+- +R y numerico 480
+- +k sale part y quit
+- Ping timeout y read error sin el to nick
+- E-lines y numeric 239
+- cambiosde nicks demasiados rapido salia erro
+- 432 de Erroneus nickname por invalid nickname
+- nicks prohibidos
+- Comprobador de TS
+- Restringir lista de silence
+- Formato humano en gline y stats g
+- Comando OPER pass clase
+- Class is full y class non-existent
+- Ojo con cambio de nick estando baneado, que no salga el notice
+- nicks equivalentes
+- nicks suspendidos
+- user quit
+- al hacer un quit, mandar el quit con el closing link
+- Quit sin mensaje no sale ningun mensaje
+- Usuarios y porcentajes en el map
+- Reliable clock desactivado
+- Bug de +l 0 o negativos
+- Names sin parametros no enought parameters
+- /Kick primero comprobar si esta y luego si tiene +k
+- No tienes privilegios para ejecutar el comando en vez no eres ircop
+- whois nodo_inex nick devolver no such server
+- Mensajes autoghost
+- Ojo con ips en tracert
+- No permitir invitar en canales inexistentes
+- DNS -l que salga error
+- No permitir caracteres de control en nombre canal, ascii < 32
+- En canales modeless no pueden empezar por +, #, &, @
+- Los bans tienen que comprobar a la real y virtual
+- Cambiar mensaje "Cannot kill, kick or deop channel service
+- Campos adecuados en stats l
+- Mensaje de silenciado
+- Helpers pueden ver whois largos y modos extra
+- Helpers salen en who 0 o
+- lag en el map
+- al glinear sale la razon
+- Class full y mensaje al llenar la clase
+- Mostrar usuarios en el stats Y
+- Conexiones con clones no heredan targets
+- ocultar ips nodos
+- ZLIB
+- join OPER
+- ip virtual en el path en los kill
+- mensaje global
+- ircops no tienen limitado canales
+- +X mira ip real y virtual en who
+
+
+
+
+
+
+
+
----------------------- End of diff -----------------------
|
|
From: Toni G. <zo...@us...> - 2007-12-11 23:49:14
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2007-12-11 23:49:15 UTC
Modified files:
doc/ircd.sample-en.conf doc/ircd.sample-es.conf doc/en/iauth.txt
Log message:
Actualizacion del .conf
---------------------- diff included ----------------------
Index: ircd-ircdev/doc/en/iauth.txt
diff -u ircd-ircdev/doc/en/iauth.txt:1.2 ircd-ircdev/doc/en/iauth.txt:1.3
--- ircd-ircdev/doc/en/iauth.txt:1.2 Fri Sep 21 04:30:27 2007
+++ ircd-ircdev/doc/en/iauth.txt Tue Dec 11 15:49:05 2007
@@ -1,4 +1,4 @@
-$Id: iauth.txt,v 1.2 2007/09/21 11:30:27 zolty Exp $
+$Id: iauth.txt,v 1.3 2007/12/11 23:49:05 zolty Exp $
OVERVIEW
========
@@ -368,8 +368,8 @@
this message.
I - Client IP Address
-Syntax: N <id> <currentip> <remoteport> <newip>
-Example: N 5 192.168.1.10 23367 127.128.129.130
+Syntax: I <id> <currentip> <remoteport> <newip>
+Example: I 5 192.168.1.10 23367 127.128.129.130
States: REGISTER, HURRY
Next State: -
Comments: Indicates that the iauth instance wants the server to
@@ -379,6 +379,16 @@
Compatibility: This is an Undernet extension and ircd does not support
this message.
+M - Adjust User Mode
+Syntax: M <id> <remoteip> <remoteport> +<mode changes>
+Example: M 5 192.168.1.10 23367 +iwg
+States: REGISTER, HURRY
+Next State: -
+Comments: Indicates a set of user mode changes to be applied to the
+ client.
+Compatibility: This is an Undernet extension and ircd does not support
+ this message.
+
C - Challenge User
Syntax: C <id> <remoteip> <remoteport> :<challenge string>
Example: C 5 192.168.1.10 23367 :In which year did Columbus sail the ocean blue?
Index: ircd-ircdev/doc/ircd.sample-en.conf
diff -u ircd-ircdev/doc/ircd.sample-en.conf:1.25 ircd-ircdev/doc/ircd.sample-en.conf:1.26
--- ircd-ircdev/doc/ircd.sample-en.conf:1.25 Fri Sep 21 04:10:30 2007
+++ ircd-ircdev/doc/ircd.sample-en.conf Tue Dec 11 15:49:04 2007
@@ -217,7 +217,7 @@
# local_gline (can set a G-line for this server only)
# local_badchan (can set a Gchan for this server only)
# see_chan (can see users in +s channels in /WHO)
- # list_chan (can see +s channels with /LIST S)
+ # list_chan (can see +s channels with /LIST S, or modes with /LIST M)
# wide_gline (can use ! to force a wide G-line)
# see_opers (can see opers without DISPLAY privilege)
# local_opmode (can use OPMODE/CLEARMODE on local channels)
@@ -286,6 +286,7 @@
{
class = "Other";
ip = "*@*";
+ maxlinks = 2;
};
@@ -293,6 +294,7 @@
{
class = "Other";
host = "*@*";
+ maxlinks = 2;
};
# If you don't want unresolved dudes to be able to connect to your
# server, do not specify any "ip = " settings.
@@ -302,18 +304,21 @@
{
host = "*.rima-tde.net";
class = "Telefonica";
+ maxlinks = 2;
};
Client
{
host = "*.telefonica-data.net";
class = "Telefonica";
+ maxlinks = 2;
};
Client
{
host = "*.ttd.es";
class = "Telefonica";
+ maxlinks = 2;
};
# Now list all the .com / .net domains that you wish to have access...
@@ -321,13 +326,13 @@
# way around - K-lining every single ISP in the US.
# I wish people in Holland just got a .nl domain, and not try to be
# cool and use .com...
-Client { host = "*@*.wirehub.net"; class = "Other";};
-Client { host = "*@*.planete.net"; class = "Other";};
-Client { host = "*@*.ivg.com"; class = "Other";};
-Client { host = "*@*.ib.com"; class = "Other";};
-Client { host = "*@*.ibm.net"; class = "Other";};
-Client { host = "*@*.hydro.com"; class = "Other";};
-Client { host = "*@*.nl.net"; class = "Local";};
+Client { host = "*@*.wirehub.net"; class = "Other"; maxlinks = 2; };
+Client { host = "*@*.planete.net"; class = "Other"; maxlinks = 2; };
+Client { host = "*@*.ivg.com"; class = "Other"; maxlinks = 2; };
+Client { host = "*@*.ib.com"; class = "Other"; maxlinks = 2; };
+Client { host = "*@*.ibm.net"; class = "Other"; maxlinks = 2; };
+Client { host = "*@*.hydro.com"; class = "Other"; maxlinks = 2; };
+Client { host = "*@*.nl.net"; class = "Local"; maxlinks = 2; };
# You can request a more complete listing, including the "list of standard
# Kill blocks" from the Routing Committee; it will also be sent to you if
@@ -340,6 +345,8 @@
host = "*.rima-tde.net";
ip = "*@80.59.0.0/16";
class = "Local";
+ # A maxlinks of over 5 will automatically be glined by euworld on Undernet
+ maxlinks = 5;
};
# You can put an expression in the "maxlinks" value, which will make ircd
@@ -365,6 +372,7 @@
host = "*@*";
ip = "*@*";
class = "Other";
+ maxlinks = 2;
};
Index: ircd-ircdev/doc/ircd.sample-es.conf
diff -u ircd-ircdev/doc/ircd.sample-es.conf:1.18 ircd-ircdev/doc/ircd.sample-es.conf:1.19
--- ircd-ircdev/doc/ircd.sample-es.conf:1.18 Mon Oct 17 07:02:32 2005
+++ ircd-ircdev/doc/ircd.sample-es.conf Tue Dec 11 15:49:05 2007
@@ -219,6 +219,7 @@
# local_gline (puede poner una G-line para solamente este servidor)
# local_badchan (puede poner una Gchan para solamente este servidor)
# see_chan (puede ver usuarios en canales secretos (+s) en el /WHO)
+ # list_chan (puede ver canales +s con /LIST S, o modos con /LIST M)
# wide_gline (puede usar ! para forzar una wide G-line)
# see_opers (puede ver opers sin el privilegio DISPLAY)
# force_local_opmode (puede utilizar OPMODE/CLEARMODE en canales quarantined locales)
@@ -289,6 +290,7 @@
{
class = "Otros";
ip = "*";
+ maxlinks = 2;
};
@@ -296,6 +298,7 @@
{
class = "Otros";
host = "*";
+ maxlinks = 2;
};
# Si no quieres que conecten usuarios sin DNS inverso resuelto a tu
# servidor, no poner ajustes de "ip = ".
@@ -305,18 +308,21 @@
{
host = "*.pooles.rima-tde.net";
class = "Telefonica";
+ maxlinks = 2;
};
Client
{
host = "*.telefonica-data.net";
class = "Telefonica";
+ maxlinks = 2;
};
Client
{
host = "*.ttd.es";
class = "Telefonica";
+ maxlinks = 2;
};
# Ahora se listan los dominios .com / .net que se desean permitir...
@@ -324,13 +330,13 @@
# a cada ISP de los E.E.U.U.
# Deseo que la gente de Holanda con dominio .nl, y no intento ser fresco
# y usar .com...
-Client { host = "*.wirehub.net"; class = "Otros";};
-Client { host = "*.planete.net"; class = "Otros";};
-Client { host = "*.ivg.com"; class = "Otros";};
-Client { host = "*.ib.com"; class = "Otros";};
-Client { host = "*.ibm.net"; class = "Otros";};
-Client { host = "*.hydro.com"; class = "Otros";};
-Client { host = "*.nl.net"; class = "Local";};
+Client { host = "*.wirehub.net"; class = "Otros"; maxlinks = 2; };
+Client { host = "*.planete.net"; class = "Otros"; maxlinks = 2; };
+Client { host = "*.ivg.com"; class = "Otros"; maxlinks = 2; };
+Client { host = "*.ib.com"; class = "Otros"; maxlinks = 2; };
+Client { host = "*.ibm.net"; class = "Otros"; maxlinks = 2; };
+Client { host = "*.hydro.com"; class = "Otros"; maxlinks = 2; };
+Client { host = "*.nl.net"; class = "Local"; maxlinks = 2; };
# Puedes solicitar un listado más completo, incluyendo la "lista estándar
# de bloques "Kill"" del comité de "Routing"; también le será enviada si
@@ -343,6 +349,8 @@
host = "*.pooles.rima-tde.net";
ip = "80.59.0.0/16";
class = "Local";
+ # Un maxlinks de más de 5 será automáticamente glineado por euworld en Undernet
+ maxlinks = 5;
};
@@ -369,6 +377,7 @@
host = "*";
ip = "*";
class = "Otros";
+ maxlinks = 2;
};
----------------------- End of diff -----------------------
|
|
From: Toni G. <zo...@us...> - 2007-12-11 23:38:46
|
Committer : zolty
CVSROOT : /cvsroot/irc-dev
Module : ircd-ircdev
Commit time: 2007-12-11 23:38:38 UTC
Modified files:
ChangeLog ChangeLog.es config.h.in configure doc/Makefile.in
include/channel.h include/dbuf.h include/gline.h
include/ircd_crypt.h include/ircd_events.h
include/ircd_features.h include/numeric.h include/patchlevel.h
include/res.h include/s_user.h ircd/channel.c ircd/class.c
ircd/dbuf.c ircd/engine_poll.c ircd/gline.c ircd/hash.c
ircd/ircd_events.c ircd/ircd_features.c ircd/ircd_lexer.l
ircd/ircd_parser.y ircd/ircd_snprintf.c ircd/ircd_string.c
ircd/listener.c ircd/m_admin.c ircd/m_asll.c ircd/m_burst.c
ircd/m_cap.c ircd/m_connect.c ircd/m_gline.c ircd/m_join.c
ircd/m_list.c ircd/m_lusers.c ircd/m_mode.c ircd/m_names.c
ircd/m_nick.c ircd/m_privs.c ircd/m_server.c ircd/m_silence.c
ircd/m_stats.c ircd/m_user.c ircd/m_version.c ircd/m_who.c
ircd/msgq.c ircd/numnicks.c ircd/parse.c ircd/s_auth.c
ircd/s_bsd.c ircd/s_conf.c ircd/s_debug.c ircd/s_err.c
ircd/s_misc.c ircd/s_user.c ircd/send.c ircd/umkpasswd.c
ircd/uping.c ircd/version.c.SH ircd/whowas.c
ircd/test/ircd_in_addr_t.c
Log message:
Author: zoltan <zo...@ir...>
Log message:
2007-11-11 Toni Garc�a <zo...@ir...> 1.0.beta10
* Sincronizacion Undernet
---------------------- diff included ----------------------
Index: ircd-ircdev/ChangeLog
diff -u ircd-ircdev/ChangeLog:1.58 ircd-ircdev/ChangeLog:1.59
--- ircd-ircdev/ChangeLog:1.58 Sun Nov 11 13:53:01 2007
+++ ircd-ircdev/ChangeLog Tue Dec 11 15:38:20 2007
@@ -1,10 +1,13 @@
#
# ChangeLog for ircd-ircdev
#
-# $Id: ChangeLog,v 1.58 2007/11/11 21:53:01 zolty Exp $
+# $Id: ChangeLog,v 1.59 2007/12/11 23:38:20 zolty Exp $
#
# Insert new changes at beginning of the change list.
#
+2007-12-12 Toni Garc�a <zo...@ir...> 1.0.beta10
+ * Undernet synchronization
+
2007-11-11 Toni Garc�a <zo...@ir...> 1.0.beta9
* SSL Support
2007-09-20 Toni Garc�a <zo...@ir...> 1.0.beta8
Index: ircd-ircdev/ChangeLog.es
diff -u ircd-ircdev/ChangeLog.es:1.58 ircd-ircdev/ChangeLog.es:1.59
--- ircd-ircdev/ChangeLog.es:1.58 Sun Nov 11 13:53:02 2007
+++ ircd-ircdev/ChangeLog.es Tue Dec 11 15:38:21 2007
@@ -1,10 +1,13 @@
#
# Log de Cambios para ircd-ircdev
#
-# $Id: ChangeLog.es,v 1.58 2007/11/11 21:53:02 zolty Exp $
+# $Id: ChangeLog.es,v 1.59 2007/12/11 23:38:21 zolty Exp $
#
# Insertar los nuevos cambios al principio de esta lista de cambios.
#
+2007-11-11 Toni Garc�a <zo...@ir...> 1.0.beta10
+ * Sincronizacion Undernet
+
2007-11-11 Toni Garc�a <zo...@ir...> 1.0.beta9
* Soporte SSL
Index: ircd-ircdev/config.h.in
diff -u ircd-ircdev/config.h.in:1.14 ircd-ircdev/config.h.in:1.15
--- ircd-ircdev/config.h.in:1.14 Sun Nov 11 13:53:02 2007
+++ ircd-ircdev/config.h.in Tue Dec 11 15:38:21 2007
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: config.h.in,v 1.14 2007/11/11 21:53:02 zolty Exp $
+ * $Id: config.h.in,v 1.15 2007/12/11 23:38:21 zolty Exp $
*
*/
#ifndef INCLUDED_config_h
Index: ircd-ircdev/configure
diff -u ircd-ircdev/configure:1.24 ircd-ircdev/configure:1.25
--- ircd-ircdev/configure:1.24 Sun Nov 11 13:53:02 2007
+++ ircd-ircdev/configure Tue Dec 11 15:38:21 2007
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Revision: 1.2 .
+# From configure.ac Revision: 1.3 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for IRC-Dev IRC Daemon 1.0.beta.
#
Index: ircd-ircdev/doc/Makefile.in
diff -u ircd-ircdev/doc/Makefile.in:1.5 ircd-ircdev/doc/Makefile.in:1.6
--- ircd-ircdev/doc/Makefile.in:1.5 Sun Apr 22 06:56:19 2007
+++ ircd-ircdev/doc/Makefile.in Tue Dec 11 15:38:23 2007
@@ -17,7 +17,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# $Id: Makefile.in,v 1.5 2007/04/22 13:56:19 zolty Exp $
+# $Id: Makefile.in,v 1.6 2007/12/11 23:38:23 zolty Exp $
#
#### Start of system configuration section. ####
@@ -31,6 +31,8 @@
RM = @RMPROG@
@SET_MAKE@
+DATAROOTDIR = @datarootdir@
+DATADIR = @datadir@
MANDIR = @mandir@
#### End of system configuration section. ####
Index: ircd-ircdev/include/channel.h
diff -u ircd-ircdev/include/channel.h:1.18 ircd-ircdev/include/channel.h:1.19
--- ircd-ircdev/include/channel.h:1.18 Sat Jul 21 16:51:39 2007
+++ ircd-ircdev/include/channel.h Tue Dec 11 15:38:23 2007
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Channel management and maintenance.
- * @version $Id: channel.h,v 1.18 2007/07/21 23:51:39 zolty Exp $
+ * @version $Id: channel.h,v 1.19 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_channel_h
#define INCLUDED_channel_h
@@ -188,6 +188,7 @@
#define LISTARG_TOPICLIMITS 0x0001
#define LISTARG_SHOWSECRET 0x0002
#define LISTARG_NEGATEWILDCARD 0x0004
+#define LISTARG_SHOWMODES 0x0008
/**
* Maximum acceptable lag time in seconds: A channel younger than
Index: ircd-ircdev/include/dbuf.h
diff -u ircd-ircdev/include/dbuf.h:1.6 ircd-ircdev/include/dbuf.h:1.7
--- ircd-ircdev/include/dbuf.h:1.6 Thu Apr 19 15:53:46 2007
+++ ircd-ircdev/include/dbuf.h Tue Dec 11 15:38:23 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Interfaces and declarations for dealing with data buffers.
- * @version $Id: dbuf.h,v 1.6 2007/04/19 22:53:46 zolty Exp $
+ * @version $Id: dbuf.h,v 1.7 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_dbuf_h
#define INCLUDED_dbuf_h
@@ -34,8 +34,8 @@
/*
* These two globals should be considered read only
*/
-extern int DBufAllocCount;
-extern int DBufUsedCount;
+extern unsigned int DBufAllocCount;
+extern unsigned int DBufUsedCount;
struct DBufBuffer;
Index: ircd-ircdev/include/gline.h
diff -u ircd-ircdev/include/gline.h:1.6 ircd-ircdev/include/gline.h:1.7
--- ircd-ircdev/include/gline.h:1.6 Thu Apr 19 15:53:46 2007
+++ ircd-ircdev/include/gline.h Tue Dec 11 15:38:23 2007
@@ -23,7 +23,7 @@
*/
/** @file
* @brief Structures and APIs for G-line manipulation.
- * @version $Id: gline.h,v 1.6 2007/04/19 22:53:46 zolty Exp $
+ * @version $Id: gline.h,v 1.7 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_gline_h
#define INCLUDED_gline_h
@@ -42,18 +42,36 @@
#define GLINE_MAX_EXPIRE 604800 /**< max expire: 7 days */
+/** Local state of a G-line. */
+enum GlineLocalState {
+ GLOCAL_GLOBAL, /**< G-line state unmodified locally. */
+ GLOCAL_ACTIVATED, /**< G-line state locally activated. */
+ GLOCAL_DEACTIVATED /**< G-line state locally deactivated. */
+};
+
/** Description of a G-line. */
struct Gline {
- struct Gline *gl_next; /**< Next G-line in linked list. */
- struct Gline**gl_prev_p; /**< Previous pointer to this G-line. */
- char *gl_user; /**< Username mask (or channel/realname mask). */
- char *gl_host; /**< Host prtion of mask. */
- char *gl_reason; /**< Reason for G-line. */
- time_t gl_expire; /**< Expiration timestamp. */
- time_t gl_lastmod; /**< Last modification timestamp. */
- struct irc_in_addr gl_addr; /**< IP address (for IP-based G-lines). */
- unsigned char gl_bits; /**< Usable bits in gl_addr. */
- unsigned int gl_flags; /**< G-line status flags. */
+ struct Gline *gl_next; /**< Next G-line in linked list. */
+ struct Gline**gl_prev_p; /**< Previous pointer to this G-line. */
+ char *gl_user; /**< Username mask (or channel/realname mask). */
+ char *gl_host; /**< Host prtion of mask. */
+ char *gl_reason; /**< Reason for G-line. */
+ time_t gl_expire; /**< Expiration timestamp. */
+ time_t gl_lastmod; /**< Last modification timestamp. */
+ time_t gl_lifetime; /**< Record expiration timestamp. */
+ struct irc_in_addr gl_addr; /**< IP address (for IP-based G-lines). */
+ unsigned char gl_bits; /**< Usable bits in gl_addr. */
+ unsigned int gl_flags; /**< G-line status flags. */
+ enum GlineLocalState gl_state;/**< G-line local state. */
+};
+
+/** Action to perform on a G-line. */
+enum GlineAction {
+ GLINE_ACTIVATE, /**< G-line should be activated. */
+ GLINE_DEACTIVATE, /**< G-line should be deactivated. */
+ GLINE_LOCAL_ACTIVATE, /**< G-line should be locally activated. */
+ GLINE_LOCAL_DEACTIVATE, /**< G-line should be locally deactivated. */
+ GLINE_MODIFY /**< G-line should be modified. */
};
#define GLINE_ACTIVE 0x0001 /**< G-line is active. */
@@ -69,14 +87,22 @@
#define GLINE_OPERFORCE 0x0400 /**< Oper forcing G-line to be set. */
#define GLINE_REALNAME 0x0800 /**< G-line matches only the realname field. */
+#define GLINE_EXPIRE 0x1000 /**< Expiration time update */
+#define GLINE_LIFETIME 0x2000 /**< Record lifetime update */
+#define GLINE_REASON 0x4000 /**< Reason update */
+
/** Controllable flags that can be set on an actual G-line. */
#define GLINE_MASK (GLINE_ACTIVE | GLINE_BADCHAN | GLINE_LOCAL | GLINE_REALNAME)
/** Mask for G-line activity flags. */
#define GLINE_ACTMASK (GLINE_ACTIVE | GLINE_LDEACT)
+/** Mask for G-line update flags. */
+#define GLINE_UPDATE (GLINE_EXPIRE | GLINE_LIFETIME | GLINE_REASON)
+
/** Test whether \a g is active. */
-#define GlineIsActive(g) (((g)->gl_flags & GLINE_ACTMASK) == \
- GLINE_ACTIVE)
+#define GlineIsActive(g) ((((g)->gl_flags & GLINE_ACTIVE) && \
+ (g)->gl_state != GLOCAL_DEACTIVATED) || \
+ (g)->gl_state == GLOCAL_ACTIVATED)
/** Test whether \a g is remotely (globally) active. */
#define GlineIsRemActive(g) ((g)->gl_flags & GLINE_ACTIVE)
/** Test whether \a g is an IP-based G-line. */
@@ -97,17 +123,21 @@
/** Return last modification time of a G-line. */
#define GlineLastMod(g) ((g)->gl_lastmod)
-extern int gline_propagate(struct Client *cptr, struct Client *sptr,
- struct Gline *gline);
extern int gline_add(struct Client *cptr, struct Client *sptr, char *userhost,
char *reason, time_t expire, time_t lastmod,
- unsigned int flags);
+ time_t lifetime, unsigned int flags);
extern int gline_activate(struct Client *cptr, struct Client *sptr,
struct Gline *gline, time_t lastmod,
unsigned int flags);
extern int gline_deactivate(struct Client *cptr, struct Client *sptr,
struct Gline *gline, time_t lastmod,
unsigned int flags);
+extern int gline_modify(struct Client *cptr, struct Client *sptr,
+ struct Gline *gline, enum GlineAction action,
+ char *reason, time_t expire, time_t lastmod,
+ time_t lifetime, unsigned int flags);
+extern int gline_destroy(struct Client *cptr, struct Client *sptr,
+ struct Gline *gline);
extern struct Gline *gline_find(char *userhost, unsigned int flags);
extern struct Gline *gline_lookup(struct Client *cptr, unsigned int flags);
extern void gline_free(struct Gline *gline);
Index: ircd-ircdev/include/ircd_crypt.h
diff -u ircd-ircdev/include/ircd_crypt.h:1.3 ircd-ircdev/include/ircd_crypt.h:1.4
--- ircd-ircdev/include/ircd_crypt.h:1.3 Thu Apr 19 15:53:46 2007
+++ ircd-ircdev/include/ircd_crypt.h Tue Dec 11 15:38:23 2007
@@ -20,7 +20,7 @@
*/
/** @file
* @brief Core password encryption and hashing APIs.
- * @version $Id: ircd_crypt.h,v 1.3 2007/04/19 22:53:46 zolty Exp $
+ * @version $Id: ircd_crypt.h,v 1.4 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_ircd_crypt_h
#define INCLUDED_ircd_crypt_h
@@ -37,7 +37,7 @@
char* crypt_token; /* what identifies a password string
as belonging to this mechanism */
- int crypt_token_size; /* how long is the token */
+ unsigned int crypt_token_size; /* how long is the token */
};
typedef struct crypt_mech_s crypt_mech_t;
Index: ircd-ircdev/include/ircd_events.h
diff -u ircd-ircdev/include/ircd_events.h:1.6 ircd-ircdev/include/ircd_events.h:1.7
--- ircd-ircdev/include/ircd_events.h:1.6 Sun Nov 11 13:53:05 2007
+++ ircd-ircdev/include/ircd_events.h Tue Dec 11 15:38:23 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Interface and public definitions for event loop.
- * @version $Id: ircd_events.h,v 1.6 2007/11/11 21:53:05 zolty Exp $
+ * @version $Id: ircd_events.h,v 1.7 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_ircd_events_h
#define INCLUDED_ircd_events_h
@@ -213,9 +213,9 @@
/** List of all event generators. */
struct Generators {
- struct Socket* g_socket; /**< list of socket generators */
- struct Signal* g_signal; /**< list of signal generators */
- struct Timer* g_timer; /**< list of timer generators */
+ struct GenHeader* g_socket; /**< list of socket generators */
+ struct GenHeader* g_signal; /**< list of signal generators */
+ struct GenHeader* g_timer; /**< list of timer generators */
};
/** Returns 1 if successfully initialized, 0 if not.
@@ -295,7 +295,8 @@
void timer_chg(struct Timer* timer, enum TimerType type, time_t value);
void timer_run(void);
/** Retrieve the next timer's expiration time from Generators \a gen. */
-#define timer_next(gen) ((gen)->g_timer ? (gen)->g_timer->t_expire : 0)
+
+#define timer_next(gen) ((gen)->g_timer ? ((struct Timer*)(gen)->g_timer)->t_expire : 0)
void signal_add(struct Signal* signal, EventCallBack call, void* data,
int sig);
Index: ircd-ircdev/include/ircd_features.h
diff -u ircd-ircdev/include/ircd_features.h:1.21 ircd-ircdev/include/ircd_features.h:1.22
--- ircd-ircdev/include/ircd_features.h:1.21 Sun Nov 11 13:53:05 2007
+++ ircd-ircdev/include/ircd_features.h Tue Dec 11 15:38:23 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Public interfaces and declarations for dealing with configurable features.
- * @version $Id: ircd_features.h,v 1.21 2007/11/11 21:53:05 zolty Exp $
+ * @version $Id: ircd_features.h,v 1.22 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_features_h
#define INCLUDED_features_h
@@ -64,6 +64,7 @@
FEAT_LOCAL_CHANNELS,
FEAT_TOPIC_BURST,
FEAT_USER_GLIST,
+ FEAT_DISABLE_GLINES,
/* features that probably should not be touched */
FEAT_KILLCHASETIMELIMIT,
@@ -223,5 +224,6 @@
extern int feature_int(enum Feature feat);
extern int feature_bool(enum Feature feat);
extern const char *feature_str(enum Feature feat);
+extern unsigned int feature_uint(enum Feature feat);
#endif /* INCLUDED_features_h */
Index: ircd-ircdev/include/numeric.h
diff -u ircd-ircdev/include/numeric.h:1.18 ircd-ircdev/include/numeric.h:1.19
--- ircd-ircdev/include/numeric.h:1.18 Sun Nov 11 13:53:05 2007
+++ ircd-ircdev/include/numeric.h Tue Dec 11 15:38:23 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Declarations of numeric replies and supporting functions.
- * @version $Id: numeric.h,v 1.18 2007/11/11 21:53:05 zolty Exp $
+ * @version $Id: numeric.h,v 1.19 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_numeric_h
#define INCLUDED_numeric_h
@@ -342,6 +342,7 @@
/* ERR_BADMASK 415 IRCnet extension */
#define ERR_QUERYTOOLONG 416 /* Undernet extension */
/* ERR_TOOMANYMATCHES 416 IRCnet extension */
+#define ERR_INPUTTOOLONG 417
/* ERR_LENGTHTRUNCATED 419 aircd */
#define ERR_UNKNOWNCOMMAND 421
Index: ircd-ircdev/include/patchlevel.h
diff -u ircd-ircdev/include/patchlevel.h:1.57 ircd-ircdev/include/patchlevel.h:1.58
--- ircd-ircdev/include/patchlevel.h:1.57 Sun Nov 11 13:53:05 2007
+++ ircd-ircdev/include/patchlevel.h Tue Dec 11 15:38:23 2007
@@ -17,10 +17,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: patchlevel.h,v 1.57 2007/11/11 21:53:05 zolty Exp $
+ * $Id: patchlevel.h,v 1.58 2007/12/11 23:38:23 zolty Exp $
*
*/
-#define PATCHLEVEL "9"
+#define PATCHLEVEL "10"
#define RELEASE "1.0.beta"
Index: ircd-ircdev/include/res.h
diff -u ircd-ircdev/include/res.h:1.10 ircd-ircdev/include/res.h:1.11
--- ircd-ircdev/include/res.h:1.10 Thu Apr 26 12:17:31 2007
+++ ircd-ircdev/include/res.h Tue Dec 11 15:38:23 2007
@@ -22,7 +22,7 @@
*/
/** @file
* @brief IRC resolver API.
- * @version $Id: res.h,v 1.10 2007/04/26 19:17:31 zolty Exp $
+ * @version $Id: res.h,v 1.11 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_res_h
@@ -150,7 +150,7 @@
&& ((ADDR)->in6_16[5] == 0 \
|| (ADDR)->in6_16[5] == 65535))
/** Evaluate to non-zero if \a ADDR is a valid address (not all 0s and not all 1s). */
-#define irc_in_addr_valid(ADDR) (((ADDR)->in6_16[0] && ~(ADDR)->in6_16[0]) \
+#define irc_in_addr_valid(ADDR) (((ADDR)->in6_16[0] && ((ADDR)->in6_16[0] != 65535)) \
|| (ADDR)->in6_16[1] != (ADDR)->in6_16[0] \
|| (ADDR)->in6_16[2] != (ADDR)->in6_16[0] \
|| (ADDR)->in6_16[3] != (ADDR)->in6_16[0] \
@@ -160,8 +160,9 @@
|| (ADDR)->in6_16[7] != (ADDR)->in6_16[0])
/** Evaluate to non-zero if \a ADDR (of type struct irc_in_addr) is an IPv4 address. */
#define irc_in_addr_is_ipv4(ADDR) (!(ADDR)->in6_16[0] && !(ADDR)->in6_16[1] && !(ADDR)->in6_16[2] \
- && !(ADDR)->in6_16[3] && !(ADDR)->in6_16[4] && (ADDR)->in6_16[6] \
- && (!(ADDR)->in6_16[5] || (ADDR)->in6_16[5] == 65535))
+ && !(ADDR)->in6_16[3] && !(ADDR)->in6_16[4] \
+ && ((!(ADDR)->in6_16[5] && (ADDR)->in6_16[6]) \
+ || (ADDR)->in6_16[5] == 65535))
/** Evaluate to non-zero if \a A is a different IP than \a B. */
#define irc_in_addr_cmp(A,B) (irc_in_addr_is_ipv4(A) ? ((A)->in6_16[6] != (B)->in6_16[6] \
|| (A)->in6_16[7] != (B)->in6_16[7] || !irc_in_addr_is_ipv4(B)) \
Index: ircd-ircdev/include/s_user.h
diff -u ircd-ircdev/include/s_user.h:1.12 ircd-ircdev/include/s_user.h:1.13
--- ircd-ircdev/include/s_user.h:1.12 Thu Apr 26 12:17:31 2007
+++ ircd-ircdev/include/s_user.h Tue Dec 11 15:38:23 2007
@@ -21,7 +21,7 @@
*/
/** @file s_user.h
* @brief Miscellaneous user-related helper functions.
- * @version $Id: s_user.h,v 1.12 2007/04/26 19:17:31 zolty Exp $
+ * @version $Id: s_user.h,v 1.13 2007/12/11 23:38:23 zolty Exp $
*/
#ifndef INCLUDED_s_user_h
#define INCLUDED_s_user_h
@@ -72,6 +72,10 @@
#define MATCH_SERVER 1 /**< flag for relay_masked_message (etc) to indicate the mask matches a server name */
#define MATCH_HOST 2 /**< flag for relay_masked_message (etc) to indicate the mask matches host name */
+/* used for parsing user modes */
+#define ALLOWMODES_ANY 0 /**< Allow any user mode */
+#define ALLOWMODES_DEFAULT 1 /**< Only allow the subset of modes that are legit defaults */
+
/* used in set_nick_name */
#define NICK_EQUIVALENT 0x01 /** < Equivalent */
#define NICK_RENAMED 0x02 /** < Rename */
@@ -122,7 +126,7 @@
extern int hide_hostmask(struct Client *cptr, const char *vhost, unsigned int flags);
extern int set_user_mode(struct Client *cptr, struct Client *sptr,
- int parc, char *parv[]);
+ int parc, char *parv[], int allow_modes);
extern int is_silenced(struct Client *sptr, struct Client *acptr);
extern int hunt_server_cmd(struct Client *from, const char *cmd,
const char *tok, struct Client *one,
Index: ircd-ircdev/ircd/channel.c
diff -u ircd-ircdev/ircd/channel.c:1.33 ircd-ircdev/ircd/channel.c:1.34
--- ircd-ircdev/ircd/channel.c:1.33 Thu Sep 20 14:00:31 2007
+++ ircd-ircdev/ircd/channel.c Tue Dec 11 15:38:23 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Channel management and maintanance
- * @version $Id: channel.c,v 1.33 2007/09/20 21:00:31 zolty Exp $
+ * @version $Id: channel.c,v 1.34 2007/12/11 23:38:23 zolty Exp $
*/
#include "config.h"
@@ -1429,8 +1429,8 @@
{
struct Invite **uprev = &cli_user(cptr)->invited;
struct Invite *inv;
- int max = feature_int(FEAT_MAXCHANNELSPERUSER);
- int count = 0;
+ unsigned int max = feature_uint(FEAT_MAXCHANNELSPERUSER);
+ unsigned int count = 0;
/* See if the user is already invited. */
while ((inv = *uprev) != NULL)
@@ -2344,8 +2344,8 @@
MODE_DELJOINS, 'D',
0x0, 0x0
};
- unsigned int add;
- int i, bufpos = 0, len;
+ unsigned int add, i, len;
+ int bufpos = 0;
int *flag_p;
char *key = 0, limitbuf[20];
#if defined(UNDERNET)
@@ -2407,9 +2407,10 @@
return;
}
-/** Simple function to invalidate bans
+/** Simple function to invalidate a channel's ban cache.
*
- * This function sets all bans as being valid.
+ * This function marks all members of the channel as being neither
+ * banned nor banned.
*
* @param chan The channel to operate on.
*/
@@ -2438,13 +2439,16 @@
/* What we've done for mode_parse so far... */
#define DONE_LIMIT 0x01 /**< We've set the limit */
-#define DONE_KEY 0x02 /**< We've set the key */
+#define DONE_KEY_ADD 0x02 /**< We've set the key */
#define DONE_BANLIST 0x04 /**< We've sent the ban list */
#define DONE_NOTOPER 0x08 /**< We've sent a "Not oper" error */
#define DONE_BANCLEAN 0x10 /**< We've cleaned bans... */
+#define DONE_KEY_DEL 0x80 /**< We've removed the key */
#if defined(UNDERNET)
-#define DONE_UPASS 0x20 /**< We've set user pass */
-#define DONE_APASS 0x40 /**< We've set admin pass */
+#define DONE_UPASS_ADD 0x20 /**< We've set user pass */
+#define DONE_APASS_ADD 0x40 /**< We've set admin pass */
+#define DONE_UPASS_DEL 0x100 /**< We've removed the user pass */
+#define DONE_APASS_DEL 0x200 /**< We've removed the admin pass */
#endif
struct ParseState {
@@ -2600,9 +2604,19 @@
return;
}
- if (state->done & DONE_KEY) /* allow key to be set only once */
- return;
- state->done |= DONE_KEY;
+ /* allow removing and then adding key, but not adding and then removing */
+ if (state->dir == MODE_ADD)
+ {
+ if (state->done & DONE_KEY_ADD)
+ return;
+ state->done |= DONE_KEY_ADD;
+ }
+ else
+ {
+ if (state->done & (DONE_KEY_ADD | DONE_KEY_DEL))
+ return;
+ state->done |= DONE_KEY_DEL;
+ }
/* clean up the key string */
clean_key(t_str);
@@ -2703,9 +2717,19 @@
return;
}
- if (state->done & DONE_UPASS) /* allow upass to be set only once */
- return;
- state->done |= DONE_UPASS;
+ /* allow removing and then adding upass, but not adding and then removing */
+ if (state->dir == MODE_ADD)
+ {
+ if (state->done & DONE_UPASS_ADD)
+ return;
+ state->done |= DONE_UPASS_ADD;
+ }
+ else
+ {
+ if (state->done & (DONE_UPASS_ADD | DONE_UPASS_DEL))
+ return;
+ state->done |= DONE_UPASS_DEL;
+ }
/* clean up the upass string */
clean_key(t_str);
@@ -2840,9 +2864,19 @@
}
}
- if (state->done & DONE_APASS) /* allow apass to be set only once */
- return;
- state->done |= DONE_APASS;
+ /* allow removing and then adding apass, but not adding and then removing */
+ if (state->dir == MODE_ADD)
+ {
+ if (state->done & DONE_APASS_ADD)
+ return;
+ state->done |= DONE_APASS_ADD;
+ }
+ else
+ {
+ if (state->done & (DONE_APASS_ADD | DONE_APASS_DEL))
+ return;
+ state->done |= DONE_APASS_DEL;
+ }
/* clean up the apass string */
clean_key(t_str);
@@ -2975,9 +3009,9 @@
assert(newban->flags & (BAN_ADD|BAN_DEL));
if (newban->flags & BAN_ADD) {
size_t totlen = 0;
- /* If a less specific entry is found, fail. */
+ /* If a less specific *active* entry is found, fail. */
for (ban = *banlist; ban; ban = ban->next) {
- if (!bmatch(ban, newban)) {
+ if (!bmatch(ban, newban) && !(ban->flags & BAN_DEL)) {
if (do_free)
free_ban(newban);
return 1;
@@ -3668,14 +3702,14 @@
if (state.chptr->mode.limit && !(state.done & DONE_LIMIT))
modebuf_mode_uint(state.mbuf, MODE_DEL | MODE_LIMIT,
state.chptr->mode.limit);
- if (*state.chptr->mode.key && !(state.done & DONE_KEY))
+ if (*state.chptr->mode.key && !(state.done & DONE_KEY_DEL))
modebuf_mode_string(state.mbuf, MODE_DEL | MODE_KEY,
state.chptr->mode.key, 0);
#if defined(UNDERNET)
- if (*state.chptr->mode.upass && !(state.done & DONE_UPASS))
+ if (*state.chptr->mode.upass && !(state.done & DONE_UPASS_DEL))
modebuf_mode_string(state.mbuf, MODE_DEL | MODE_UPASS,
state.chptr->mode.upass, 0);
- if (*state.chptr->mode.apass && !(state.done & DONE_APASS))
+ if (*state.chptr->mode.apass && !(state.done & DONE_APASS_DEL))
modebuf_mode_string(state.mbuf, MODE_DEL | MODE_APASS,
state.chptr->mode.apass, 0);
#endif
@@ -3856,7 +3890,7 @@
{
char chanlist[BUFSIZE];
int chanlist_i = 0;
- int i;
+ unsigned int i;
if (!jbuf->jb_count || jbuf->jb_type == JOINBUF_TYPE_PARTALL ||
jbuf->jb_type == JOINBUF_TYPE_JOIN)
Index: ircd-ircdev/ircd/class.c
diff -u ircd-ircdev/ircd/class.c:1.13 ircd-ircdev/ircd/class.c:1.14
--- ircd-ircdev/ircd/class.c:1.13 Thu Apr 19 15:53:47 2007
+++ ircd-ircdev/ircd/class.c Tue Dec 11 15:38:24 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Implementation of connection class handling functions.
- * @version $Id: class.c,v 1.13 2007/04/19 22:53:47 zolty Exp $
+ * @version $Id: class.c,v 1.14 2007/12/11 23:38:24 zolty Exp $
*/
#include "config.h"
@@ -106,7 +106,7 @@
PingFreq(connClassList) = feature_int(FEAT_PINGFREQUENCY);
ConFreq(connClassList) = feature_int(FEAT_CONNECTFREQUENCY);
MaxLinks(connClassList) = feature_int(FEAT_MAXIMUM_LINKS);
- MaxSendq(connClassList) = feature_int(FEAT_DEFAULTMAXSENDQLENGTH);
+ MaxSendq(connClassList) = feature_uint(FEAT_DEFAULTMAXSENDQLENGTH);
connClassList->valid = 1;
Links(connClassList) = 1;
}
@@ -229,7 +229,7 @@
PingFreq(p) = ping;
MaxLinks(p) = maxli;
MaxSendq(p) = (sendq > 0U) ?
- sendq : feature_int(FEAT_DEFAULTMAXSENDQLENGTH);
+ sendq : feature_uint(FEAT_DEFAULTMAXSENDQLENGTH);
p->valid = 1;
}
@@ -294,7 +294,7 @@
}
}
}
- return feature_int(FEAT_DEFAULTMAXSENDQLENGTH);
+ return feature_uint(FEAT_DEFAULTMAXSENDQLENGTH);
}
/** Report connection class memory statistics to a client.
Index: ircd-ircdev/ircd/dbuf.c
diff -u ircd-ircdev/ircd/dbuf.c:1.6 ircd-ircdev/ircd/dbuf.c:1.7
--- ircd-ircdev/ircd/dbuf.c:1.6 Thu Apr 19 15:53:47 2007
+++ ircd-ircdev/ircd/dbuf.c Tue Dec 11 15:38:24 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Implementation of functions dealing with data buffers.
- * @version $Id: dbuf.c,v 1.6 2007/04/19 22:53:47 zolty Exp $
+ * @version $Id: dbuf.c,v 1.7 2007/12/11 23:38:24 zolty Exp $
*/
#include "config.h"
@@ -47,11 +47,11 @@
/** Number of dbufs allocated.
* This should only be modified by dbuf.c.
*/
-int DBufAllocCount = 0;
+unsigned int DBufAllocCount = 0;
/** Number of dbufs in use.
* This should only be modified by dbuf.c.
*/
-int DBufUsedCount = 0;
+unsigned int DBufUsedCount = 0;
/** List of allocated but unused DBuf structures. */
static struct DBufBuffer *dbufFreeList = 0;
@@ -92,7 +92,7 @@
dbufFreeList = db->next;
++DBufUsedCount;
}
- else if (DBufAllocCount * DBUF_SIZE < feature_int(FEAT_BUFFERPOOL)) {
+ else if (DBufAllocCount * DBUF_SIZE < feature_uint(FEAT_BUFFERPOOL)) {
db = (struct DBufBuffer*) MyMalloc(sizeof(struct DBufBuffer));
assert(0 != db);
++DBufAllocCount;
Index: ircd-ircdev/ircd/engine_poll.c
diff -u ircd-ircdev/ircd/engine_poll.c:1.6 ircd-ircdev/ircd/engine_poll.c:1.7
--- ircd-ircdev/ircd/engine_poll.c:1.6 Thu Apr 19 15:53:47 2007
+++ ircd-ircdev/ircd/engine_poll.c Tue Dec 11 15:38:24 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief POSIX poll() event engine.
- * @version $Id: engine_poll.c,v 1.6 2007/04/19 22:53:47 zolty Exp $
+ * @version $Id: engine_poll.c,v 1.7 2007/12/11 23:38:24 zolty Exp $
*/
#include "config.h"
@@ -171,7 +171,7 @@
static int
engine_add(struct Socket* sock)
{
- int i;
+ unsigned int i;
assert(0 != sock);
@@ -279,7 +279,7 @@
{
int wait;
int nfds;
- int i;
+ unsigned int i;
int errcode;
socklen_t codesize;
struct Socket *sock;
Index: ircd-ircdev/ircd/gline.c
diff -u ircd-ircdev/ircd/gline.c:1.21 ircd-ircdev/ircd/gline.c:1.22
--- ircd-ircdev/ircd/gline.c:1.21 Thu Sep 20 14:00:31 2007
+++ ircd-ircdev/ircd/gline.c Tue Dec 11 15:38:24 2007
@@ -23,7 +23,7 @@
*/
/** @file
* @brief Implementation of Gline manipulation functions.
- * @version $Id: gline.c,v 1.21 2007/09/20 21:00:31 zolty Exp $
+ * @version $Id: gline.c,v 1.22 2007/12/11 23:38:24 zolty Exp $
*/
#include "config.h"
@@ -71,6 +71,34 @@
/** List of BadChan G-lines. */
static struct Gline* BadChanGlineList = 0;
+/** Iterate through \a list of G-lines. Use this like a for loop,
+ * i.e., follow it with braces and use whatever you passed as \a gl
+ * as a single G-line to be acted upon.
+ *
+ * @param[in] list List of G-lines to iterate over.
+ * @param[in] gl Name of a struct Gline pointer variable that will be made to point to the G-lines in sequence.
+ * @param[in] next Name of a scratch struct Gline pointer variable.
+ */
+/* There is some subtlety here with the boolean operators:
+ * (x || 1) is used to continue in a logical-and series even when !x.
+ * (x && 0) is used to continue in a logical-or series even when x.
+ */
+#define gliter(list, gl, next) \
+ /* Iterate through the G-lines in the list */ \
+ for ((gl) = (list); (gl); (gl) = (next)) \
+ /* Figure out the next pointer in list... */ \
+ if ((((next) = (gl)->gl_next) || 1) && \
+ /* Then see if it's expired */ \
+ (gl)->gl_lifetime <= CurrentTime) \
+ /* Record has expired, so free the G-line */ \
+ gline_free((gl)); \
+ /* See if we need to expire the G-line */ \
+ else if ((((gl)->gl_expire > CurrentTime) || \
+ (((gl)->gl_flags &= ~GLINE_ACTIVE) && 0) || \
+ ((gl)->gl_state = GLOCAL_GLOBAL)) && 0) \
+ ; /* empty statement */ \
+ else
+
/** Count number of users who match \a mask.
* @param[in] mask user\@host or user\@ip mask to check.
* @return Count of matching users.
@@ -99,6 +127,31 @@
return count;
}
+/** Count number of users with a realname matching \a mask.
+ * @param[in] mask Wildcard mask to match against realnames.
+ * @return Count of matching users.
+ */
+static int
+count_realnames(const char *mask)
+{
+ struct Client *acptr;
+ int minlen;
+ int count;
+ char cmask[BUFSIZE];
+
+ count = 0;
+ matchcomp(cmask, &minlen, NULL, mask);
+ for (acptr = GlobalClientList; acptr; acptr = cli_next(acptr)) {
+ if (!IsUser(acptr))
+ continue;
+ if (strlen(cli_info(acptr)) < (unsigned int)minlen)
+ continue;
+ if (!matchexec(cli_info(acptr), cmask, minlen))
+ count++;
+ }
+ return count;
+}
+
/** Find canonical user and host for a string.
* If \a userhost starts with '$', assign \a userhost to *user_p and NULL to *host_p.
* Otherwise, if \a userhost contains '@', assign the earlier part of it to *user_p and the rest to *host_p.
@@ -141,44 +194,23 @@
*/
static struct Gline *
make_gline(char *user, char *host, char *reason, time_t expire, time_t lastmod,
- unsigned int flags)
+ time_t lifetime, unsigned int flags)
{
- struct Gline *gline, *sgline, *after = 0;
-
- if (!(flags & GLINE_BADCHAN)) { /* search for overlapping glines first */
-
- for (gline = GlobalGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime)
- gline_free(gline);
- else if (((gline->gl_flags & GLINE_LOCAL) != (flags & GLINE_LOCAL)) ||
- (gline->gl_host && !host) || (!gline->gl_host && host))
- continue;
- else if (!mmatch(gline->gl_user, user) /* gline contains new mask */
- && (gline->gl_host == NULL || !mmatch(gline->gl_host, host))) {
- if (expire <= gline->gl_expire) /* will expire before wider gline */
- return 0;
- else
- after = gline; /* stick new gline after this one */
- } else if (!mmatch(user, gline->gl_user) /* new mask contains gline */
- && (gline->gl_host==NULL || !mmatch(host, gline->gl_host))
- && gline->gl_expire <= expire) /* old expires before new */
- gline_free(gline); /* save some memory */
- }
- }
+ struct Gline *gline;
gline = (struct Gline *)MyMalloc(sizeof(struct Gline)); /* alloc memory */
assert(0 != gline);
DupString(gline->gl_reason, reason); /* initialize gline... */
gline->gl_expire = expire;
+ gline->gl_lifetime = lifetime;
gline->gl_lastmod = lastmod;
gline->gl_flags = flags & GLINE_MASK;
+ gline->gl_state = GLOCAL_GLOBAL; /* not locally modified */
if (flags & GLINE_BADCHAN) { /* set a BADCHAN gline */
DupString(gline->gl_user, user); /* first, remember channel */
- gline->gl_host = 0;
+ gline->gl_host = NULL;
gline->gl_next = BadChanGlineList; /* then link it into list */
gline->gl_prev_p = &BadChanGlineList;
@@ -195,19 +227,11 @@
if (*user != '$' && ipmask_parse(host, &gline->gl_addr, &gline->gl_bits))
gline->gl_flags |= GLINE_IPMASK;
- if (after) {
- gline->gl_next = after->gl_next;
- gline->gl_prev_p = &after->gl_next;
- if (after->gl_next)
- after->gl_next->gl_prev_p = &gline->gl_next;
- after->gl_next = gline;
- } else {
- gline->gl_next = GlobalGlineList; /* then link it into list */
- gline->gl_prev_p = &GlobalGlineList;
- if (GlobalGlineList)
- GlobalGlineList->gl_prev_p = &gline->gl_next;
- GlobalGlineList = gline;
- }
+ gline->gl_next = GlobalGlineList; /* then link it into list */
+ gline->gl_prev_p = &GlobalGlineList;
+ if (GlobalGlineList)
+ GlobalGlineList->gl_prev_p = &gline->gl_next;
+ GlobalGlineList = gline;
}
return gline;
@@ -227,6 +251,9 @@
struct Client *acptr;
int fd, retval = 0, tval;
+ if (feature_bool(FEAT_DISABLE_GLINES))
+ return 0; /* G-lines are disabled */
+
if (GlineIsBadChan(gline)) /* no action taken on badchan glines */
return 0;
if (!GlineIsActive(gline)) /* no action taken on inactive glines */
@@ -359,24 +386,17 @@
int
gline_propagate(struct Client *cptr, struct Client *sptr, struct Gline *gline)
{
- if (GlineIsLocal(gline) || (IsUser(sptr) && !gline->gl_lastmod))
+ if (GlineIsLocal(gline))
return 0;
- if (gline->gl_lastmod)
- sendcmdto_serv(sptr, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
- GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
- gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire - CurrentTime, gline->gl_lastmod,
- gline->gl_reason);
- else
- sendcmdto_serv(sptr, CMD_GLINE, cptr,
- (GlineIsRemActive(gline) ?
- "* +%s%s%s %Tu :%s" : "* -%s%s%s"),
- gline->gl_user,
- gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire - CurrentTime, gline->gl_reason);
+ assert(gline->gl_lastmod);
+
+ sendcmdto_serv(sptr, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu %Tu :%s",
+ GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
+ gline->gl_host ? "@" : "",
+ gline->gl_host ? gline->gl_host : "",
+ gline->gl_expire - CurrentTime, gline->gl_lastmod,
+ gline->gl_lifetime, gline->gl_reason);
return 0;
}
@@ -392,14 +412,16 @@
* @param[in] sptr Client that originated the G-line.
* @param[in] userhost Text mask for the G-line.
* @param[in] reason Reason for G-line.
- * @param[in] expire Duration of G-line in seconds.
+ * @param[in] expire Expiration time of G-line.
* @param[in] lastmod Last modification time of G-line.
+ * @param[in] lifetime Lifetime of G-line.
* @param[in] flags Bitwise combination of GLINE_* flags.
* @return Zero or CPTR_KILLED, depending on whether \a sptr is suicidal.
*/
int
gline_add(struct Client *cptr, struct Client *sptr, char *userhost,
- char *reason, time_t expire, time_t lastmod, unsigned int flags)
+ char *reason, time_t expire, time_t lastmod, time_t lifetime,
+ unsigned int flags)
{
struct Gline *agline;
char uhmask[USERLEN + HOSTLEN + 2];
@@ -409,15 +431,19 @@
assert(0 != userhost);
assert(0 != reason);
+ Debug((DEBUG_DEBUG, "gline_add(\"%s\", \"%s\", \"%s\", \"%s\", %Tu, %Tu "
+ "%Tu, 0x%04x)", cli_name(cptr), cli_name(sptr), userhost, reason,
+ expire, lastmod, lifetime, flags));
+
if (*userhost == '#' || *userhost == '&') {
if ((flags & GLINE_LOCAL) && !HasPriv(sptr, PRIV_LOCAL_BADCHAN))
return send_reply(sptr, ERR_NOPRIVILEGES);
flags |= GLINE_BADCHAN;
user = userhost;
- host = 0;
+ host = NULL;
} else if (*userhost == '$') {
- switch (*userhost == '$' ? userhost[1] : userhost[3]) {
+ switch (userhost[1]) {
case 'R': flags |= GLINE_REALNAME; break;
default:
/* uh, what to do here? */
@@ -425,18 +451,21 @@
-- hikari */
if (IsServer(cptr))
return protocol_violation(sptr,"%s has been smoking the sweet leaf and sent me a whacky gline",cli_name(sptr));
- else {
- sendto_opmask(NULL, SNO_GLINE, "%s has been smoking the sweet leaf and sent me a whacky gline", cli_name(sptr));
- return 0;
- }
- break;
+ sendto_opmask(NULL, SNO_GLINE, "%s has been smoking the sweet leaf and sent me a whacky gline", cli_name(sptr));
+ return 0;
+ }
+ user = userhost;
+ host = NULL;
+ if (MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) {
+ tmp = count_realnames(userhost + 2);
+ if ((tmp >= feature_int(FEAT_GLINEMAXUSERCOUNT))
+ && !(flags & GLINE_OPERFORCE))
+ return send_reply(sptr, ERR_TOOMANYUSERS, tmp);
}
- user = (*userhost =='$' ? userhost : userhost+2);
- host = 0;
} else {
canon_userhost(userhost, &user, &host, "*");
if (sizeof(uhmask) <
- ircd_snprintf(0, uhmask, sizeof(uhmask), "%s@%s", user, host))
+ (unsigned int)ircd_snprintf(0, uhmask, sizeof(uhmask), "%s@%s", user, host))
return send_reply(sptr, ERR_LONGMASK);
else if (MyUser(sptr) || (IsUser(sptr) && flags & GLINE_LOCAL)) {
switch (gline_checkmask(host)) {
@@ -459,13 +488,17 @@
* You cannot set a negative (or zero) expire time, nor can you set an
* expiration time for greater than GLINE_MAX_EXPIRE.
*/
- if (!(flags & GLINE_FORCE) && (expire <= 0 || expire > GLINE_MAX_EXPIRE)) {
+ if (!(flags & GLINE_FORCE) &&
+ (expire <= CurrentTime || expire > CurrentTime + GLINE_MAX_EXPIRE)) {
if (!IsServer(sptr) && MyConnect(sptr))
send_reply(sptr, ERR_BADEXPIRE, expire);
return 0;
}
- expire += CurrentTime; /* convert from lifetime to timestamp */
+ if (!lifetime) /* no lifetime set, use expiration time */
+ lifetime = expire;
+
+ /* lifetime is already an absolute timestamp */
/* Inform ops... */
sendto_opmask(0, ircd_strncmp(reason, "AUTO", 4) ? SNO_GLINE :
@@ -488,10 +521,12 @@
expire + TSoffset, reason);
/* make the gline */
- agline = make_gline(user, host, reason, expire, lastmod, flags);
+ agline = make_gline(user, host, reason, expire, lastmod, lifetime, flags);
- if (!agline) /* if it overlapped, silently return */
- return 0;
+ /* since we've disabled overlapped G-line checking, agline should
+ * never be NULL...
+ */
+ assert(agline);
gline_propagate(cptr, sptr, agline);
@@ -625,12 +660,243 @@
return 0;
}
+/** Modify a global G-line.
+ * @param[in] cptr Client that sent us the G-line modification.
+ * @param[in] sptr Client that originated the G-line modification.
+ * @param[in] gline G-line being modified.
+ * @param[in] action Resultant status of the G-line.
+ * @param[in] reason Reason for G-line.
+ * @param[in] expire Expiration time of G-line.
+ * @param[in] lastmod Last modification time of G-line.
+ * @param[in] lifetime Lifetime of G-line.
+ * @param[in] flags Bitwise combination of GLINE_* flags.
+ * @return Zero or CPTR_KILLED, depending on whether \a sptr is suicidal.
+ */
+int
+gline_modify(struct Client *cptr, struct Client *sptr, struct Gline *gline,
+ enum GlineAction action, char *reason, time_t expire,
+ time_t lastmod, time_t lifetime, unsigned int flags)
+{
+ char buf[BUFSIZE], *op = "";
+ int pos = 0;
+
+ assert(gline);
+ assert(!GlineIsLocal(gline));
+
+ Debug((DEBUG_DEBUG, "gline_modify(\"%s\", \"%s\", \"%s%s%s\", %s, \"%s\", "
+ "%Tu, %Tu, %Tu, 0x%04x)", cli_name(cptr), cli_name(sptr),
+ gline->gl_user, gline->gl_host ? "@" : "",
+ gline->gl_host ? gline->gl_host : "",
+ action == GLINE_ACTIVATE ? "GLINE_ACTIVATE" :
+ (action == GLINE_DEACTIVATE ? "GLINE_DEACTIVATE" :
+ (action == GLINE_LOCAL_ACTIVATE ? "GLINE_LOCAL_ACTIVATE" :
+ (action == GLINE_LOCAL_DEACTIVATE ? "GLINE_LOCAL_DEACTIVATE" :
+ (action == GLINE_MODIFY ? "GLINE_MODIFY" : "<UNKNOWN>")))),
+ reason, expire, lastmod, lifetime, flags));
+
+ /* First, let's check lastmod... */
+ if (action != GLINE_LOCAL_ACTIVATE && action != GLINE_LOCAL_DEACTIVATE) {
+ if (GlineLastMod(gline) > lastmod) { /* we have a more recent version */
+ if (IsBurstOrBurstAck(cptr))
+ return 0; /* middle of a burst, it'll resync on its own */
+ return gline_resend(cptr, gline); /* resync the server */
+ } else if (GlineLastMod(gline) == lastmod)
+ return 0; /* we have that version of the G-line... */
+ }
+
+ /* All right, we know that there's a change of some sort. What is it? */
+ /* first, check out the expiration time... */
+ if ((flags & GLINE_EXPIRE) && expire) {
+ if (!(flags & GLINE_FORCE) &&
+ (expire <= CurrentTime || expire > CurrentTime + GLINE_MAX_EXPIRE)) {
+ if (!IsServer(sptr) && MyConnect(sptr)) /* bad expiration time */
+ send_reply(sptr, ERR_BADEXPIRE, expire);
+ return 0;
+ }
+ } else
+ flags &= ~GLINE_EXPIRE;
+
+ /* Now check to see if there's any change... */
+ if ((flags & GLINE_EXPIRE) && expire == gline->gl_expire) {
+ flags &= ~GLINE_EXPIRE; /* no change to expiration time... */
+ expire = 0;
+ }
+
+ /* Next, check out lifetime--this one's a bit trickier... */
+ if (!(flags & GLINE_LIFETIME) || !lifetime)
+ lifetime = gline->gl_lifetime; /* use G-line lifetime */
+
+ lifetime = IRCD_MAX(lifetime, expire); /* set lifetime to the max */
+
+ /* OK, let's see which is greater... */
+ if (lifetime > gline->gl_lifetime)
+ flags |= GLINE_LIFETIME; /* have to update lifetime */
+ else {
+ flags &= ~GLINE_LIFETIME; /* no change to lifetime */
+ lifetime = 0;
+ }
+
+ /* Finally, let's see if the reason needs to be updated */
+ if ((flags & GLINE_REASON) && reason &&
+ !ircd_strcmp(gline->gl_reason, reason))
+ flags &= ~GLINE_REASON; /* no changes to the reason */
+
+ /* OK, now let's take a look at the action... */
+ if ((action == GLINE_ACTIVATE && (gline->gl_flags & GLINE_ACTIVE)) ||
+ (action == GLINE_DEACTIVATE && !(gline->gl_flags & GLINE_ACTIVE)) ||
+ (action == GLINE_LOCAL_ACTIVATE &&
+ (gline->gl_state == GLOCAL_ACTIVATED)) ||
+ (action == GLINE_LOCAL_DEACTIVATE &&
+ (gline->gl_state == GLOCAL_DEACTIVATED)) ||
+ /* can't activate an expired G-line */
+ IRCD_MAX(gline->gl_expire, expire) <= CurrentTime)
+ action = GLINE_MODIFY; /* no activity state modifications */
+
+ Debug((DEBUG_DEBUG, "About to perform changes; flags 0x%04x, action %s",
+ flags, action == GLINE_ACTIVATE ? "GLINE_ACTIVATE" :
+ (action == GLINE_DEACTIVATE ? "GLINE_DEACTIVATE" :
+ (action == GLINE_LOCAL_ACTIVATE ? "GLINE_LOCAL_ACTIVATE" :
+ (action == GLINE_LOCAL_DEACTIVATE ? "GLINE_LOCAL_DEACTIVATE" :
+ (action == GLINE_MODIFY ? "GLINE_MODIFY" : "<UNKNOWN>"))))));
+
+ /* If there are no changes to perform, do no changes */
+ if (!(flags & GLINE_UPDATE) && action == GLINE_MODIFY)
+ return 0;
+
+ /* Now we know what needs to be changed, so let's process the changes... */
+
+ /* Start by updating lastmod, if indicated... */
+ if (action != GLINE_LOCAL_ACTIVATE && action != GLINE_LOCAL_DEACTIVATE)
+ gline->gl_lastmod = lastmod;
+
+ /* Then move on to activity status changes... */
+ switch (action) {
+ case GLINE_ACTIVATE: /* Globally activating G-line */
+ gline->gl_flags |= GLINE_ACTIVE; /* make it active... */
+ gline->gl_state = GLOCAL_GLOBAL; /* reset local activity state */
+ pos += ircd_snprintf(0, buf, sizeof(buf), " globally activating G-line");
+ op = "+"; /* operation for G-line propagation */
+ break;
+
+ case GLINE_DEACTIVATE: /* Globally deactivating G-line */
+ gline->gl_flags &= ~GLINE_ACTIVE; /* make it inactive... */
+ gline->gl_state = GLOCAL_GLOBAL; /* reset local activity state */
+ pos += ircd_snprintf(0, buf, sizeof(buf), " globally deactivating G-line");
+ op = "-"; /* operation for G-line propagation */
+ break;
+
+ case GLINE_LOCAL_ACTIVATE: /* Locally activating G-line */
+ gline->gl_state = GLOCAL_ACTIVATED; /* make it locally active */
+ pos += ircd_snprintf(0, buf, sizeof(buf), " locally activating G-line");
+ break;
+
+ case GLINE_LOCAL_DEACTIVATE: /* Locally deactivating G-line */
+ gline->gl_state = GLOCAL_DEACTIVATED; /* make it locally inactive */
+ pos += ircd_snprintf(0, buf, sizeof(buf), " locally deactivating G-line");
+ break;
+
+ case GLINE_MODIFY: /* no change to activity status */
+ break;
+ }
+
+ /* Handle expiration changes... */
+ if (flags & GLINE_EXPIRE) {
+ gline->gl_expire = expire; /* save new expiration time */
+ if (pos < BUFSIZE)
+ pos += ircd_snprintf(0, buf + pos, sizeof(buf) - pos,
+ "%s%s changing expiration time to %Tu",
+ pos ? ";" : "",
+ pos && !(flags & (GLINE_LIFETIME | GLINE_REASON)) ?
+ " and" : "", expire);
+ }
+
+ /* Next, handle lifetime changes... */
+ if (flags & GLINE_LIFETIME) {
+ gline->gl_lifetime = lifetime; /* save new lifetime */
+ if (pos < BUFSIZE)
+ pos += ircd_snprintf(0, buf + pos, sizeof(buf) - pos,
+ "%s%s extending record lifetime to %Tu",
+ pos ? ";" : "", pos && !(flags & GLINE_REASON) ?
+ " and" : "", lifetime);
+ }
+
+ /* Now, handle reason changes... */
+ if (flags & GLINE_REASON) {
+ MyFree(gline->gl_reason); /* release old reason */
+ DupString(gline->gl_reason, reason); /* store new reason */
+ if (pos < BUFSIZE)
+ pos += ircd_snprintf(0, buf + pos, sizeof(buf) - pos,
+ "%s%s changing reason to \"%s\"",
+ pos ? ";" : "", pos ? " and" : "", reason);
+ }
+
+ /* All right, inform ops... */
+ sendto_opmask(0, SNO_GLINE, "%s modifying global %s for %s%s%s:%s",
+ (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
+ cli_name(sptr) : cli_name((cli_user(sptr))->server),
+ GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
+ gline->gl_user, gline->gl_host ? "@" : "",
+ gline->gl_host ? gline->gl_host : "", buf);
+
+ /* and log the change */
+ log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
+ "%#C modifying global %s for %s%s%s:%s", sptr,
+ GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", gline->gl_user,
+ gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "",
+ buf);
+
+ /* We'll be simple for this release, but we can update this to change
+ * the propagation syntax on future updates
+ */
+ if (action != GLINE_LOCAL_ACTIVATE && action != GLINE_LOCAL_DEACTIVATE)
+ sendcmdto_serv(sptr, CMD_GLINE, cptr,
+ "* %s%s%s%s%s %Tu %Tu %Tu :%s",
+ flags & GLINE_OPERFORCE ? "!" : "", op,
+ gline->gl_user, gline->gl_host ? "@" : "",
+ gline->gl_host ? gline->gl_host : "",
+ gline->gl_expire - CurrentTime, gline->gl_lastmod,
+ gline->gl_lifetime, gline->gl_reason);
+
+ /* OK, let's do the G-line... */
+ return do_gline(cptr, sptr, gline);
+}
+
+/** Destroy a local G-line.
+ * @param[in] cptr Peer that gave us the message.
+ * @param[in] sptr Client that initiated the destruction.
+ * @param[in] gline G-line to destroy.
+ * @return Zero.
+ */
+int
+gline_destroy(struct Client *cptr, struct Client *sptr, struct Gline *gline)
+{
+ assert(gline);
+ assert(GlineIsLocal(gline));
+
+ /* Inform ops and log it */
+ sendto_opmask(0, SNO_GLINE, "%s removing local %s for %s%s%s",
+ (feature_bool(FEAT_HIS_SNOTICES) || IsServer(sptr)) ?
+ cli_name(sptr) : cli_name((cli_user(sptr))->server),
+ GlineIsBadChan(gline) ? "BADCHAN" : "GLINE",
+ gline->gl_user, gline->gl_host ? "@" : "",
+ gline->gl_host ? gline->gl_host : "");
+ log_write(LS_GLINE, L_INFO, LOG_NOSNOTICE,
+ "%#C removing local %s for %s%s%s", sptr,
+ GlineIsBadChan(gline) ? "BADCHAN" : "GLINE", gline->gl_user,
+ gline->gl_host ? "@" : "", gline->gl_host ? gline->gl_host : "");
+
+ gline_free(gline); /* get rid of the G-line */
+
+ return 0; /* convenience return */
+}
+
/** Find a G-line for a particular mask, guided by certain flags.
* Certain bits in \a flags are interpreted specially:
* <dl>
* <dt>GLINE_ANY</dt><dd>Search both BadChans and user G-lines.</dd>
* <dt>GLINE_BADCHAN</dt><dd>Search BadChans.</dd>
* <dt>GLINE_GLOBAL</dt><dd>Only match global G-lines.</dd>
+ * <dt>GLINE_LOCAL</dt><dd>Only match local G-lines.</dd>
* <dt>GLINE_LASTMOD</dt><dd>Only match G-lines with a last modification time.</dd>
* <dt>GLINE_EXACT</dt><dd>Require an exact match of G-line mask.</dd>
* <dt>anything else</dt><dd>Search user G-lines.</dd>
@@ -642,18 +908,15 @@
struct Gline *
gline_find(char *userhost, unsigned int flags)
{
- struct Gline *gline;
+ struct Gline *gline = 0;
struct Gline *sgline;
char *user, *host, *t_uh;
if (flags & (GLINE_BADCHAN | GLINE_ANY)) {
- for (gline = BadChanGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime)
- gline_free(gline);
- else if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) ||
- (flags & GLINE_LASTMOD && !gline->gl_lastmod))
+ gliter(BadChanGlineList, gline, sgline) {
+ if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) ||
+ (flags & GLINE_LOCAL && gline->gl_flags & GLINE_GLOBAL) ||
+ (flags & GLINE_LASTMOD && !gline->gl_lastmod))
continue;
else if ((flags & GLINE_EXACT ? ircd_strcmp(gline->gl_user, userhost) :
match(gline->gl_user, userhost)) == 0)
@@ -668,13 +931,10 @@
DupString(t_uh, userhost);
canon_userhost(t_uh, &user, &host, "*");
- for (gline = GlobalGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime)
- gline_free(gline);
- else if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) ||
- (flags & GLINE_LASTMOD && !gline->gl_lastmod))
+ gliter(GlobalGlineList, gline, sgline) {
+ if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) ||
+ (flags & GLINE_LOCAL && gline->gl_flags & GLINE_GLOBAL) ||
+ (flags & GLINE_LASTMOD && !gline->gl_lastmod))
continue;
else if (flags & GLINE_EXACT) {
if (((gline->gl_host && host && ircd_strcmp(gline->gl_host, host) == 0)
@@ -685,7 +945,7 @@
if (((gline->gl_host && host && match(gline->gl_host, host) == 0)
|| (!gline->gl_host && !host)) &&
(match(gline->gl_user, user) == 0))
- break;
+ break;
}
}
@@ -706,14 +966,7 @@
struct Gline *gline;
struct Gline *sgline;
- for (gline = GlobalGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime) {
- gline_free(gline);
- continue;
- }
-
+ gliter(GlobalGlineList, gline, sgline) {
if ((flags & GLINE_GLOBAL && gline->gl_flags & GLINE_LOCAL) ||
(flags & GLINE_LASTMOD && !gline->gl_lastmod))
continue;
@@ -773,30 +1026,22 @@
struct Gline *gline;
struct Gline *sgline;
- for (gline = GlobalGlineList; gline; gline = sgline) { /* all glines */
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime) /* expire any that need expiring */
- gline_free(gline);
- else if (!GlineIsLocal(gline) && gline->gl_lastmod)
- sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
+ gliter(GlobalGlineList, gline, sgline) {
+ if (!GlineIsLocal(gline) && gline->gl_lastmod)
+ sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu %Tu :%s",
GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
gline->gl_host ? "@" : "",
gline->gl_host ? gline->gl_host : "",
gline->gl_expire - CurrentTime, gline->gl_lastmod,
- gline->gl_reason);
+ gline->gl_lifetime, gline->gl_reason);
}
- for (gline = BadChanGlineList; gline; gline = sgline) { /* all glines */
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime) /* expire any that need expiring */
- gline_free(gline);
- else if (!GlineIsLocal(gline) && gline->gl_lastmod)
- sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s %Tu %Tu :%s",
+ gliter(BadChanGlineList, gline, sgline) {
+ if (!GlineIsLocal(gline) && gline->gl_lastmod)
+ sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s %Tu %Tu %Tu :%s",
GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
gline->gl_expire - CurrentTime, gline->gl_lastmod,
- gline->gl_reason);
+ gline->gl_lifetime, gline->gl_reason);
}
}
@@ -811,12 +1056,12 @@
if (GlineIsLocal(gline) || !gline->gl_lastmod)
return 0;
- sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu :%s",
+ sendcmdto_one(&me, CMD_GLINE, cptr, "* %c%s%s%s %Tu %Tu %Tu :%s",
GlineIsRemActive(gline) ? '+' : '-', gline->gl_user,
gline->gl_host ? "@" : "",
gline->gl_host ? gline->gl_host : "",
gline->gl_expire - CurrentTime, gline->gl_lastmod,
- gline->gl_reason);
+ gline->gl_lifetime, gline->gl_reason);
return 0;
}
@@ -842,34 +1087,33 @@
send_reply(sptr, RPL_GLIST, gline->gl_user,
gline->gl_host ? "@" : "",
gline->gl_host ? gline->gl_host : "",
- gline->gl_expire + TSoffset,
+ gline->gl_expire + TSoffset, gline->gl_lastmod,
+ gline->gl_lifetime + TSoffset,
GlineIsLocal(gline) ? cli_name(&me) : "*",
- GlineIsActive(gline) ? '+' : '-', gline->gl_reason);
+ gline->gl_state == GLOCAL_ACTIVATED ? ">" :
+ (gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
+ GlineIsRemActive(gline) ? '+' : '-', gline->gl_reason);
} else {
- for (gline = GlobalGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime)
- gline_free(gline);
- else
- send_reply(sptr, RPL_GLIST, gline->gl_user,
- gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire + TSoffset,
- GlineIsLocal(gline) ? cli_name(&me) : "*",
- GlineIsActive(gline) ? '+' : '-', gline->gl_reason);
+ gliter(GlobalGlineList, gline, sgline) {
+ send_reply(sptr, RPL_GLIST, gline->gl_user,
+ gline->gl_host ? "@" : "",
+ gline->gl_host ? gline->gl_host : "",
+ gline->gl_expire + TSoffset, gline->gl_lastmod,
+ gline->gl_lifetime + TSoffset,
+ GlineIsLocal(gline) ? cli_name(&me) : "*",
+ gline->gl_state == GLOCAL_ACTIVATED ? ">" :
+ (gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
+ GlineIsRemActive(gline) ? '+' : '-', gline->gl_reason);
}
- for (gline = BadChanGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime)
- gline_free(gline);
- else
- send_reply(sptr, RPL_GLIST, gline->gl_user, "", "",
- gline->gl_expire + TSoffset,
- GlineIsLocal(gline) ? cli_name(&me) : "*",
- GlineIsActive(gline) ? '+' : '-', gline->gl_reason);
+ gliter(BadChanGlineList, gline, sgline) {
+ send_reply(sptr, RPL_GLIST, gline->gl_user, "", "",
+ gline->gl_expire + TSoffset, gline->gl_lastmod,
+ gline->gl_lifetime + TSoffset,
+ GlineIsLocal(gline) ? cli_name(&me) : "*",
+ gline->gl_state == GLOCAL_ACTIVATED ? ">" :
+ (gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
+ GlineIsRemActive(gline) ? '+' : '-', gline->gl_reason);
}
}
@@ -889,18 +1133,16 @@
struct Gline *gline;
struct Gline *sgline;
- for (gline = GlobalGlineList; gline; gline = sgline) {
- sgline = gline->gl_next;
-
- if (gline->gl_expire <= CurrentTime)
- gline_free(gline);
- else
- send_reply(sptr, RPL_STATSGLINE, 'G', gline->gl_user,
- gline->gl_host ? "@" : "",
- gline->gl_host ? gline->gl_host : "",
- gline->gl_expire + TSoffset,
- GlineIsActive(gline) ? '+' : '-',
- gline->gl_reason);
+ gliter(GlobalGlineList, gline, sgline) {
+ send_reply(sptr, RPL_STATSGLINE, 'G', gline->gl_user,
+ gline->gl_host ? "@" : "",
+ gline->gl_host ? gline->gl_host : "",
+ gline->gl_expire + TSoffset, gline->gl_lastmod,
+ gline->gl_lifetime + TSoffset,
+ gline->gl_state == GLOCAL_ACTIVATED ? ">" :
+ (gline->gl_state == GLOCAL_DEACTIVATED ? "<" : ""),
+ GlineIsRemActive(gline) ? '+' : '-',
+ gline->gl_reason);
}
}
@@ -914,13 +1156,21 @@
struct Gline *gline;
unsigned int gl = 0;
- for (gline = GlobalGlineList; gline; gline = gline->gl_next)
- {
+ for (gline = GlobalGlineList; gline; gline = gline->gl_next) {
gl++;
*gl_size += sizeof(struct Gline);
*gl_size += gline->gl_user ? (strlen(gline->gl_user) + 1) : 0;
*gl_size += gline->gl_host ? (strlen(gline->gl_host) + 1) : 0;
*gl_size += gline->gl_reason ? (strlen(gline->gl_reason) + 1) : 0;
}
+
+ for (gline = BadChanGlineList; gline; gline = gline->gl_next) {
+ gl++;
+ *gl_size += sizeof(struct Gline);
+ *gl_size += gline->gl_user ? (strlen(gline->gl_user) + 1) : 0;
+ *gl_size += gline->gl_host ? (strlen(gline->gl_host) + 1) : 0;
+ *gl_size += gline->gl_reason ? (strlen(gline->gl_reason) + 1) : 0;
+ }
+
return gl;
}
Index: ircd-ircdev/ircd/hash.c
diff -u ircd-ircdev/ircd/hash.c:1.15 ircd-ircdev/ircd/hash.c:1.16
--- ircd-ircdev/ircd/hash.c:1.15 Thu Sep 20 14:00:31 2007
+++ ircd-ircdev/ircd/hash.c Tue Dec 11 15:38:24 2007
@@ -22,7 +22,7 @@
*/
/** @file
* @brief Hash table management.
- * @version $Id: hash.c,v 1.15 2007/09/20 21:00:31 zolty Exp $
+ * @version $Id: hash.c,v 1.16 2007/12/11 23:38:24 zolty Exp $
*
* This file used to use some very complicated hash function. Now it
* uses CRC-32, but effectively remaps each input byte according to a
@@ -523,7 +523,17 @@
&& ((args->flags & LISTARG_SHOWSECRET)
|| ShowChannel(cptr, chptr)))
{
- send_reply(cptr, RPL_LIST, chptr->chname, chptr->users, chptr->topic);
+ if (args->flags & LISTARG_SHOWMODES) {
+ char modebuf[MODEBUFLEN];
+ char parabuf[MODEBUFLEN];
+
+ modebuf[0] = modebuf[1] = parabuf[0] = '\0';
+ channel_modes(cptr, modebuf, parabuf, sizeof(parabuf), chptr, NULL);
+ send_reply(cptr, RPL_LIST | SND_EXPLICIT, "%s %u %s %s :%s",
+ chptr->chname, chptr->users, modebuf, parabuf, chptr->topic);
+ } else {
+ send_reply(cptr, RPL_LIST, chptr->chname, chptr->users, chptr->topic);
+ }
}
}
/* If, at the end of the bucket, client sendq is more than half
Index: ircd-ircdev/ircd/ircd_events.c
diff -u ircd-ircdev/ircd/ircd_events.c:1.11 ircd-ircdev/ircd/ircd_events.c:1.12
--- ircd-ircdev/ircd/ircd_events.c:1.11 Thu Sep 20 14:00:31 2007
+++ ircd-ircdev/ircd/ircd_events.c Tue Dec 11 15:38:24 2007
@@ -21,7 +21,7 @@
*/
/** @file
* @brief Implementation of event loop mid-layer.
- * @version $Id: ircd_events.c,v 1.11 2007/09/20 21:00:31 zolty Exp $
+ * @version $Id: ircd_events.c,v 1.12 2007/12/11 23:38:24 zolty Exp $
*/
#include "config.h"
@@ -317,7 +317,7 @@
static void
timer_enqueue(struct Timer* timer)
{
- struct Timer** ptr_p;
+ struct GenHeader** ptr_p;
assert(0 != timer);
assert(0 == timer->t_header.gh_prev_p); /* not already on queue */
@@ -336,16 +336,16 @@
/* Find a slot to insert timer */
for (ptr_p = &evI...
[truncated message content] |