]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/cmd_join.cpp
Renamed to chanrec::modes
[user/henk/code/inspircd.git] / src / cmd_join.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 using namespace std;
18
19 #include "inspircd_config.h"
20 #include "inspircd.h"
21 #include "inspircd_io.h"
22 #include <time.h>
23 #include <string>
24 #ifdef GCC3
25 #include <ext/hash_map>
26 #else
27 #include <hash_map>
28 #endif
29 #include <map>
30 #include <sstream>
31 #include <vector>
32 #include <deque>
33 #include "users.h"
34 #include "ctables.h"
35 #include "globals.h"
36 #include "message.h"
37 #include "commands.h"
38 #include "inspstring.h"
39 #include "helperfuncs.h"
40 #include "hashcomp.h"
41 #include "typedefs.h"
42 #include "command_parse.h"
43 #include "cmd_join.h"
44
45 extern InspIRCd* ServerInstance;
46
47 void cmd_join::Handle (char **parameters, int pcnt, userrec *user)
48 {
49         if (ServerInstance->Parser->LoopCall(this, parameters, pcnt, user, 0, 0, 1))
50                 return;
51
52         if (IsValidChannelName(parameters[0]))
53         {
54                 add_channel(user, parameters[0], parameters[1], false);
55         }
56         else
57         {
58                 WriteServ(user->fd,"403 %s %s :Invalid channel name",user->nick, parameters[0]);
59         }
60 }
61
62
63