X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=d2f01297781c3ef270e9262ece46abd3e7dff679;hb=deb5dd0dd3b9aeacc544080569c57dacb6cad9de;hp=ca3c2e423e9adc37909f62ca668aa931426c0f4d;hpb=4f78f5157f2a1db67628a922b0320f3162c12d87;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index ca3c2e423..d2f012977 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -14,6 +14,7 @@ #include "wildcard.h" #include "mode.h" #include "message.h" +#include "commands.h" // class type for holding an extended mode character - internal to core @@ -116,7 +117,7 @@ void Module::OnUserPart(userrec* user, chanrec* channel) { } void Module::OnPacketTransmit(char *p) { } void Module::OnPacketReceive(char *p) { } void Module::OnRehash() { } -void Module::OnServerRaw(std::string &raw, bool inbound) { } +void Module::OnServerRaw(std::string &raw, bool inbound, userrec* user) { } int Module::OnUserPreJoin(userrec* user, chanrec* chan, const char* cname) { return 0; } bool Module::OnExtendedMode(userrec* user, void* target, char modechar, int type, bool mode_on, string_list ¶ms) { return false; } Version Module::GetVersion() { return Version(1,0,0,0); } @@ -125,6 +126,7 @@ void Module::OnInfo(userrec* user) { }; void Module::OnWhois(userrec* source, userrec* dest) { }; int Module::OnUserPreMessage(userrec* user,void* dest,int target_type, std::string text) { return 0; }; int Module::OnUserPreNotice(userrec* user,void* dest,int target_type, std::string text) { return 0; }; +int Module::OnUserPreNick(userrec* user, std::string newnick) { return 0; }; // server is a wrapper class that provides methods to all of the C-style // exports in the core @@ -177,6 +179,11 @@ void Server::QuitUser(userrec* user, std::string reason) kill_link(user,reason.c_str()); } +bool Server::IsUlined(std::string server) +{ + return is_uline(server.c_str()); +} + void Server::CallCommandHandler(std::string commandname, char** parameters, int pcnt, userrec* user) { call_handler(commandname.c_str(),parameters,pcnt,user); @@ -355,14 +362,12 @@ ConfigReader::ConfigReader(std::string filename) std::string ConfigReader::ReadValue(std::string tag, std::string name, int index) { - log(DEBUG,"ConfigReader::ReadValue '%s' '%s' %d",tag.c_str(),name.c_str(),index); char val[MAXBUF]; char t[MAXBUF]; char n[MAXBUF]; strncpy(t,tag.c_str(),MAXBUF); strncpy(n,name.c_str(),MAXBUF); ReadConf(cache,t,n,index,val); - log(DEBUG,"ConfigReader::ReadValue read '%s'",val); return std::string(val); }