summaryrefslogtreecommitdiff
path: root/src/cmd_ison.cpp
diff options
context:
space:
mode:
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);
}