1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-06-12 17:14:46 +02:00

Did a hack on ALN

This commit is contained in:
stskeeps
2000-05-28 17:32:31 +00:00
parent 58d92222ae
commit 19a1e80ba8
3 changed files with 32 additions and 3 deletions
+3 -1
View File
@@ -320,4 +320,6 @@
- Fixed a bug with /chgname with incorrect parameters to other servers
- "Fixed" the /stats u bug?
- Fixed +f not working (?)
- Made the Own-protection just reduce the class maxli instead of bitching..
- Made the Own-protection just reduce the class maxli instead of bitching..
- Did a dirty hack on ALN problem with colliding hash (will deny linking in
wrong servers)
+11 -2
View File
@@ -443,7 +443,8 @@ int m_server(cptr, sptr, parc, parv)
{
char *ch;
int i;
char info[REALLEN + 1], *inpath, *host, *encr;
char info[REALLEN + 1], *inpath, *host, *encr, *f;
char pp[512];
aClient *acptr, *bcptr;
aConfItem *aconf, *cconf;
int hop, ts = 0;
@@ -566,7 +567,13 @@ int m_server(cptr, sptr, parc, parv)
}
/* bzero(cptr->passwd, sizeof(cptr->passwd)); */
}
f = does_servername_collide(parv[1]);
if (f)
{
ircsprintf(pp, "Servername %s collides with servername %s (similar hash). Change servername in some way (maybe change case)",
parv[1], f);
return exit_client(cptr, cptr, cptr, f);
}
if ((acptr = find_name(host, NULL)))
{
aClient *ocptr;
@@ -607,6 +614,8 @@ int m_server(cptr, sptr, parc, parv)
return exit_client(cptr, cptr, cptr, "Nick as Server");
}
if (IsServer(cptr))
{
/*
+18
View File
@@ -125,6 +125,24 @@ char *find_server_aln(char *s)
return (convert2aln(hash(s)));
}
char *does_servername_collide(char *s)
{
int i = hash(s);
if (scache_hash[i])
{
if (strcmp(s, scache_hash[i])
return scache_hash[i];
else
return NULL;
}
else
{
return NULL;
}
}
/*
* Added so s_debug could check memory usage in here -Dianora
*/