Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

mode.h

Go to the documentation of this file.
00001 /*       +------------------------------------+
00002  *       | Inspire Internet Relay Chat Daemon |
00003  *       +------------------------------------+
00004  *
00005  *  Inspire is copyright (C) 2002-2005 ChatSpike-Dev.
00006  *                       E-mail:
00007  *                <brain@chatspike.net>
00008  *                <Craig@chatspike.net>
00009  *     
00010  * Written by Craig Edwards, Craig McLure, and others.
00011  * This program is free but copyrighted software; see
00012  *            the file COPYING for details.
00013  *
00014  * ---------------------------------------------------
00015  */
00016 
00017 #ifndef __MODE_H
00018 #define __MODE_H
00019 
00020 // include the common header files
00021 
00022 #include <typeinfo>
00023 #include <iostream>
00024 #include <string>
00025 #include <deque>
00026 #include <sstream>
00027 #include <vector>
00028 #include "users.h"
00029 #include "channels.h"
00030 #include "ctables.h"
00031 
00032 class ModeParser
00033 {
00034  private:
00035         char* GiveOps(userrec *user,char *dest,chanrec *chan,int status);
00036         char* GiveHops(userrec *user,char *dest,chanrec *chan,int status);
00037         char* GiveVoice(userrec *user,char *dest,chanrec *chan,int status);
00038         char* TakeOps(userrec *user,char *dest,chanrec *chan,int status);
00039         char* TakeHops(userrec *user,char *dest,chanrec *chan,int status);
00040         char* TakeVoice(userrec *user,char *dest,chanrec *chan,int status);
00041         char* AddBan(userrec *user,char *dest,chanrec *chan,int status);
00042         char* TakeBan(userrec *user,char *dest,chanrec *chan,int status);
00043  public:
00044         std::string CompressModes(std::string modes,bool channelmodes);
00045         void ProcessModes(char **parameters,userrec* user,chanrec *chan,int status, int pcnt, bool servermode, bool silent, bool local);
00046         bool AllowedUmode(char umode, char* sourcemodes,bool adding,bool serveroverride);
00047         bool ProcessModuleUmode(char umode, userrec* source, void* dest, bool adding);
00048         void ServerMode(char **parameters, int pcnt, userrec *user);
00049 };
00050 
00051 class cmd_mode : public command_t
00052 {
00053  public:
00054         cmd_mode () : command_t("MODE",0,1) { }
00055         void Handle(char **parameters, int pcnt, userrec *user);
00056 };
00057 
00058 #endif

Generated on Mon Dec 19 18:05:20 2005 for InspIRCd by  doxygen 1.4.4-20050815