summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/helperfuncs.cpp12
-rw-r--r--src/mode.cpp6
-rwxr-xr-xsrc/svn-rev.sh2
3 files changed, 10 insertions, 10 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index a02d19702..7e9f72913 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1324,8 +1324,8 @@ void userlist(userrec *user,chanrec *c)
char list[MAXBUF];
size_t dlen = snprintf(list,MAXBUF,"353 %s = %s :", user->nick, c->name);
- int n = 0;
- char* ptr = list + dlen;
+ int numusers = 0;
+ char* ptr = list + dlen - 1;
CUList *ulist= c->GetUsers();
@@ -1351,7 +1351,7 @@ void userlist(userrec *user,chanrec *c)
for (char* t = i->second->nick; *t; t++)
*ptr++ = *t;
*ptr++ = ' ';
- n++;
+ numusers++;
if ((ptr - list) > (480-NICKMAX))
{
@@ -1359,14 +1359,14 @@ void userlist(userrec *user,chanrec *c)
*--ptr = 0;
WriteServ_NoFormat(user->fd,list);
dlen = snprintf(list,MAXBUF,"353 %s = %s :", user->nick, c->name);
- ptr = list + dlen;
- n = 0;
+ ptr = list + dlen - 1;
+ numusers = 0;
}
}
*--ptr = 0;
/* if whats left in the list isnt empty, send it */
- if (n)
+ if (numusers)
{
WriteServ_NoFormat(user->fd,list);
}
diff --git a/src/mode.cpp b/src/mode.cpp
index 418ad4eac..73315227a 100644
--- a/src/mode.cpp
+++ b/src/mode.cpp
@@ -1272,13 +1272,13 @@ void cmd_mode::Handle (char **parameters, int pcnt, userrec *user)
DeleteOper(dest);
break;
case 'i':
- dest->modebits ^= UM_INVISIBLE;
+ dest->modebits &= ~UM_INVISIBLE;
break;
case 's':
- dest->modebits ^= UM_SERVERNOTICE;
+ dest->modebits &= ~UM_SERVERNOTICE;
break;
case 'w':
- dest->modebits ^= UM_WALLOPS;
+ dest->modebits &= ~UM_WALLOPS;
break;
}
}
diff --git a/src/svn-rev.sh b/src/svn-rev.sh
index 380078739..61c8deda6 100755
--- a/src/svn-rev.sh
+++ b/src/svn-rev.sh
@@ -1 +1 @@
-echo 3586
+echo 3589