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

BUILD : 1.7.2 (68) BUGS : 20 NOTES : Fixed ALIST bug when being invoked by systems admins

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


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@44 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
atoledo atoledo@31f1291d-b8d6-0310-a050-a5561fc1590b
2004-04-22 16:31:44 +00:00
parent a46d156b01
commit 35932944ba
3 changed files with 29 additions and 11 deletions
+1
View File
@@ -1,6 +1,7 @@
Anope Version 1.7.x (will be renamed when next release is produced)
-------------------
Provided by Anope Dev. <dev@anope.org>
2004/04/22 Fixed ALIST bug when being invoked by systems admins (Bug #20)
2004/04/19 Added /bin/anoperc anope console control script
Anope Version 1.7.2
+23 -10
View File
@@ -3581,23 +3581,36 @@ static int do_glist(User * u)
*/
static int do_alist(User * u)
{
char *lev = strtok(NULL, " ");
char *nick = NULL;
char *lev = NULL;
NickAlias *na;
int min_level = 0;
int is_servadmin = is_services_admin(u);
/* Services admins can request ALIST on nicks.
* Check if 'lev' (first token) is actually a nick
* and, if so, reassign pointers.
*/
if (is_servadmin && lev && (na = findnick(lev))) {
lev = strtok(NULL, " ");
} else {
if (!is_servadmin) {
/* Non service admins can only see their own levels */
na = u->na;
} else {
/* Services admins can request ALIST on nicks.
* The first argument for service admins must
* always be a nickname.
*/
nick = strtok(NULL, " ");
/* If an argument was passed, use it as the nick to see levels
* for, else check levels for the user calling the command */
if (nick) {
na = findnick(nick);
} else {
na = u->na;
}
}
/* If available, get level from arguments */
lev = strtok(NULL, " ");
/* if a level was given, make sure it's an int for later */
if (lev) {
if (stricmp(lev, "FOUNDER") == 0) {
@@ -3619,8 +3632,8 @@ static int do_alist(User * u)
if (!nick_identified(u)) {
notice_lang(s_NickServ, u, ACCESS_DENIED);
} else if (lev && !na) {
notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, na->nick);
} else if (is_servadmin && nick && !na) {
notice_lang(s_NickServ, u, NICK_X_NOT_REGISTERED, nick);
} else if (na->status & NS_VERBOTEN) {
notice_lang(s_NickServ, u, NICK_X_FORBIDDEN, na->nick);
} else {
+5 -1
View File
@@ -8,11 +8,15 @@
VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="2"
VERSION_BUILD="67"
VERSION_BUILD="68"
VERSION_EXTRA=""
# $Log$
#
# BUILD : 1.7.2 (68)
# BUGS : 20
# NOTES : Fixed ALIST bug when being invoked by systems admins
#
# BUILD : 1.7.2 (67)
# BUGS : N/A
# NOTES : Bumped Changes file verisons ready for new updates