-class ModuleKnock : public Module
-{
- cmd_knock* mycommand;
- public:
- ModuleKnock(Server* Me)
- : Module::Module(Me)
- {
- Srv = Me;
- Srv->AddExtendedMode('K',MT_CHANNEL,false,0,0);
- mycommand = new cmd_knock();
- Srv->AddCommand(mycommand);
- }
-
- virtual void On005Numeric(std::string &output)
- {
- std::stringstream line(output);
- std::string temp1, temp2;
- while (!line.eof())
- {
- line >> temp1;
- if (temp1.substr(0,10) == "CHANMODES=")
- {
- // append the chanmode to the end
- temp1 = temp1.substr(10,temp1.length());
- temp1 = "CHANMODES=" + temp1 + "K";
- }
- temp2 = temp2 + temp1 + " ";
- }
- if (temp2.length())