| 281 |
|
void |
| 282 |
|
register_local_user(struct Client *source_p) |
| 283 |
|
{ |
| 284 |
+ |
const char *id = NULL; |
| 285 |
|
const struct AccessItem *aconf = NULL; |
| 286 |
|
dlink_node *ptr = NULL; |
| 287 |
|
dlink_node *m = NULL; |
| 417 |
|
if (check_xline(source_p)) |
| 418 |
|
return; |
| 419 |
|
|
| 420 |
< |
if (me.id[0]) |
| 421 |
< |
{ |
| 421 |
< |
const char *id = NULL; |
| 422 |
< |
|
| 423 |
< |
while (hash_find_id((id = uid_get())) != NULL) |
| 424 |
< |
; |
| 420 |
> |
while (hash_find_id((id = uid_get())) != NULL) |
| 421 |
> |
; |
| 422 |
|
|
| 423 |
< |
strlcpy(source_p->id, id, sizeof(source_p->id)); |
| 424 |
< |
hash_add_id(source_p); |
| 428 |
< |
} |
| 423 |
> |
strlcpy(source_p->id, id, sizeof(source_p->id)); |
| 424 |
> |
hash_add_id(source_p); |
| 425 |
|
|
| 426 |
|
sendto_realops_flags(UMODE_CCONN, L_ALL, |
| 427 |
|
"Client connecting: %s (%s@%s) [%s] {%s} [%s]", |
| 811 |
|
return; |
| 812 |
|
} |
| 813 |
|
|
| 814 |
< |
if (source_p != target_p || target_p->from != source_p->from) |
| 814 |
> |
if (source_p != target_p) |
| 815 |
|
{ |
| 816 |
|
sendto_one(source_p, form_str(ERR_USERSDONTMATCH), |
| 817 |
|
me.name, source_p->name); |
| 1086 |
|
|
| 1087 |
|
if (ConfigFileEntry.short_motd) |
| 1088 |
|
{ |
| 1089 |
< |
sendto_one(source_p, "NOTICE %s :*** Notice -- motd was last changed at %s", |
| 1090 |
< |
source_p->name, ConfigFileEntry.motd.lastChangedDate); |
| 1089 |
> |
sendto_one(source_p, ":%s NOTICE %s :*** Notice -- motd was last changed at %s", |
| 1090 |
> |
me.name, source_p->name, ConfigFileEntry.motd.lastChangedDate); |
| 1091 |
|
sendto_one(source_p, |
| 1092 |
< |
"NOTICE %s :*** Notice -- Please read the motd if you haven't " |
| 1093 |
< |
"read it", source_p->name); |
| 1092 |
> |
":%s NOTICE %s :*** Notice -- Please read the motd if you haven't " |
| 1093 |
> |
"read it", me.name, source_p->name); |
| 1094 |
|
sendto_one(source_p, form_str(RPL_MOTDSTART), |
| 1095 |
|
me.name, source_p->name, me.name); |
| 1096 |
|
sendto_one(source_p, form_str(RPL_MOTD), |
| 1209 |
|
int |
| 1210 |
|
valid_sid(const char *sid) |
| 1211 |
|
{ |
| 1216 |
– |
|
| 1212 |
|
if (strlen(sid) == IRC_MAXSID) |
| 1213 |
|
if (IsDigit(*sid)) |
| 1214 |
|
if (IsAlNum(*(sid + 1)) && IsAlNum(*(sid + 2))) |
| 1233 |
|
|
| 1234 |
|
memset(new_uid, 0, sizeof(new_uid)); |
| 1235 |
|
|
| 1236 |
< |
if (ServerInfo.sid != NULL) |
| 1242 |
< |
{ |
| 1236 |
> |
if (!EmptyString(ServerInfo.sid)) |
| 1237 |
|
strlcpy(new_uid, ServerInfo.sid, sizeof(new_uid)); |
| 1244 |
– |
strlcpy(me.id, ServerInfo.sid, sizeof(me.id)); |
| 1245 |
– |
|
| 1246 |
– |
hash_add_id(&me); |
| 1247 |
– |
} |
| 1238 |
|
|
| 1239 |
< |
for (i = 0; i < IRC_MAXSID; i++) |
| 1239 |
> |
for (i = 0; i < IRC_MAXSID; ++i) |
| 1240 |
|
if (new_uid[i] == '\0') |
| 1241 |
|
new_uid[i] = 'A'; |
| 1242 |
|
|