summaryrefslogtreecommitdiff
path: root/src/cmd_ison.cpp
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 00:29:20 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-09 00:29:20 +0000
commit6b43da7511ca875b64e58b84f72dd89485c0e7fd (patch)
tree2a05f782577be7039b487bd26512fd9f28fb915a /src/cmd_ison.cpp
parent9c65ad17c7a86f9ddeb688b3eb6368b4d79ab85a (diff)
More cleanup
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3571 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_ison.cpp')
-rw-r--r--src/cmd_ison.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/cmd_ison.cpp b/src/cmd_ison.cpp
index 8d0c239cc..e7256b2a2 100644
--- a/src/cmd_ison.cpp
+++ b/src/cmd_ison.cpp
@@ -36,18 +36,23 @@ using namespace std;
void cmd_ison::Handle (char **parameters, int pcnt, userrec *user)
{
- char Return[MAXBUF];
- snprintf(Return,MAXBUF,"303 %s :",user->nick);
+ char retbuf[MAXBUF];
+ userrec *u;
+
+ snprintf(retbuf, MAXBUF, "303 %s :", user->nick);
+
for (int i = 0; i < pcnt; i++)
{
- userrec *u = Find(parameters[i]);
+ u = Find(parameters[i]);
+
if (u)
{
- strlcat(Return,u->nick,MAXBUF);
- charlcat(Return,' ',MAXBUF);
+ strlcat(retbuf, u->nick, MAXBUF);
+ charlcat(retbuf, ' ', MAXBUF);
}
}
- WriteServ(user->fd,Return);
+
+ WriteServ(user->fd, retbuf);
}