diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-03 13:04:48 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-05-03 13:04:48 +0000 |
commit | 0e74a337265b2e8384f75deab816ae92f532ff08 (patch) | |
tree | 3c15d6dab027ad2aa39cbddff219ab23bae879be /src | |
parent | 23303627e1c689b825445af20d682c886a800bb6 (diff) |
Added opertype propogation
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@788 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/InspIRCd.dev | 54 | ||||
-rw-r--r-- | src/InspIRCd.layout | 59 | ||||
-rw-r--r-- | src/commands.cpp | 18 | ||||
-rw-r--r-- | src/inspircd.cpp | 5 |
4 files changed, 88 insertions, 48 deletions
diff --git a/src/InspIRCd.dev b/src/InspIRCd.dev index 10bec5936..9a689ddd0 100644 --- a/src/InspIRCd.dev +++ b/src/InspIRCd.dev @@ -1,7 +1,7 @@ [Project] FileName=InspIRCd.dev Name=InspIRCd - The Inspire Internet Relay Chat Daemon -UnitCount=52 +UnitCount=53 Type=1 Ver=1 ObjFiles= @@ -19,7 +19,7 @@ ObjectOutput= OverrideOutput=0 OverrideOutputName=InspIRCd.exe HostApplication= -Folders=Headers,Modules,Source +Folders=Headers,Modules,Modules/Misc,Modules/Oper,Modules/Server,Modules/User,Source CommandLine= IncludeVersionInfo=0 SupportXPThemes=0 @@ -109,7 +109,7 @@ Priority=1000 [Unit9] FileName=modules\m_randquote.cpp -Folder=Modules +Folder=Modules/Server Compile=0 CompileCpp=1 OverrideBuildCmd=0 @@ -119,7 +119,7 @@ Priority=1000 [Unit10] FileName=modules\m_foobar.cpp -Folder=Modules +Folder=Modules/Misc Compile=0 CompileCpp=1 OverrideBuildCmd=0 @@ -129,7 +129,7 @@ Priority=1000 [Unit11] FileName=modules\m_cloaking.cpp -Folder=Modules +Folder=Modules/Server Compile=0 CompileCpp=1 OverrideBuildCmd=0 @@ -308,7 +308,7 @@ Priority=1000 [Unit27] FileName=modules\m_testcommand.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Misc Compile=1 Link=1 Priority=1000 @@ -318,7 +318,7 @@ BuildCmd= [Unit28] FileName=modules\m_globops.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -328,7 +328,7 @@ BuildCmd= [Unit29] FileName=modules\m_sapart.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -338,7 +338,7 @@ BuildCmd= [Unit30] FileName=modules\m_sanick.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -348,7 +348,7 @@ BuildCmd= [Unit31] FileName=modules\m_sajoin.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -358,7 +358,7 @@ BuildCmd= [Unit32] FileName=modules\m_samode.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -368,7 +368,7 @@ BuildCmd= [Unit35] FileName=modules\m_sethost.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -378,7 +378,7 @@ BuildCmd= [Unit36] FileName=modules\m_setname.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/User Compile=1 Link=1 Priority=1000 @@ -388,7 +388,7 @@ BuildCmd= [Unit37] FileName=modules\m_saquit.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -398,7 +398,7 @@ BuildCmd= [Unit38] FileName=modules\m_helpop.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/User Compile=1 Link=1 Priority=1000 @@ -408,7 +408,7 @@ BuildCmd= [Unit39] FileName=modules\m_antibottler.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Server Compile=1 Link=1 Priority=1000 @@ -428,7 +428,7 @@ BuildCmd= [Unit33] FileName=modules\m_filter.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Server Compile=1 Link=1 Priority=1000 @@ -438,7 +438,7 @@ BuildCmd= [Unit34] FileName=modules\m_chghost.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 @@ -518,7 +518,7 @@ BuildCmd= [Unit48] FileName=modules\m_services.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Server Compile=1 Link=1 Priority=1000 @@ -528,7 +528,7 @@ BuildCmd= [Unit49] FileName=modules\m_alias.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Server Compile=1 Link=1 Priority=1000 @@ -548,7 +548,7 @@ BuildCmd= [Unit51] FileName=modules\m_chanprotect.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Server Compile=1 Link=1 Priority=1000 @@ -558,7 +558,17 @@ BuildCmd= [Unit52] FileName=modules\m_override.cpp CompileCpp=1 -Folder=Modules +Folder=Modules/Oper +Compile=1 +Link=1 +Priority=1000 +OverrideBuildCmd=0 +BuildCmd= + +[Unit53] +FileName=modules\m_operchans.cpp +CompileCpp=1 +Folder=Modules/Oper Compile=1 Link=1 Priority=1000 diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index 478e0c375..54dd7032f 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -13,9 +13,9 @@ LeftChar=1 [Editor_1] Open=1 Top=0 -CursorCol=3 -CursorRow=1364 -TopLine=1345 +CursorCol=1 +CursorRow=175 +TopLine=165 LeftChar=1 [Editor_2] @@ -37,9 +37,9 @@ LeftChar=1 [Editor_4] Open=1 Top=0 -CursorCol=20 -CursorRow=639 -TopLine=626 +CursorCol=21 +CursorRow=441 +TopLine=407 LeftChar=1 [Editor_5] @@ -77,8 +77,8 @@ LeftChar=1 [Editor_9] Open=1 Top=0 -CursorCol=3 -CursorRow=66 +CursorCol=17 +CursorRow=65 TopLine=26 LeftChar=1 @@ -111,7 +111,7 @@ Open=1 Top=0 CursorCol=41 CursorRow=41 -TopLine=19 +TopLine=197 LeftChar=1 [Editor_14] @@ -181,9 +181,9 @@ LeftChar=1 [Editor_22] Open=1 Top=0 -CursorCol=1 -CursorRow=22 -TopLine=3 +CursorCol=35 +CursorRow=70 +TopLine=31 LeftChar=1 [Editor_23] @@ -199,7 +199,7 @@ Open=1 Top=0 CursorCol=5 CursorRow=351 -TopLine=321 +TopLine=1 LeftChar=1 [Editor_25] Open=1 @@ -210,7 +210,7 @@ TopLine=116 LeftChar=1 [Editor_26] Open=1 -Top=0 +Top=1 CursorCol=13 CursorRow=49 TopLine=32 @@ -323,16 +323,16 @@ LeftChar=1 [Editor_42] Open=1 Top=0 -CursorCol=1 -CursorRow=1032 -TopLine=1026 +CursorCol=10 +CursorRow=1261 +TopLine=1232 LeftChar=1 [Editor_43] Open=1 Top=0 CursorCol=1 -CursorRow=643 -TopLine=614 +CursorRow=1144 +TopLine=1092 LeftChar=1 [Editor_44] Open=1 @@ -379,14 +379,21 @@ LeftChar=1 [Editor_50] Open=1 Top=0 -CursorCol=35 -CursorRow=140 -TopLine=95 +CursorCol=1 +CursorRow=192 +TopLine=221 LeftChar=1 [Editor_51] Open=1 -Top=1 -CursorCol=1 -CursorRow=67 -TopLine=17 +Top=0 +CursorCol=4 +CursorRow=78 +TopLine=52 +LeftChar=1 +[Editor_52] +Open=1 +Top=0 +CursorCol=13 +CursorRow=37 +TopLine=7 LeftChar=1 diff --git a/src/commands.cpp b/src/commands.cpp index f43b06e86..c7b0bc6a1 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1401,6 +1401,8 @@ void handle_oper(char **parameters, int pcnt, userrec *user) if (!strcmp(TypeName,OperType)) { /* found this oper's opertype */ + snprintf(global,MAXBUF,"| %s %s",user->nick,TypeName); + NetSendToAll(global); ConfValue("type","host",j,Hostname,&config_f); ChangeDisplayedHost(user,Hostname); strncpy(user->oper,TypeName,NICKMAX); @@ -2230,6 +2232,17 @@ void handle_del_szline(char token,char* params,serverrec* source,serverrec* repl } } +void handle_pipe(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host) +{ + char* nick = strtok(params," "); + char* type = strtok(params," "); + userrec* u = Find(nick); + if (u) + { + strncpy(u->oper,type,NICKMAX); + } +} + void process_restricted_commands(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host,char* ipaddr,int port) { @@ -2410,6 +2423,11 @@ void process_restricted_commands(char token,char* params,serverrec* source,serve case ']': handle_del_szline(token,params,source,reply,tcp_host); break; + // | <nick> <opertype> + // set opertype + case '|': + handle_pipe(token,params,source,reply,tcp_host); + break; // F <TS> // end netburst case 'F': diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 4250bdc75..018bdf133 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -2953,6 +2953,11 @@ void DoSync(serverrec* serv, char* tcp_host) { snprintf(data,MAXBUF,"N %d %s %s %s %s +%s %s %s :%s",u->second->age,u->second->nick,u->second->host,u->second->dhost,u->second->ident,u->second->modes,u->second->ip,u->second->server,u->second->fullname); serv->SendPacket(data,tcp_host); + if (strchr(u->second->modes,'o')) + { + snprintf(data,MAXBUF,"| %s %s",u->second->nick,u->second->oper); + serv->SendPacket(data,tcp_host); + } for (int i = 0; i <= MODCOUNT; i++) { string_list l = modules[i]->OnUserSync(u->second); |