106 |
|
0, /* O */ |
107 |
|
0, /* P */ |
108 |
|
0, /* Q */ |
109 |
< |
0, /* R */ |
109 |
> |
UMODE_REGONLY, /* R */ |
110 |
|
0, /* S */ |
111 |
|
0, /* T */ |
112 |
|
0, /* U */ |
126 |
|
UMODE_CALLERID, /* g */ |
127 |
|
0, /* h */ |
128 |
|
UMODE_INVISIBLE, /* i */ |
129 |
< |
0, /* j */ |
129 |
> |
UMODE_REJ, /* j */ |
130 |
|
UMODE_SKILL, /* k */ |
131 |
|
UMODE_LOCOPS, /* l */ |
132 |
|
0, /* m */ |
134 |
|
UMODE_OPER, /* o */ |
135 |
|
0, /* p */ |
136 |
|
0, /* q */ |
137 |
< |
UMODE_REJ, /* r */ |
137 |
> |
UMODE_REGISTERED, /* r */ |
138 |
|
UMODE_SERVNOTICE, /* s */ |
139 |
|
0, /* t */ |
140 |
|
UMODE_UNAUTH, /* u */ |
309 |
|
return; |
310 |
|
} |
311 |
|
|
312 |
< |
source_p->localClient->last = CurrentTime; |
312 |
> |
source_p->localClient->last_privmsg = CurrentTime; |
313 |
|
/* Straight up the maximum rate of flooding... */ |
314 |
|
source_p->localClient->allow_read = MAX_FLOOD_BURST; |
315 |
|
|
508 |
|
/* |
509 |
|
* coming from another server, take the servers word for it |
510 |
|
*/ |
511 |
< |
source_p->servptr = find_server(server); |
511 |
> |
source_p->servptr = hash_find_server(server); |
512 |
|
|
513 |
|
/* Super GhostDetect: |
514 |
|
* If we can't find the server the user is supposed to be on, |
542 |
|
return; |
543 |
|
} |
544 |
|
|
545 |
+ |
/* |
546 |
+ |
* If the nick has been introduced by a services server, |
547 |
+ |
* make it a service as well. |
548 |
+ |
*/ |
549 |
+ |
if (IsService(source_p->servptr)) |
550 |
+ |
SetService(source_p); |
551 |
+ |
|
552 |
|
/* Increment our total user count here */ |
553 |
|
if (++Count.total > Count.max_tot) |
554 |
|
Count.max_tot = Count.total; |
683 |
|
return 1; |
684 |
|
} |
685 |
|
|
686 |
+ |
/* clean_nick_name() |
687 |
+ |
* |
688 |
+ |
* input - nickname |
689 |
+ |
* - whether it's a local nick (1) or remote (0) |
690 |
+ |
* output - none |
691 |
+ |
* side effects - walks through the nickname, returning 0 if erroneous |
692 |
+ |
*/ |
693 |
+ |
int |
694 |
+ |
valid_nickname(const char *nickname, const int local) |
695 |
+ |
{ |
696 |
+ |
const char *p = nickname; |
697 |
+ |
assert(nickname && *nickname); |
698 |
+ |
|
699 |
+ |
/* nicks can't start with a digit or - or be 0 length */ |
700 |
+ |
/* This closer duplicates behaviour of hybrid-6 */ |
701 |
+ |
if (*p == '-' || (IsDigit(*p) && local) || *p == '\0') |
702 |
+ |
return 0; |
703 |
+ |
|
704 |
+ |
for (; *p; ++p) |
705 |
+ |
if (!IsNickChar(*p)) |
706 |
+ |
return 0; |
707 |
+ |
|
708 |
+ |
return p - nickname <= (NICKLEN - 1); |
709 |
+ |
} |
710 |
+ |
|
711 |
|
/* report_and_set_user_flags() |
712 |
|
* |
713 |
|
* inputs - pointer to source_p |
762 |
|
me.name,source_p->name); |
763 |
|
} |
764 |
|
|
733 |
– |
/* If this user is exempt from idle time outs */ |
734 |
– |
if (IsConfIdlelined(aconf)) |
735 |
– |
{ |
736 |
– |
SetIdlelined(source_p); |
737 |
– |
sendto_one(source_p, |
738 |
– |
":%s NOTICE %s :*** You are exempt from idle limits. congrats.", |
739 |
– |
me.name, source_p->name); |
740 |
– |
} |
741 |
– |
|
765 |
|
if (IsConfCanFlood(aconf)) |
766 |
|
{ |
767 |
|
SetCanFlood(source_p); |
908 |
|
/* we may not get these, |
909 |
|
* but they shouldnt be in default |
910 |
|
*/ |
911 |
+ |
case 'r': |
912 |
|
case ' ' : |
913 |
|
case '\n': |
914 |
|
case '\r': |
941 |
|
sendto_one(source_p, form_str(ERR_UMODEUNKNOWNFLAG), |
942 |
|
me.name, source_p->name); |
943 |
|
|
944 |
< |
if ((source_p->umodes & UMODE_NCHANGE) && !IsOperN(source_p)) |
944 |
> |
if (HasUMode(source_p, UMODE_NCHANGE) && !IsOperN(source_p)) |
945 |
|
{ |
946 |
|
sendto_one(source_p, ":%s NOTICE %s :*** You have no admin flag;", |
947 |
|
me.name, source_p->name); |
948 |
< |
source_p->umodes &= ~UMODE_NCHANGE; /* only tcm's really need this */ |
948 |
> |
DelUMode(source_p, UMODE_NCHANGE); /* only tcm's really need this */ |
949 |
|
} |
950 |
|
|
951 |
|
if (MyConnect(source_p) && (source_p->umodes & UMODE_ADMIN) && |
1211 |
|
SetOFlag(source_p, oconf->port); |
1212 |
|
|
1213 |
|
if (IsOperAdmin(source_p) || IsOperHiddenAdmin(source_p)) |
1214 |
< |
source_p->umodes |= UMODE_ADMIN; |
1214 |
> |
AddUMode(source_p, UMODE_ADMIN); |
1215 |
|
if (!IsOperN(source_p)) |
1216 |
< |
source_p->umodes &= ~UMODE_NCHANGE; |
1216 |
> |
DelUMode(source_p, UMODE_NCHANGE); |
1217 |
|
|
1218 |
|
sendto_realops_flags(UMODE_ALL, L_ALL, "%s (%s@%s) is now an operator", |
1219 |
|
source_p->name, source_p->username, source_p->host); |