diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/InspIRCd.layout | 32 | ||||
-rw-r--r-- | src/inspircd.cpp | 49 | ||||
-rw-r--r-- | src/modules.cpp | 2 |
3 files changed, 59 insertions, 24 deletions
diff --git a/src/InspIRCd.layout b/src/InspIRCd.layout index b2fd8089a..d4d4bbaec 100644 --- a/src/InspIRCd.layout +++ b/src/InspIRCd.layout @@ -1,5 +1,5 @@ [Editors] -Focused=24 +Focused=-1 Order=1,2,-1,4,6,3,7,25,5,24 [Editor_0] @@ -13,9 +13,9 @@ LeftChar=1 [Editor_1] Open=1 Top=0 -CursorCol=17 -CursorRow=6600 -TopLine=6573 +CursorCol=6 +CursorRow=952 +TopLine=952 LeftChar=1 [Editor_2] @@ -37,9 +37,9 @@ LeftChar=1 [Editor_4] Open=1 Top=0 -CursorCol=57 -CursorRow=180 -TopLine=145 +CursorCol=26 +CursorRow=258 +TopLine=204 LeftChar=1 [Editor_5] @@ -132,17 +132,17 @@ LeftChar=1 [Editor_16] Open=1 -Top=0 -CursorCol=34 -CursorRow=29 +Top=1 +CursorCol=6 +CursorRow=32 TopLine=1 LeftChar=1 [Editor_17] Open=1 Top=0 -CursorCol=25 -CursorRow=115 +CursorCol=6 +CursorRow=94 TopLine=62 LeftChar=1 @@ -196,10 +196,10 @@ LeftChar=1 [Editor_24] Open=1 -Top=1 -CursorCol=1 -CursorRow=220 -TopLine=212 +Top=0 +CursorCol=13 +CursorRow=83 +TopLine=56 LeftChar=1 [Editor_25] Open=1 diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 607c79b83..bd0198e5f 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -949,7 +949,7 @@ void WriteMode(const char* modes, int flags, const char* text, ...) } } -void WriteWallOps(userrec *source, char* text, ...) +void WriteWallOps(userrec *source, bool local_only, char* text, ...) { if ((!text) || (!source)) { @@ -969,11 +969,28 @@ void WriteWallOps(userrec *source, char* text, ...) if (i->second) { if (strchr(i->second->modes,'w')) - { + { WriteTo(source,i->second,"WALLOPS %s",textbuffer); } } } + + if (!local_only) + { + char buffer[MAXBUF]; + snprintf(buffer,MAXBUF,"@ %s :%s",source->nick,textbuffer); + for (int j = 0; j < 255; j++) + { + if (servers[j] != NULL) + { + if (strcmp(servers[j]->name,ServerName)) + { + me[defaultRoute]->SendPacket(buffer,servers[j]->internal_addr,servers[j]->internal_port,MyKey); + log(DEBUG,"Sent @ token"); + } + } + } + } } /* convert a string to lowercase. Note following special circumstances @@ -3914,7 +3931,7 @@ void handle_kill(char **parameters, int pcnt, userrec *user) if (strcmp(ServerName,u->server)) { // remote kill - WriteOpers("*** Remote kill: %s!%s@%s (%s)",user->nick,u->nick,u->ident,u->host,parameters[1]); + WriteOpers("*** Remote kill by %s: %s!%s@%s (%s)",user->nick,u->nick,u->ident,u->host,parameters[1]); sprintf(killreason,"[%s] Killed (%s (%s))",ServerName,user->nick,parameters[1]); WriteCommonExcept(u,"QUIT :%s",killreason); // K token must go to ALL servers!!! @@ -4869,7 +4886,7 @@ void handle_who(char **parameters, int pcnt, userrec *user) void handle_wallops(char **parameters, int pcnt, userrec *user) { - WriteWallOps(user,"%s",parameters[0]); + WriteWallOps(user,false,"%s",parameters[0]); } void handle_list(char **parameters, int pcnt, userrec *user) @@ -6280,9 +6297,9 @@ void handle_K(char token,char* params,serverrec* source,serverrec* reply, char* if ((user) && (u)) { - WriteTo(user, u, "KILL %s :%s!%s!%s!%s (%s)", u->nick, ServerName, reply->name, user->dhost,user->nick,reason); + WriteTo(user, u, "KILL %s :%s!%s!%s!%s (%s)", u->nick, source->name, ServerName, user->dhost,user->nick,reason); WriteOpers("*** Remote kill from %s by %s: %s!%s@%s (%s)",source->name,user->nick,u->nick,u->ident,u->host,reason); - snprintf(kreason,MAXBUF,"[%s] Killed (%s (%s))",reply->name,user->nick,reason); + snprintf(kreason,MAXBUF,"[%s] Killed (%s (%s))",source->name,user->nick,reason); kill_link(u,kreason); } } @@ -6355,6 +6372,19 @@ void handle_k(char token,char* params,serverrec* source,serverrec* reply, char* } } +void handle_AT(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,int udp_port) +{ + char* who = strtok(params," :"); + char* text = strtok(NULL,"\r\n"); + text++; + userrec* s = Find(who); + if (s) + { + WriteWallOps(s,true,text); + } +} + + void handle_N(char token,char* params,serverrec* source,serverrec* reply, char* udp_host,int udp_port) { char* tm = strtok(params," "); @@ -6555,11 +6585,16 @@ void process_restricted_commands(char token,char* params,serverrec* source,serve case 'Q': handle_Q(token,params,source,reply,udp_host,udp_port); break; - // K <SOURCE> :<REASON> + // K <SOURCE> <DEST> :<REASON> // remote kill case 'K': handle_K(token,params,source,reply,udp_host,udp_port); break; + // @ <SOURCE> :<TEXT> + // wallops + case '@': + handle_AT(token,params,source,reply,udp_host,udp_port); + break; // F <TS> // end netburst case 'F': diff --git a/src/modules.cpp b/src/modules.cpp index 548f6fdcb..1ff2f3f9d 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -255,7 +255,7 @@ void Server::SendCommon(userrec* User, std::string text,bool IncludeSender) void Server::SendWallops(userrec* User, std::string text) { - WriteWallOps(User,"%s",text.c_str()); + WriteWallOps(User,false,"%s",text.c_str()); } bool Server::IsNick(std::string nick) |