]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_ison.cpp
Put some client quit stuff in cmd_quit into the Qq snomasks properly
[user/henk/code/inspircd.git] / src / cmd_ison.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
6  *                       E-mail:
7  *                <brain@chatspike.net>
8  *                <Craig@chatspike.net>
9  *
10  * Written by Craig Edwards, Craig McLure, and others.
11  * This program is free but copyrighted software; see
12  *            the file COPYING for details.
13  *
14  * ---------------------------------------------------
15  */
16
17 #include "users.h"
18 #include "inspircd.h"
19 #include "commands/cmd_ison.h"
20
21 void cmd_ison::Handle (const char** parameters, int pcnt, userrec *user)
22 {
23         char retbuf[MAXBUF];
24         userrec *u;
25
26         snprintf(retbuf, MAXBUF, "303 %s :", user->nick);
27
28         for (int i = 0; i < pcnt; i++)
29         {
30                 u = ServerInstance->FindNick(parameters[i]);
31
32                 if (u)
33                 {
34                         strlcat(retbuf, u->nick, MAXBUF);
35                         charlcat(retbuf, ' ', MAXBUF);
36                 }
37         }
38
39         user->WriteServ( retbuf);
40 }