mirror of
https://github.com/anope/anope.git
synced 2026-07-05 06:13:13 +02:00
Added forgotten entries to version.log and Changes, some cleanup, and fixed a few minor TS6 issues.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/stable@2401 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
Anope Version 1.8 SVN
|
||||
-------------------
|
||||
|
||||
Provided by Han` <Han@mefalcon.org> 2009
|
||||
07/28 F Updated german language file. [ #00]
|
||||
07/28 F Added german language support to hs_request.c. [ #00]
|
||||
Provided by Anope Dev. <team@anope.org> - 2009
|
||||
07/31 F Fixed anope sending umode change using channels' syntax. [ #00]
|
||||
07/31 F Fixed TS6 UUID issue while parsing modechanges. [ #00]
|
||||
08/01 F Fixed several memory leaks in HostServ. [ #00]
|
||||
|
||||
Provided by Han` <Han@mefalcon.org> - 2009
|
||||
07/28 F Updated german language file. [ #00]
|
||||
07/28 F Added german language support to hs_request.c. [ #00]
|
||||
|
||||
Anope Version 1.8.2
|
||||
-------------------
|
||||
|
||||
+25
-9
@@ -173,7 +173,12 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av,
|
||||
alog("debug: Changing modes for %s to %s", chan->name,
|
||||
merge_args(ac, av));
|
||||
|
||||
u = finduser(source);
|
||||
if (UseTS6 && ircd->ts6) {
|
||||
u = find_byuid(source);
|
||||
if (!u) u = finduser(source);
|
||||
} else
|
||||
u = finduser(source);
|
||||
|
||||
if (u && (chan_get_user_status(chan, u) & CUS_DEOPPED)) {
|
||||
char *s;
|
||||
|
||||
@@ -239,12 +244,14 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av,
|
||||
}
|
||||
}
|
||||
|
||||
if (!(user = finduser(*av))
|
||||
&& !(UseTS6 && ircd->ts6 && (user = find_byuid(*av)))) {
|
||||
if (debug) {
|
||||
alog("debug: MODE %s %c%c for nonexistent user %s",
|
||||
if (UseTS6 && ircd->ts6) {
|
||||
user = find_byuid(*av);
|
||||
if (!user) user = finduser(*av);
|
||||
} else
|
||||
user = finduser(*av);
|
||||
if (!user && debug) {
|
||||
alog("debug: MODE %s %c%c for nonexistent user %s",
|
||||
chan->name, (add ? '+' : '-'), mode, *av);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -304,8 +311,12 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av,
|
||||
|
||||
/* Don't bounce modes from u:lined clients or servers, bug #1004. *
|
||||
* We can get UUIDs as well.. don not assume nick ~ Viper */
|
||||
user = finduser(source);
|
||||
if (!user && UseTS6 && ircd->ts6) user = find_byuid(source);
|
||||
if (UseTS6 && ircd->ts6) {
|
||||
user = find_byuid(source);
|
||||
if (!user) user = finduser(source);
|
||||
} else
|
||||
user = finduser(source);
|
||||
|
||||
if ((user && is_ulined(user->server->name)) || is_ulined((char *)source))
|
||||
return;
|
||||
|
||||
@@ -319,7 +330,12 @@ void chan_set_modes(const char *source, Channel * chan, int ac, char **av,
|
||||
real_ac--;
|
||||
real_av++;
|
||||
for (i = 0; i < real_ac; i++) {
|
||||
user = finduser(*real_av);
|
||||
if (UseTS6 && ircd->ts6) {
|
||||
user = find_byuid(*real_av);
|
||||
if (!user) user = finduser(*real_av);
|
||||
} else
|
||||
user = finduser(*real_av);
|
||||
|
||||
if (!user && UseTS6 && ircd->ts6) user = find_byuid(*real_av);
|
||||
if (user && is_on_chan(chan, user)) {
|
||||
if (check < 2)
|
||||
|
||||
+114
-109
@@ -27,9 +27,9 @@ IgnoreData *ignore;
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Add a mask/nick to the ignorelits for delta seconds.
|
||||
* @param nick Nick or (nick!)user@host to add to the ignorelist.
|
||||
* @param delta Seconds untill new entry is set to expire. 0 for permanent.
|
||||
* Add a mask/nick to the ignorelits for delta seconds.
|
||||
* @param nick Nick or (nick!)user@host to add to the ignorelist.
|
||||
* @param delta Seconds untill new entry is set to expire. 0 for permanent.
|
||||
*/
|
||||
void add_ignore(const char *nick, time_t delta)
|
||||
{
|
||||
@@ -38,48 +38,48 @@ void add_ignore(const char *nick, time_t delta)
|
||||
char *mask, *user, *host;
|
||||
User *u;
|
||||
time_t now;
|
||||
|
||||
|
||||
if (!nick)
|
||||
return;
|
||||
now = time(NULL);
|
||||
now = time(NULL);
|
||||
|
||||
|
||||
|
||||
/* If it s an existing user, we ignore the hostmask. */
|
||||
if ((u = finduser(nick))) {
|
||||
snprintf(tmp, sizeof(tmp), "*!*@%s", u->host);
|
||||
mask = sstrdup(tmp);
|
||||
snprintf(tmp, sizeof(tmp), "*!*@%s", u->host);
|
||||
mask = sstrdup(tmp);
|
||||
|
||||
/* Determine whether we get a nick or a mask. */
|
||||
} else if ((host = strchr(nick, '@'))) {
|
||||
/* Determine whether we get a nick or a mask. */
|
||||
} else if ((host = strchr(nick, '@'))) {
|
||||
/* Check whether we have a nick too.. */
|
||||
if ((user = strchr(nick, '!'))) {
|
||||
/* Check whether we have a nick too.. */
|
||||
if ((user = strchr(nick, '!'))) {
|
||||
/* this should never happen */
|
||||
if (user > host)
|
||||
return;
|
||||
mask = sstrdup(nick);
|
||||
} else {
|
||||
mask = sstrdup(nick);
|
||||
} else {
|
||||
/* We have user@host. Add nick wildcard. */
|
||||
snprintf(tmp, sizeof(tmp), "*!%s", nick);
|
||||
mask = sstrdup(tmp);
|
||||
}
|
||||
mask = sstrdup(tmp);
|
||||
}
|
||||
/* We only got a nick.. */
|
||||
} else {
|
||||
/* We only got a nick.. */
|
||||
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
|
||||
mask = sstrdup(tmp);
|
||||
}
|
||||
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
|
||||
mask = sstrdup(tmp);
|
||||
}
|
||||
|
||||
/* Check if we already got an identical entry. */
|
||||
for (ign = ignore; ign; ign = ign->next)
|
||||
if (stricmp(ign->mask, mask) == 0)
|
||||
break;
|
||||
|
||||
if (stricmp(ign->mask, mask) == 0)
|
||||
break;
|
||||
/* Found one.. */
|
||||
if (ign) {
|
||||
if (delta == 0)
|
||||
ign->time = 0;
|
||||
else if (ign->time < now + delta)
|
||||
ign->time = now + delta;
|
||||
ign->time = 0;
|
||||
else if (ign->time < now + delta)
|
||||
|
||||
/* Create new entry.. */
|
||||
} else {
|
||||
ign = scalloc(sizeof(*ign), 1);
|
||||
ign->mask = mask;
|
||||
@@ -100,8 +100,8 @@ void add_ignore(const char *nick, time_t delta)
|
||||
* Retrieve an ignorance record for a nick or mask.
|
||||
* If the nick isn't being ignored, we return NULL and if necesary
|
||||
* flush the record from the ignore list (i.e. ignore timed out).
|
||||
* Retrieve an ignorance record for a nick or mask.
|
||||
* If the nick isn't being ignored, we return NULL and if necesary
|
||||
* @param nick Nick or (nick!)user@host to look for on the ignorelist.
|
||||
* @return Pointer to the ignore record, NULL if none was found.
|
||||
*/
|
||||
IgnoreData *get_ignore(const char *nick)
|
||||
{
|
||||
@@ -110,46 +110,48 @@ IgnoreData *get_ignore(const char *nick)
|
||||
char *user, *host;
|
||||
time_t now;
|
||||
User *u;
|
||||
char *user, *host;
|
||||
|
||||
if (!nick)
|
||||
return NULL;
|
||||
User *u;
|
||||
|
||||
if (!nick)
|
||||
|
||||
/* User has disabled the IGNORE system */
|
||||
if (!allow_ignore)
|
||||
return NULL;
|
||||
|
||||
|
||||
/* User has disabled the IGNORE system */
|
||||
if (!allow_ignore)
|
||||
return NULL;
|
||||
|
||||
now = time(NULL);
|
||||
|
||||
now = time(NULL);
|
||||
u = finduser(nick);
|
||||
|
||||
/* If we find a real user, match his mask against the ignorelist. */
|
||||
if (u) {
|
||||
/* Opers are not ignored, even if a matching entry may be present. */
|
||||
if (is_oper(u))
|
||||
return NULL;
|
||||
for (ign = ignore; ign; ign = ign->next)
|
||||
if (match_usermask(ign->mask, u))
|
||||
break;
|
||||
/* If we find a real user, match his mask against the ignorelist. */
|
||||
if (u) {
|
||||
/* Opers are not ignored, even if a matching entry may be present. */
|
||||
} else {
|
||||
/* We didn't get a user.. generate a valid mask. */
|
||||
if ((host = strchr(nick, '@'))) {
|
||||
if ((user = strchr(nick, '!'))) {
|
||||
return NULL;
|
||||
for (ign = ignore; ign; ign = ign->next)
|
||||
/* this should never happen */
|
||||
if (user > host)
|
||||
return NULL;
|
||||
snprintf(tmp, sizeof(tmp), "%s", nick);
|
||||
} else {
|
||||
} else {
|
||||
/* We didn't get a user.. generate a valid mask. */
|
||||
/* We have user@host. Add nick wildcard. */
|
||||
snprintf(tmp, sizeof(tmp), "*!%s", nick);
|
||||
}
|
||||
if ((user = strchr(nick, '!'))) {
|
||||
/* this should never happen */
|
||||
|
||||
/* We only got a nick.. */
|
||||
} else
|
||||
return NULL;
|
||||
snprintf(tmp, sizeof(tmp), "%s", nick);
|
||||
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
|
||||
for (ign = ignore; ign; ign = ign->next)
|
||||
if (match_wild_nocase(ign->mask, tmp))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* We only got a nick.. */
|
||||
|
||||
/* Check whether the entry has timed out */
|
||||
if (ign && ign->time != 0 && ign->time <= now) {
|
||||
if (debug)
|
||||
alog("debug: Expiring ignore entry %s", ign->mask);
|
||||
if (ign->prev)
|
||||
@@ -162,86 +164,89 @@ IgnoreData *get_ignore(const char *nick)
|
||||
free(ign);
|
||||
ign = NULL;
|
||||
}
|
||||
alog("debug: Expiring ignore entry %s", ign->mask);
|
||||
if (ign && debug)
|
||||
alog("debug: Found ignore entry (%s) for %s", ign->mask, nick);
|
||||
return ign;
|
||||
}
|
||||
|
||||
if (ign->next)
|
||||
ign->next->prev = ign->prev;
|
||||
free(ign->mask);
|
||||
free(ign);
|
||||
ign = NULL;
|
||||
}
|
||||
|
||||
if (ign && debug)
|
||||
alog("debug: Found ignore entry (%s) for %s", ign->mask, nick);
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Deletes a given nick/mask from the ignorelist.
|
||||
* @param nick Nick or (nick!)user@host to delete from the ignorelist.
|
||||
* @return Returns 1 on success, 0 if no entry is found.
|
||||
*/
|
||||
int delete_ignore(const char *nick)
|
||||
{
|
||||
IgnoreData *ign;
|
||||
char tmp[BUFSIZE];
|
||||
char *user, *host;
|
||||
User *u;
|
||||
|
||||
|
||||
if (!nick)
|
||||
return 0;
|
||||
* Deletes a given nick/mask from the ignorelist.
|
||||
* @param nick Nick or (nick!)user@host to delete from the ignorelist.
|
||||
* @return Returns 1 on success, 0 if no entry is found.
|
||||
|
||||
/* If it s an existing user, we ignore the hostmask. */
|
||||
if ((u = finduser(nick))) {
|
||||
snprintf(tmp, sizeof(tmp), "*!*@%s", u->host);
|
||||
int delete_ignore(const char *nick)
|
||||
{
|
||||
|
||||
/* Determine whether we get a nick or a mask. */
|
||||
} else if ((host = strchr(nick, '@'))) {
|
||||
char tmp[BUFSIZE];
|
||||
char *user, *host;
|
||||
User *u;
|
||||
|
||||
/* Check whether we have a nick too.. */
|
||||
if ((user = strchr(nick, '!'))) {
|
||||
/* this should never happen */
|
||||
if (user > host)
|
||||
return 0;
|
||||
snprintf(tmp, sizeof(tmp), "%s", nick);
|
||||
} else {
|
||||
/* If it s an existing user, we ignore the hostmask. */
|
||||
if ((u = finduser(nick))) {
|
||||
/* We have user@host. Add nick wildcard. */
|
||||
snprintf(tmp, sizeof(tmp), "*!%s", nick);
|
||||
}
|
||||
|
||||
/* Determine whether we get a nick or a mask. */
|
||||
|
||||
/* We only got a nick.. */
|
||||
} else
|
||||
/* Check whether we have a nick too.. */
|
||||
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
|
||||
|
||||
for (ign = ignore; ign; ign = ign->next)
|
||||
if (stricmp(ign->mask, tmp) == 0)
|
||||
break;
|
||||
snprintf(tmp, sizeof(tmp), "%s", nick);
|
||||
} else {
|
||||
/* We have user@host. Add nick wildcard. */
|
||||
|
||||
/* No matching ignore found. */
|
||||
if (!ign)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (debug)
|
||||
alog("Deleting ignore entry %s", ign->mask);
|
||||
/* We only got a nick.. */
|
||||
} else
|
||||
|
||||
|
||||
/* Delete the entry and all references to it. */
|
||||
if (ign->prev)
|
||||
ign->prev->next = ign->next;
|
||||
else if (ignore == ign)
|
||||
ignore = ign->next;
|
||||
if (ign->next)
|
||||
ign->next->prev = ign->prev;
|
||||
|
||||
free(ign->mask);
|
||||
free(ign);
|
||||
ign = NULL;
|
||||
return 0;
|
||||
|
||||
|
||||
alog("Deleting ignore entry %s", ign->mask);
|
||||
|
||||
/* Delete the entry and all references to it. */
|
||||
if (ign->prev)
|
||||
ign->prev->next = ign->next;
|
||||
else if (ignore == ign)
|
||||
ignore = ign->next;
|
||||
if (ign->next)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
/**
|
||||
* Clear the ignorelist.
|
||||
* @return The number of entries deleted.
|
||||
*/
|
||||
int clear_ignores()
|
||||
{
|
||||
IgnoreData *ign, *next;
|
||||
int i = 0;
|
||||
free(ign->mask);
|
||||
|
||||
if (!ignore)
|
||||
return 0;
|
||||
ign = NULL;
|
||||
|
||||
for (ign = ignore; ign; ign = next) {
|
||||
next = ign->next;
|
||||
if (debug)
|
||||
alog("Deleting ignore entry %s", ign->mask);
|
||||
@@ -249,12 +254,12 @@ int clear_ignores()
|
||||
free(ign);
|
||||
i++;
|
||||
}
|
||||
/*************************************************************************/
|
||||
ignore = NULL;
|
||||
return i;
|
||||
/**
|
||||
}
|
||||
|
||||
* @return The number of entries deleted.
|
||||
/*************************************************************************/
|
||||
|
||||
/* split_buf: Split a buffer into arguments and store the arguments in an
|
||||
* argument vector pointed to by argv (which will be malloc'd
|
||||
* as necessary); return the argument count. If colon_special
|
||||
@@ -363,15 +368,15 @@ void process()
|
||||
av[0] to see if its a service nick if so assign mod_current_buffer the
|
||||
value from AV[1] else just assign av[0] - TSL */
|
||||
/* First check if the ircd proto module overrides this -GD */
|
||||
if (!*buf)
|
||||
return;
|
||||
s = strpbrk(buf, " ");
|
||||
if (s) {
|
||||
*s = 0;
|
||||
while (isspace(*++s));
|
||||
} else
|
||||
s = buf + strlen(buf);
|
||||
strscpy(cmd, buf, sizeof(cmd));
|
||||
/* fix to moduleGetLastBuffer() bug 476:
|
||||
fixed in part by adding {} to nickIsServices()
|
||||
however if you have a pseudo they could not use moduleGetLastBuffer()
|
||||
cause they are not part of nickIsServices, even those the ac count is 2
|
||||
that was ignored and only the first param was passed on which is fine for
|
||||
Bahmut ircd aliases but not for pseudo clients on. So additional logic is
|
||||
that if the ac is greater then 1 copy av[1] else copy av[0]
|
||||
I also changed from if statments, cause attempting to access a array member
|
||||
that is not set can lead to odd things - TSL (3/12/06) */
|
||||
if (!anope_set_mod_current_buffer(ac, av)) {
|
||||
if (ac >= 1) {
|
||||
if (nickIsServices(av[0], 1)) {
|
||||
|
||||
+1
-1
@@ -665,7 +665,7 @@ User *do_nick(const char *source, char *nick, char *username, char *host,
|
||||
|
||||
} else {
|
||||
/* An old user changing nicks. */
|
||||
if (UseTS6)
|
||||
if (UseTS6 && ircd->ts6)
|
||||
user = find_byuid(source);
|
||||
|
||||
if (!user)
|
||||
|
||||
+3
-1
@@ -9,9 +9,11 @@ VERSION_MAJOR="1"
|
||||
VERSION_MINOR="8"
|
||||
VERSION_PATCH="2"
|
||||
VERSION_EXTRA="-svn"
|
||||
VERSION_BUILD="2398"
|
||||
VERSION_BUILD="2401"
|
||||
|
||||
# $Log$ # Changes since 1.8.2 Release
|
||||
#Revision 2401 - Added forgotten entries to version.log and Changes, some code cleanup and fixed a few minor TS6 issues.
|
||||
#Revision 2400 - Fixed some memory leaks when setting vhosts on users.
|
||||
#Revision 2398 - Fixed a TS6 bug in chan_set_modes() causing restrictions such as secureops to fail if the IRCd sends UUIDs instead of nicks.
|
||||
#Revision 2397 - Fixed a bug in UMODE causing anope to send an extra umode change as a channel mode change.
|
||||
#Revision 2395 - Added german language support to hs_request.c. Patch provided by Han.
|
||||
|
||||
Reference in New Issue
Block a user