diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands.cpp | 11 | ||||
-rw-r--r-- | src/mode.cpp | 4 | ||||
-rw-r--r-- | src/modules.cpp | 2 |
3 files changed, 14 insertions, 3 deletions
diff --git a/src/commands.cpp b/src/commands.cpp index 98a5809f6..fa51713d4 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -2212,9 +2212,14 @@ void handle_N(char token,char* params,serverrec* source,serverrec* reply, char* clientlist[nick]->idle_lastmsg = TIME; // this is unrealiable and wont actually be used locally for (int i = 0; i < MAXCHANS; i++) { - clientlist[nick]->chans[i].channel = NULL; - clientlist[nick]->chans[i].uc_modes = 0; - } + clientlist[nick]->chans[i].channel = NULL; + clientlist[nick]->chans[i].uc_modes = 0; + } + FOREACH_MOD OnGlobalConnect(clientlist[nick]); + if (strchr(clientlist[nick]->modes,'o')) + { + FOREACH_MOD OnGlobalOper(clientlist[nick]); + } } void handle_F(char token,char* params,serverrec* source,serverrec* reply, char* tcp_host) diff --git a/src/mode.cpp b/src/mode.cpp index aab5a403a..6f06027e4 100644 --- a/src/mode.cpp +++ b/src/mode.cpp @@ -1288,6 +1288,10 @@ void handle_mode(char **parameters, int pcnt, userrec *user) dmodes[strlen(dmodes)] = parameters[1][i]; outpars[strlen(outpars)+1]='\0'; outpars[strlen(outpars)] = parameters[1][i]; + if (parameters[1][i] == 'o') + { + FOREACH_MOD OnGlobalOper(dest); + } } } } diff --git a/src/modules.cpp b/src/modules.cpp index 83abb6e57..2f45ad0d0 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -406,6 +406,8 @@ int Module::OnMeshToken(char token,string_list params,serverrec* source,serverre void Module::OnEvent(Event* event) { return; }; char* Module::OnRequest(Request* request) { return NULL; }; int Module::OnOperCompare(std::string password, std::string input) { return 0; }; +void Module::OnGlobalOper(userrec* user) { }; +void Module::OnGlobalConnect(userrec* user) { }; // server is a wrapper class that provides methods to all of the C-style // exports in the core |