extern std::vector<userrec*> all_opers;
extern user_hash clientlist;
extern chan_hash chanlist;
-extern Module* IOHookModule;
void log(int level,char *text, ...)
{
chop(tb);
if (fd_ref_table[sock])
{
- if (IOHookModule)
+ if (Config->GetIOHook(fd_ref_table[sock]->port))
{
- IOHookModule->OnRawSocketWrite(sock,tb,bytes);
+ Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes);
}
else
{
chop(tb);
if (fd_ref_table[sock])
{
- if (IOHookModule)
+ if (Config->GetIOHook(fd_ref_table[sock]->port))
{
- IOHookModule->OnRawSocketWrite(sock,tb,bytes);
+ Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes);
}
else
{
chop(tb);
if (fd_ref_table[sock])
{
- if (IOHookModule)
+ if (Config->GetIOHook(fd_ref_table[sock]->port))
{
- IOHookModule->OnRawSocketWrite(sock,tb,bytes);
+ Config->GetIOHook(fd_ref_table[sock]->port)->OnRawSocketWrite(sock,tb,bytes);
}
else
{
{
for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
{
- if ((i->type == CC_ALLOW) && match(user->host,i->host))
+ if ((i->type == CC_ALLOW) && match(user->host,i->host.c_str()))
{
- return i->pass;
+ return (char*)i->pass.c_str();
}
}
return "";
{
for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
{
- if ((i->type == CC_DENY) && match(user->host,i->host))
+ if ((i->type == CC_DENY) && match(user->host,i->host.c_str()))
{
return true;
}
snprintf(mbuf,MAXBUF,":%s 376 %s :End of message of the day.\r\n", Config->ServerName, user->nick);
WholeMOTD = WholeMOTD + mbuf;
// only one write operation
- if (IOHookModule)
+ if (Config->GetIOHook(user->port))
{
- IOHookModule->OnRawSocketWrite(user->fd,(char*)WholeMOTD.c_str(),WholeMOTD.length());
+ Config->GetIOHook(user->port)->OnRawSocketWrite(user->fd,(char*)WholeMOTD.c_str(),WholeMOTD.length());
}
else
{