X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules.cpp;h=1bed5bd183996d3cdeab9e667c7fe281dbac9017;hb=406ab09f22f46a6cee5559e96f0325768188ffa4;hp=1fa2300c8df62ab6636069e3f79db6940faccd28;hpb=f6e9222205dcc2c44f3aca7dfca85a324358b837;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules.cpp b/src/modules.cpp index 1fa2300c8..1bed5bd18 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -331,6 +331,7 @@ void Module::On005Numeric(std::string &output) { }; int Module::OnKill(userrec* source, userrec* dest, std::string reason) { return 0; }; void Module::OnLoadModule(Module* mod,std::string name) { }; void Module::OnBackgroundTimer(time_t curtime) { }; +void Module::OnSendList(userrec* user, chanrec* channel, char mode) { }; // server is a wrapper class that provides methods to all of the C-style // exports in the core @@ -615,6 +616,62 @@ bool Server::PseudoToUser(userrec* alive,userrec* zombie,std::string message) } +void Server::AddGLine(long duration, std::string source, std::string reason, std::string hostmask) +{ + add_gline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +} + +void Server::AddQLine(long duration, std::string source, std::string reason, std::string nickname) +{ + add_qline(duration, source.c_str(), reason.c_str(), nickname.c_str()); +} + +void Server::AddZLine(long duration, std::string source, std::string reason, std::string ipaddr) +{ + add_zline(duration, source.c_str(), reason.c_str(), ipaddr.c_str()); +} + +void Server::AddKLine(long duration, std::string source, std::string reason, std::string hostmask) +{ + add_kline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +} + +void Server::AddELine(long duration, std::string source, std::string reason, std::string hostmask) +{ + add_eline(duration, source.c_str(), reason.c_str(), hostmask.c_str()); +} + +bool Server::DelGLine(std::string hostmask) +{ + del_gline(hostmask.c_str()); +} + +bool Server::DelQLine(std::string nickname) +{ + del_qline(nickname.c_str()); +} + +bool Server::DelZLine(std::string ipaddr) +{ + del_zline(ipaddr.c_str()); +} + +bool Server::DelKLine(std::string hostmask) +{ + del_kline(hostmask.c_str()); +} + +bool Server::DelELine(std::string hostmask) +{ + del_eline(hostmask.c_str()); +} + +long Server::CalcDuration(std::string delta) +{ + return duration(delta.c_str()); +} + + ConfigReader::ConfigReader() { this->cache = new std::stringstream(std::stringstream::in | std::stringstream::out);