diff options
-rw-r--r-- | src/InspIRCd.layout | 46 | ||||
-rw-r--r-- | src/inspircd.cpp | 11 | ||||
-rw-r--r-- | src/mode.cpp | 7 |
3 files changed, 40 insertions, 24 deletions
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index 90677110b..1c776b80e 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -1,5 +1,5 @@ [Editors] -Focused=-1 +Focused=42 Order=2,4,6,3,7,25,5,24,39,42,43,-1,1,46,0 [Editor_0] @@ -13,9 +13,9 @@ LeftChar=1 [Editor_1] Open=1 Top=0 -CursorCol=40 -CursorRow=2594 -TopLine=2549 +CursorCol=1 +CursorRow=91 +TopLine=53 LeftChar=1 [Editor_2] @@ -29,9 +29,9 @@ LeftChar=1 [Editor_3] Open=1 Top=0 -CursorCol=3 -CursorRow=81 -TopLine=19 +CursorCol=2 +CursorRow=82 +TopLine=28 LeftChar=1 [Editor_4] @@ -141,9 +141,9 @@ LeftChar=1 [Editor_17] Open=1 Top=0 -CursorCol=22 -CursorRow=117 -TopLine=99 +CursorCol=1 +CursorRow=2 +TopLine=1 LeftChar=1 [Editor_18] @@ -204,8 +204,8 @@ LeftChar=1 [Editor_25] Open=1 Top=0 -CursorCol=5 -CursorRow=38 +CursorCol=1 +CursorRow=23 TopLine=1 LeftChar=1 [Editor_26] @@ -322,17 +322,17 @@ TopLine=1 LeftChar=1 [Editor_42] Open=1 -Top=0 -CursorCol=15 -CursorRow=432 -TopLine=407 +Top=1 +CursorCol=10 +CursorRow=538 +TopLine=510 LeftChar=1 [Editor_43] Open=1 Top=0 -CursorCol=3 -CursorRow=176 -TopLine=142 +CursorCol=34 +CursorRow=1536 +TopLine=1498 LeftChar=1 [Editor_44] Open=1 @@ -353,7 +353,7 @@ Open=1 Top=0 CursorCol=13 CursorRow=154 -TopLine=128 +TopLine=1 LeftChar=1 [Editor_47] Open=1 @@ -364,8 +364,8 @@ TopLine=4 LeftChar=1 [Editor_48] Open=1 -Top=1 -CursorCol=60 -CursorRow=87 +Top=0 +CursorCol=11 +CursorRow=82 TopLine=53 LeftChar=1 diff --git a/src/inspircd.cpp b/src/inspircd.cpp index c7a7964da..6a8b85348 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -85,6 +85,10 @@ int NetBufferSize = 10240; // NetBufferSize used as the buffer size for all read extern int MaxWhoResults; time_t nb_start = 0; +bool AllowHalfop = true; +bool AllowProtect = true; +bool AllowFounder = true; + extern vector<Module*> modules; std::vector<std::string> module_names; extern vector<ircd_module*> factory; @@ -301,6 +305,7 @@ void readfile(file_cache &F, const char* fname) void ReadConfig(void) { char dbg[MAXBUF],pauseval[MAXBUF],Value[MAXBUF],timeout[MAXBUF],NB[MAXBUF],flood[MAXBUF],MW[MAXBUF]; + char AH[MAXBUF],AP[MAXBUF],AF[MAXBUF]; ConnectClass c; LoadConf(CONFIG_FILE,&config_f); @@ -321,8 +326,14 @@ void ReadConfig(void) ConfValue("options","loglevel",0,dbg,&config_f); ConfValue("options","netbuffersize",0,NB,&config_f); ConfValue("options","maxwho",0,MW,&config_f); + ConfValue("options","allowhalfop",0,AH,&config_f); + ConfValue("options","allowprotect",0,AP,&config_f); + ConfValue("options","allowfounder",0,AF,&config_f); NetBufferSize = atoi(NB); MaxWhoResults = atoi(MW); + AllowHalfop = ((!strcasecmp(AH,"true")) || (!strcasecmp(AH,"1")) || (!strcasecmp(AH,"yes"))); + AllowProtect = ((!strcasecmp(AP,"true")) || (!strcasecmp(AP,"1")) || (!strcasecmp(AP,"yes"))); + AllowFounder = ((!strcasecmp(AF,"true")) || (!strcasecmp(AF,"1")) || (!strcasecmp(AF,"yes"))); if ((!NetBufferSize) || (NetBufferSize > 65535) || (NetBufferSize < 1024)) { log(DEFAULT,"No NetBufferSize specified or size out of range, setting to default of 10240."); diff --git a/src/mode.cpp b/src/mode.cpp index be8d96b6c..c5f179f24 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -56,6 +56,11 @@ extern char list[MAXBUF]; extern char PrefixQuit[MAXBUF]; extern char DieValue[MAXBUF]; +extern bool AllowHalfop; +extern bool AllowProtect; +extern bool AllowFounder; + + char* give_ops(userrec *user,char *dest,chanrec *chan,int status) { userrec *d; @@ -530,7 +535,7 @@ void process_modes(char **parameters,userrec* user,chanrec *chan,int status, int break; case 'h': - if ((param >= pcnt)) break; + if (((param >= pcnt)) || (!AllowHalfop)) break; if (mdir == 1) { r = give_hops(user,parameters[param++],chan,status); |