changed Makefile; build all commands as an own file
[NeonServV5.git] / cmd_neonserv_inviteme.c
1
2 #include "cmd_neonserv.h"
3
4 /*
5 * no arguments
6 */
7
8 CMD_BIND(neonserv_cmd_inviteme) {
9     if(getChanUser(user, chan)) {
10         reply(getTextBot(), user, "NS_INVITEME_ON_CHAN", chan->name);
11         /* BUG
12          This check does not work if the user is invisible (CHMODE +D/+d)
13          to fix this we'd need to request the full userlist...
14          this is really senseless to invite a simple user so we simply mark this bug as unsolvable.
15         */
16         return;
17     }
18     putsock(client, "INVITE %s %s", user->nick, chan->name);
19     reply(getTextBot(), user, "NS_INVITEME_DONE", chan->name);
20 }