Hello, Im updated to Inspircd 3 and I have two modules that do not work in Inspircd 3. It would be nice if some developer could ported them. I have tried but the classes have changed and I do not know them.
ModuleConnJoinIdent
#include "inspircd.h"
class ModuleConnJoinIdent : public Module
{
typedef std::vector<std::pair<std::string, std::string> > IdentChanList;
IdentChanList chans;
public:
void init()
{
Implementation eventlist[] = { I_OnRehash, I_OnPostConnect };
ServerInstance->Modules->Attach(eventlist, this, sizeof(eventlist)/sizeof(Implementation));
OnRehash(NULL);
}
void OnRehash(User* user)
{
chans.clear();
ConfigTagList tags = ServerInstance->Config->ConfTags("autojoinident");
for (ConfigIter i = tags.first; i != tags.second; ++i)
{
ConfigTag* tag = i->second;
chans.push_back(std::make_pair(tag->getString("ident"), tag->getString("chan")));
}
}
void OnPostConnect(User* user)
{
if (!IS_LOCAL(user))
return;
for (IdentChanList::const_iterator i = chans.begin(); i != chans.end(); ++i)
{
if (!InspIRCd::Match(user->ident, i->first))
continue;
const std::string& channame = i->second;
if (ServerInstance->IsChannel(channame.c_str(), ServerInstance->Config->Limits.ChanMax))
Channel::JoinUser(user, channame.c_str(), false, "", false);
}
}
Version GetVersion()
{
return Version("Autojoins users based on their ident");
}
};
MODULE_INIT(ModuleConnJoinIdent)
Hello, Im updated to Inspircd 3 and I have two modules that do not work in Inspircd 3. It would be nice if some developer could ported them. I have tried but the classes have changed and I do not know them.
ModuleConnJoinIdent
ModuleConnJoinGeoIP
<autojoingeoip country="RU" chan="#rusia">
Thanks!