Commit 85bf8568 authored by rswindell's avatar rswindell
Browse files

Added hostname to filter_ip() prototype.

parent 5d634f09
......@@ -41,6 +41,7 @@
#include <stdio.h> // sprintf
#include <winsock.h> // closesocket
#include "ClientFormUnit.h"
#include "sbbs.h" // filter_ip
void socket_open(BOOL open);
//---------------------------------------------------------------------------
......@@ -118,6 +119,7 @@ void __fastcall TClientForm::FilterIpMenuItemClick(TObject *Sender)
AnsiString prot = ListItem->SubItems->Strings[0];
AnsiString username = ListItem->SubItems->Strings[1];
AnsiString ip_addr = ListItem->SubItems->Strings[2];
AnsiString hostname = ListItem->SubItems->Strings[3];
wsprintf(str,"Disallow future connections from %s"
,ip_addr);
......@@ -126,7 +128,8 @@ void __fastcall TClientForm::FilterIpMenuItemClick(TObject *Sender)
if(res==IDCANCEL)
break;
if(res==IDYES)
MainForm->FilterIP(ip_addr.c_str(),prot.c_str(),username.c_str());
filter_ip(&MainForm->cfg,prot.c_str(),"abuse",hostname.c_str()
,ip_addr.c_str(),username.c_str());
if(ListView->Selected == NULL)
break;
ListItem=ListView->GetNextItem(ListItem,sdAll,State);
......
......@@ -2981,12 +2981,6 @@ void __fastcall TMainForm::TelnetRecycleExecute(TObject *Sender)
TelnetRecycle->Enabled=false;
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::FilterIP(char* ip_addr
,char* prot, char* username)
{
filter_ip(&cfg,prot,"abuse",ip_addr,username);
}
//---------------------------------------------------------------------------
void __fastcall TMainForm::FileEditTextFilesClick(TObject *Sender)
{
......
......@@ -386,8 +386,6 @@ public: // User declarations
void __fastcall WriteColor(TRegistry*, AnsiString, TColor);
void __fastcall ReadFont(AnsiString, TFont*);
void __fastcall WriteFont(AnsiString, TFont*);
void __fastcall FilterIP(char* ip_addr
,char* prot, char* username);
};
//---------------------------------------------------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment