summaryrefslogtreecommitdiff
path: root/include/mode.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/mode.h')
-rw-r--r--include/mode.h33
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