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/commands.cpp | |
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/commands.cpp')
-rw-r--r-- | src/commands.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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': |