Compare commits

..

No commits in common. "492d560ee13e71dc35403fd676e58c2d5bdcf2a9" and "042218080e8ca773aa5ea00b3facc4eac3ecd24e" have entirely different histories.

9 changed files with 20 additions and 97 deletions

View file

@ -306,7 +306,7 @@ operator "god" {
privset = "admin";
};
/* See connecting-servers.rst for an introduction to using these files. */
// See connecting-servers.rst for an introduction to using these files.
connect "irc.uplink.com" {
host = "203.0.113.3";

View file

@ -20,8 +20,8 @@ NO PARAMETERS:
messages is stripped.
+g - Free invite. Everyone may invite users. Significantly
weakens +i control.
? +u - Unfiltered. Receive messages that would otherwise be filtered
server side based on content.
? +u - Unfiltered. Receive messages that are filtered server side based
on content
+z - Op moderated. Messages blocked by +m, +b and +q are instead
sent to ops.
+L - Large ban list. Increase maximum number of +beIq entries.

View file

@ -16,8 +16,8 @@ User modes: (* designates that the umode is oper only)
* +a - Is marked as a server admin in whois.
* +l - Can see oper locops (local wallops).
* +s - Can see server notices (see /quote help snomask).
? +u - Receive messages that would otherwise be filtered server side
based on content.
? +u - Receive messages that are filtered server side based
on content
* +z - Can see operwalls.
? +C - Prevents you from receiving CTCPs other than ACTION.
+D - Deaf - ignores all channel messages.

View file

@ -11,8 +11,8 @@ User modes: (? designates that the umode is provided by an extension
? +h - Has a cloaked host. May be +x depending on cloaking module
+g - Deny users not on your /ACCEPT list from messaging you and
inviting you to channels.
? +u - Receive messages that would otherwise be filtered server side
based on content.
? +u - Receive messages that are filtered server side based
on content.
+w - Can see oper wallops.
? +C - Prevents you from receiving CTCPs other than ACTION.
+D - Deaf - ignores all channel messages.

View file

@ -43,8 +43,6 @@
#include "stdinc.h"
struct Client;
enum {
PRIV_NEEDOPER = 1
};

View file

@ -40,7 +40,6 @@
#include <openssl/rsa.h>
#endif
struct Client;
struct ConfItem;
extern rb_dlink_list cluster_conf_list;

View file

@ -685,44 +685,23 @@ time_t
valid_temp_time(const char *p)
{
time_t result = 0;
long current = 0;
while (*p) {
char *endp;
errno = 0;
current = strtol(p, &endp, 10);
if (errno == ERANGE)
return -1;
if (endp == p)
return -1;
switch (*endp) {
case '\0': /* No unit was given so send it back as minutes */
case 'm':
result += current * 60;
break;
case 'h':
result += current * 3600;
break;
case 'd':
result += current * 86400;
break;
case 'w':
result += current * 604800;
break;
default:
return -1;
while(*p)
{
if(IsDigit(*p))
{
result *= 10;
result += ((*p) & 0xF);
p++;
}
if (*endp == '\0')
break;
p = endp + 1;
else
return -1;
}
return MIN(result, 60 * 60 * 24 * 7 * 52);
if(result > (60 * 24 * 7 * 52))
result = (60 * 24 * 7 * 52);
return(result * 60);
}
/* Propagated bans are expired elsewhere. */

View file

@ -1,7 +1,6 @@
check_PROGRAMS = runtests \
chmode1 \
match1 \
misc \
msgbuf_parse1 \
msgbuf_unparse1 \
hostmask1 \

View file

@ -1,52 +0,0 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include "tap/basic.h"
#include "s_newconf.h"
#define MSG "%s:%d (%s)", __FILE__, __LINE__, __FUNCTION__
#define MINUTE (60)
#define HOUR (MINUTE * 60)
#define DAY (HOUR * 24)
#define WEEK (DAY * 7)
static void valid_temp_time1(void)
{
time_t t;
t = valid_temp_time("1");
is_int(MINUTE, t, MSG);
t = valid_temp_time("1m");
is_int(MINUTE, t, MSG);
t = valid_temp_time("1h");
is_int(HOUR, t, MSG);
t = valid_temp_time("1d");
is_int(DAY, t, MSG);
t = valid_temp_time("1w");
is_int(WEEK, t, MSG);
t = valid_temp_time("2d");
is_int(2 * DAY, t, MSG);
t = valid_temp_time("1w2d3h4m");
is_int(1 * WEEK + 2 * DAY + 3 * HOUR + 4 * MINUTE, t, MSG);
t = valid_temp_time("1w2d3h4");
is_int(1 * WEEK + 2 * DAY + 3 * HOUR + 4 * MINUTE, t, MSG);
t = valid_temp_time("4m3h2d1w");
is_int(1 * WEEK + 2 * DAY + 3 * HOUR + 4 * MINUTE, t, MSG);
t = valid_temp_time("7000w");
is_int(52 * WEEK, t, MSG);
}
int main(int argc, char *argv[])
{
plan_lazy();
valid_temp_time1();
return 0;
}