* @param regex Pattern to match with
* @
*/
- RLine(InspIRCd* Instance, time_t s_time, long d, const char* src, const char* re, const char* regexs) : XLine(Instance, s_time, d, src, re, "R")
+ RLine(InspIRCd* Instance, time_t s_time, long d, std::string src, std::string re, std::string regexs)
+ : XLine(Instance, s_time, d, src, re, "R")
{
matchtext = regexs;
void DisplayExpiry()
{
- ServerInstance->SNO->WriteToSnoMask('x',"Removing expired R-Line %s (set by %s %ld seconds ago)", this->matchtext.c_str(), this->source, (long int)(ServerInstance->Time() - this->set_time));
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired R-Line %s (set by %s %ld seconds ago)",
+ this->matchtext.c_str(), this->source.c_str(), (long int)(ServerInstance->Time() - this->set_time));
}
const char* Displayable()
/** Generate a RLine
*/
- XLine* Generate(time_t set_time, long duration, const char* source, const char* reason, const char* xline_specific_mask)
+ XLine* Generate(time_t set_time, long duration, std::string source, std::string reason, std::string xline_specific_mask)
{
return new RLine(ServerInstance, set_time, duration, source, reason, xline_specific_mask);
}
std::string rxengine;
public:
- CommandRLine (InspIRCd* Instance) : Command(Instance,"RLINE", "o", 1, 3)
+ CommandRLine (InspIRCd* Instance, Module* Creator) : Command(Instance, Creator,"RLINE", "o", 1, 3)
{
- this->source = "m_rline.so";
this->syntax = "<regex> [<rline-duration>] :<reason>";
}
return CMD_SUCCESS;
}
+
+ RouteDescriptor GetRouting(User* user, const std::vector<std::string>& parameters)
+ {
+ return ROUTE_BROADCAST;
+ }
};
class ModuleRLine : public Module
std::string RegexEngine;
public:
- ModuleRLine(InspIRCd* Me) : Module(Me), r(Me), f(Me)
+ ModuleRLine(InspIRCd* Me) : Module(Me), r(Me, this), f(Me)
{
mymodule = this;
OnRehash(NULL);
}
}
- virtual int OnStats(char symbol, User* user, string_list &results)
+ virtual ModResult OnStats(char symbol, User* user, string_list &results)
{
if (symbol != 'R')
- return 0;
+ return MOD_RES_PASSTHRU;
ServerInstance->XLines->InvokeStats("R", 223, user, results);
- return 1;
+ return MOD_RES_DENY;
}
virtual void OnLoadModule(Module* mod, const std::string& name)