diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-16 11:21:22 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-16 11:21:22 +0000 |
commit | ddb4ad9ce46b61583917d9a5db0f9fda9f00d65f (patch) | |
tree | 9b5cb0b7633561330e1bea94bef0de137cc169a6 /include/mode.h | |
parent | 4c49bf3b29c9f64afc0221cf8beb9da666424dca (diff) |
Moved mode stuff into modeparser
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2520 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/mode.h')
-rw-r--r-- | include/mode.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/include/mode.h b/include/mode.h index e63d9de6e..94d9666dd 100644 --- a/include/mode.h +++ b/include/mode.h @@ -28,21 +28,26 @@ #include "users.h" #include "channels.h" -char* give_ops(userrec *user,char *dest,chanrec *chan,int status); -char* give_hops(userrec *user,char *dest,chanrec *chan,int status); -char* give_voice(userrec *user,char *dest,chanrec *chan,int status); -char* take_ops(userrec *user,char *dest,chanrec *chan,int status); -char* take_hops(userrec *user,char *dest,chanrec *chan,int status); -char* take_voice(userrec *user,char *dest,chanrec *chan,int status); -char* add_ban(userrec *user,char *dest,chanrec *chan,int status); -char* take_ban(userrec *user,char *dest,chanrec *chan,int status); -void process_modes(char **parameters,userrec* user,chanrec *chan,int status, int pcnt, bool servermode, bool silent, bool local); -bool allowed_umode(char umode, char* sourcemodes,bool adding); -bool process_module_umode(char umode, userrec* source, void* dest, bool adding); +class ModeParser +{ + private: + char* GiveOps(userrec *user,char *dest,chanrec *chan,int status); + char* GiveHops(userrec *user,char *dest,chanrec *chan,int status); + char* GiveVoice(userrec *user,char *dest,chanrec *chan,int status); + char* TakeOps(userrec *user,char *dest,chanrec *chan,int status); + char* TakeHops(userrec *user,char *dest,chanrec *chan,int status); + char* TakeVoice(userrec *user,char *dest,chanrec *chan,int status); + char* AddBan(userrec *user,char *dest,chanrec *chan,int status); + char* TakeBan(userrec *user,char *dest,chanrec *chan,int status); + CompressModes(std::string modes,bool channelmodes); + public: + void ProcessModes(char **parameters,userrec* user,chanrec *chan,int status, int pcnt, bool servermode, bool silent, bool local); + bool AllowedUmode(char umode, char* sourcemodes,bool adding); + bool ProcessModuleUmode(char umode, userrec* source, void* dest, bool adding); + void ServerMode(char **parameters, int pcnt, userrec *user); +}; + void handle_mode(char **parameters, int pcnt, userrec *user); -void server_mode(char **parameters, int pcnt, userrec *user); -void merge_mode(char **parameters, int pcnt); -void merge_mode2(char **parameters, int pcnt, userrec* user); #endif |