1
0
mirror of https://github.com/anope/anope.git synced 2026-07-07 16:23:14 +02:00

BUILD : 1.7.22 (1440) BUGS : NOTES : Anope 1.7.22 release

git-svn-id: svn://svn.anope.org/anope/trunk@1440 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1155 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2008-09-14 16:32:24 +00:00
parent 521ce2e0f7
commit 2923c21db7
9 changed files with 232 additions and 222 deletions
+5 -11
View File
@@ -1,4 +1,4 @@
Anope Version S V N
Anope Version 1.7.22
--------------------
01/24 A Added a check for hosts too long in BotServs bots. [ #00]
02/12 A Added SUSPENDED to NS LIST keywords. [#869]
@@ -44,10 +44,12 @@ Anope Version S V N
02/12 F Removed extra loop when parsing defcon modes. [#867]
02/21 F Fixed errors in lang files related to NS SASET LANGUAGE [#881]
04/30 F Operators can now also use NickServ INFO ALL. [ #00]
05/12 F install.js now works properly on x64 machines [#897]
05/12 F anope_cmd_notice_ops for unreal now includes source. [ #00]
05/12 F moduleNoticeLang() now calls notice_user instead of notice(). [ #00]
08/11 F Updated os_raw.c to show up as a 3rd party module. [ #00]
08/15 F CS OP now correctly works if there is only 1 user in the channel. [#922]
08/16 F Forbidden channels no longer appear in /list when inhabited. [#924]
08/17 F Various InspIRCd issues. [#832]
08/18 F CS GETKEY response. [#880]
08/21 F Potential issues caused by not setting SO_REUSEADDR on socket. [ #00]
@@ -59,13 +61,9 @@ Anope Version S V N
09/03 F Fixed variables not correctly shown in help. [#873]
09/04 F Rewrote the ignore system to fix several issues. [#930]
09/13 F AKICK now respects the PEACE setting. [#935]
09/14 F Fixed CLEAR not always sending correct modes. [#938]
Provided by Charles Kingsley <chaz@anope.org> - 2008
09/14 F Fixed compile warning in os_clearmodes.c. [#939]
Provided by Jobe <jobe@anope.org> - 2008
09/13 F Fixed bug in ratbox RESV support. [#937]
09/14 F Fixed CLEAR not always sending correct modes. [#938]
09/14 F Fixed compile warning in os_clearmodes.c. [#939]
Provided by Robin Burchell <w00t@inspircd.org> - 2008
08/08 F Strict warnings in send.c from comparing address of non-ptr [ #00]
@@ -75,10 +73,6 @@ Provided by Robin Burchell <w00t@inspircd.org> - 2008
Provided by Christian Schroer <Christian.Schroer@coderschlampe.com> - 2008
07/20 F Updated Deutch language file. [#892]
Provided by Scott Seufert <katsklaw@ircmojo.net> - 2008
05/12 F install.js now works properly on x64 machines [#897]
08/16 F Forbidden channels no longer appear in /list when inhabited. [#924]
Provided by Trystan <trystan@nomadirc.net> - 2008
02/11 F Last part of memory leak in cs_akick() [#870]
+1 -1
View File
@@ -1,4 +1,4 @@
Anope Version S V N
Anope Version 1.7.22
--------------------
** ADDED CONFIGURATION DIRECTIVES **
+1 -1
View File
@@ -1,4 +1,4 @@
Anope Version S V N
Anope Version 1.7.22
--------------------
*** New Strings:
NICK_SASET_LANGUAGE_SYNTAX
+1 -1
View File
@@ -1,4 +1,4 @@
Anope Version S V N
Anope Version 1.7.22
--------------------
- NONE
+1 -1
View File
@@ -181,7 +181,7 @@ void common_unban(ChannelInfo * ci, char *nick)
for (ban = ci->c->bans->entries; ban; ban = next) {
next = ban->next;
if (entry_match(ban, u->nick, u->username, u->host, ip) ||
entry_match(ban, u->nick, u->username, u->vhost, ip)) {
entry_match(ban, u->nick, u->username, u->vhost, ip)) {
anope_cmd_mode(whosends(ci), ci->name, "-b %s", ban->mask);
if (ircdcap->tsmode)
av[3] = ban->mask;
+4 -2
View File
@@ -782,8 +782,10 @@ void bot_join(ChannelInfo * ci)
for (ban = ci->c->bans->entries; ban; ban = next) {
next = ban->next;
if (entry_match(ban, ci->bi->nick, ci->bi->user, ci->bi->host, 0)) {
anope_cmd_mode(whosends(ci), ci->name, "-b %s", ban->mask);
if (entry_match
(ban, ci->bi->nick, ci->bi->user, ci->bi->host, 0)) {
anope_cmd_mode(whosends(ci), ci->name, "-b %s",
ban->mask);
if (ircdcap->tsmode)
av[3] = ban->mask;
else
+39 -27
View File
@@ -1698,7 +1698,8 @@ void del_ban(Channel * chan, char *mask)
entry_delete(chan->bans, ban);
if (debug)
alog("debug: Deleted ban %s from channel %s", mask, chan->name);
alog("debug: Deleted ban %s from channel %s", mask,
chan->name);
}
if (chan->ci && (akick = is_stuck(chan->ci, mask)))
@@ -1712,7 +1713,7 @@ void del_exception(Channel * chan, char *mask)
Entry *exception;
/* Sanity check as it seems some IRCD will just send -e without a mask */
if (!mask|| !chan->excepts || (chan->excepts->count == 0))
if (!mask || !chan->excepts || (chan->excepts->count == 0))
return;
exception = elist_find_mask(chan->excepts, mask);
@@ -1721,7 +1722,8 @@ void del_exception(Channel * chan, char *mask)
entry_delete(chan->excepts, exception);
if (debug)
alog("debug: Deleted except %s to channel %s", mask, chan->name);
alog("debug: Deleted except %s to channel %s", mask,
chan->name);
}
}
@@ -1742,7 +1744,8 @@ void del_invite(Channel * chan, char *mask)
entry_delete(chan->invites, invite);
if (debug)
alog("debug: Deleted invite %s to channel %s", mask, chan->name);
alog("debug: Deleted invite %s to channel %s", mask,
chan->name);
}
}
@@ -2008,7 +2011,7 @@ Entry *entry_create(char *mask)
* @param mask The mask to parse and add to the list
* @return Pointer to newly added entry. NULL if it fails.
*/
Entry *entry_add(EList *list, char *mask)
Entry *entry_add(EList * list, char *mask)
{
Entry *e;
char *hostmask;
@@ -2036,7 +2039,7 @@ Entry *entry_add(EList *list, char *mask)
* @param list Linked list from which entry needs to be removed.
* @param e The entry to be deleted, must be member of list.
*/
void entry_delete(EList *list, Entry *e)
void entry_delete(EList * list, Entry * e)
{
if (!list || !e)
return;
@@ -2066,7 +2069,8 @@ void entry_delete(EList *list, Entry *e)
* Create and initialize a new entrylist
* @return Pointer to the created EList object
**/
EList *list_create() {
EList *list_create()
{
EList *list;
list = scalloc(1, sizeof(EList));
@@ -2086,26 +2090,32 @@ EList *list_create() {
* @param ip IP to match against, set to 0 to not match this
* @return 1 for a match, 0 for no match
*/
int entry_match(Entry *e, char *nick, char *user, char *host, uint32 ip)
int entry_match(Entry * e, char *nick, char *user, char *host, uint32 ip)
{
/* If we don't get an entry, or it s an invalid one, no match ~ Viper*/
/* If we don't get an entry, or it s an invalid one, no match ~ Viper */
if (!e || e->type == ENTRYTYPE_NONE)
return 0;
if (ircd->cidrchanbei && (e->type & ENTRYTYPE_CIDR4) &&
(!ip || (ip && ((ip & e->cidr_mask) != e->cidr_ip))))
(!ip || (ip && ((ip & e->cidr_mask) != e->cidr_ip))))
return 0;
if ((e->type & ENTRYTYPE_NICK) && (!nick || stricmp(e->nick, nick) != 0))
if ((e->type & ENTRYTYPE_NICK)
&& (!nick || stricmp(e->nick, nick) != 0))
return 0;
if ((e->type & ENTRYTYPE_USER) && (!user || stricmp(e->user, user) != 0))
if ((e->type & ENTRYTYPE_USER)
&& (!user || stricmp(e->user, user) != 0))
return 0;
if ((e->type & ENTRYTYPE_HOST) && (!user || stricmp(e->host, host) != 0))
if ((e->type & ENTRYTYPE_HOST)
&& (!user || stricmp(e->host, host) != 0))
return 0;
if ((e->type & ENTRYTYPE_NICK_WILD) && !match_wild_nocase(e->nick, nick))
if ((e->type & ENTRYTYPE_NICK_WILD)
&& !match_wild_nocase(e->nick, nick))
return 0;
if ((e->type & ENTRYTYPE_USER_WILD) && !match_wild_nocase(e->user, user))
if ((e->type & ENTRYTYPE_USER_WILD)
&& !match_wild_nocase(e->user, user))
return 0;
if ((e->type & ENTRYTYPE_HOST_WILD) && !match_wild_nocase(e->host, host))
if ((e->type & ENTRYTYPE_HOST_WILD)
&& !match_wild_nocase(e->host, host))
return 0;
return 1;
@@ -2118,7 +2128,7 @@ int entry_match(Entry *e, char *nick, char *user, char *host, uint32 ip)
* @param ip IP to match against, set to 0 to not match this
* @return 1 for a match, 0 for no match
*/
int entry_match_mask(Entry *e, char *mask, uint32 ip)
int entry_match_mask(Entry * e, char *mask, uint32 ip)
{
char *hostmask, *nick, *user, *host;
int res;
@@ -2132,7 +2142,7 @@ int entry_match_mask(Entry *e, char *mask, uint32 ip)
if (user) {
*user++ = '\0';
nick = hostmask;
} else {
} else {
nick = NULL;
user = hostmask;
}
@@ -2159,7 +2169,8 @@ int entry_match_mask(Entry *e, char *mask, uint32 ip)
* @param ip The ip to match
* @return Returns the first matching entry, if none, NULL is returned.
*/
Entry *elist_match(EList *list, char *nick, char *user, char *host, uint32 ip)
Entry *elist_match(EList * list, char *nick, char *user, char *host,
uint32 ip)
{
Entry *e;
@@ -2182,7 +2193,7 @@ Entry *elist_match(EList *list, char *nick, char *user, char *host, uint32 ip)
* @param ip The ip to match
* @return Returns the first matching entry, if none, NULL is returned.
*/
Entry *elist_match_mask(EList *list, char *mask, uint32 ip)
Entry *elist_match_mask(EList * list, char *mask, uint32 ip)
{
char *hostmask, *nick, *user, *host;
Entry *res;
@@ -2199,7 +2210,7 @@ Entry *elist_match_mask(EList *list, char *mask, uint32 ip)
if (user) {
*user++ = '\0';
nick = hostmask;
} else {
} else {
nick = NULL;
user = hostmask;
}
@@ -2223,7 +2234,7 @@ Entry *elist_match_mask(EList *list, char *mask, uint32 ip)
* @param user The user to match against the entries
* @return Returns the first matching entry, if none, NULL is returned.
*/
Entry *elist_match_user(EList *list, User *u)
Entry *elist_match_user(EList * list, User * u)
{
Entry *res;
char *host;
@@ -2264,16 +2275,16 @@ Entry *elist_match_user(EList *list, User *u)
* @param mask The *!*@* mask to match
* @return Returns the first matching entry, if none, NULL is returned.
*/
Entry *elist_find_mask(EList *list, char *mask)
Entry *elist_find_mask(EList * list, char *mask)
{
Entry *e;
if (!list || !list->entries || !mask)
return NULL;
for (e = list->entries; e; e = e->next) {
if (!stricmp(e->mask, mask))
return e;
for (e = list->entries; e; e = e->next) {
if (!stricmp(e->mask, mask))
return e;
}
return NULL;
@@ -2284,7 +2295,8 @@ Entry *elist_find_mask(EList *list, char *mask)
* @param list The list we should estimate the mem use of.
* @return Returns the memory useage of the given list.
*/
long get_memuse(EList *list) {
long get_memuse(EList * list)
{
Entry *e;
long mem = 0;
+173 -175
View File
@@ -35,54 +35,56 @@ void add_ignore(const char *nick, time_t delta)
{
IgnoreData *ign;
char tmp[BUFSIZE];
char *mask, *user, *host;
time_t now = time(NULL);
if (!nick)
return;
/* Determine whether we get a nick or a mask. */
if ((host = 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 {
/* We have user@host. Add nick wildcard. */
snprintf(tmp, sizeof(tmp), "*!%s", nick);
mask = sstrdup(tmp);
}
} else {
/* We only got a nick.. */
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
mask = sstrdup(tmp);
}
/* Check if we already got an identical entry. */
for (ign = ignore; ign; ign = ign->next)
char *mask, *user, *host;
time_t now = time(NULL);
if (!nick)
return;
/* Determine whether we get a nick or a mask. */
if ((host = 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 {
/* We have user@host. Add nick wildcard. */
snprintf(tmp, sizeof(tmp), "*!%s", nick);
mask = sstrdup(tmp);
}
} else {
/* Found one.. */
if (ign) {
/* We only got a nick.. */
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
ign->time = now + delta;
/* Create new entry.. */
mask = sstrdup(tmp);
}
/* Check if we already got an identical entry. */
for (ign = ignore; ign; ign = ign->next)
ign->prev = NULL;
ign->next = ignore;
if (ignore)
ignore->prev = ign;
ignore = ign;
if (debug)
alog("debug: Added new ignore entry for %s", mask);
}
if (stricmp(ign->mask, mask) == 0)
break;
/* Found one.. */
if (ign) {
if (ign->time < now + delta)
ign->time = now + delta;
/* Create new entry.. */
} else {
ign = scalloc(sizeof(*ign), 1);
@@ -97,160 +99,157 @@ void add_ignore(const char *nick, time_t delta)
ignore = ign;
char tmp[BUFSIZE];
char *user, *host;
time_t now = time(NULL);
if (debug)
alog("debug: Added new ignore entry for %s", mask);
if (!nick)
return NULL;
/* User has disabled the IGNORE system */
if (!allow_ignore)
}
}
/*************************************************************************/
/**
/* If we found 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)
* 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 in-core list (i.e. ignore timed out).
* @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)
{
IgnoreData *ign;
char tmp[BUFSIZE];
/* We didn't get a user.. generate a valid mask. */
if ((host = strchr(nick, '@'))) {
if ((user = strchr(nick, '!'))) {
/* this should never happen */
if (user > host)
return NULL;
snprintf(tmp, sizeof(tmp), "%s", nick);
} else {
/* We have user@host. Add nick wildcard. */
snprintf(tmp, sizeof(tmp), "*!%s", nick);
}
} else {
/* We only got a nick.. */
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
}
char *user, *host;
time_t now = time(NULL);
User *u = finduser(nick);
if (!nick)
return NULL;
/* User has disabled the IGNORE system */
if (!allow_ignore)
return NULL;
/* If we found 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;
} else {
/* We didn't get a user.. generate a valid mask. */
if ((host = strchr(nick, '@'))) {
if ((user = strchr(nick, '!'))) {
for (ign = ignore; ign; ign = ign->next)
if (match_wild_nocase(ign->mask, tmp))
break;
}
/* Check whether the entry has timed out */
if (ign && ign->time <= now) {
if (debug)
alog("debug: Expiring ignore entry %s", ign->mask);
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);
/* this should never happen */
if (user > host)
return NULL;
snprintf(tmp, sizeof(tmp), "%s", nick);
if (ign && debug)
alog("debug: Found ignore entry (%s) for %s", ign->mask, nick);
} else {
/* We have user@host. Add nick wildcard. */
snprintf(tmp, sizeof(tmp), "*!%s", nick);
}
/*************************************************************************/
} else {
/* We only got a nick.. */
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
* @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;
if (!nick)
return 0;
/* Determine whether we get a nick or a mask. */
if ((host = strchr(nick, '@'))) {
/* 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 {
/* We have user@host. Add nick wildcard. */
snprintf(tmp, sizeof(tmp), "*!%s", nick);
}
} else {
/* We only got a nick.. */
snprintf(tmp, sizeof(tmp), "%s!*@*", nick);
}
for (ign = ignore; ign; ign = ign->next)
if (stricmp(ign->mask, tmp) == 0)
break;
/* No matching ignore found. */
if (!ign)
return 0;
if (debug)
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)
ign->next->prev = ign->prev;
free(ign->mask);
free(ign);
ign = NULL;
return 1;
}
/*************************************************************************/
}
for (ign = ignore; ign; ign = ign->next)
if (match_wild_nocase(ign->mask, tmp))
break;
}
/* Check whether the entry has timed out */
if (ign && ign->time <= now) {
if (debug)
alog("debug: Expiring ignore entry %s", ign->mask);
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;
}
if (ign && debug)
alog("debug: Found ignore entry (%s) for %s", ign->mask, nick);
return ign;
}
/*************************************************************************/
/**
* 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];
* @return The number of entries deleted.
*/
int clear_ignores()
{
IgnoreData *ign, *next;
int i = 0;
if (!ignore)
return 0;
for (ign = ignore; ign; ign = next) {
next = ign->next;
if (debug)
alog("Deleting ignore entry %s", ign->mask);
free(ign->mask);
free(ign);
i++;
}
ignore = NULL;
return i;
char *user, *host;
if (!nick)
return 0;
/* Determine whether we get a nick or a mask. */
if ((host = strchr(nick, '@'))) {
/* 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 {
@@ -258,7 +257,6 @@ int clear_ignores()
snprintf(tmp, sizeof(tmp), "*!%s", nick);
}
*/
} else {
+7 -3
View File
@@ -7,12 +7,16 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="21"
VERSION_EXTRA="-svn"
VERSION_BUILD="1439"
VERSION_PATCH="22"
VERSION_EXTRA=""
VERSION_BUILD="1440"
# $Log$
#
# BUILD : 1.7.22 (1440)
# BUGS :
# NOTES : Anope 1.7.22 release
#
# BUILD : 1.7.21 (1439)
# BUGS :
# NOTES : Fixed compiling on windows. We needed access to do_help_limited().