Print this Page

BANNING Functions

Below is a listing of all the functions.

 

AddBanning

AddBanning

Adds a banning to the forum banned list of the global banned list. The returned value will be a 0 if there is no error. Otherwise the result will return the error number.

 

Return Type: Integer

 

Name

Type

Description

BanType

String

The types of banning you want to retrieve. Values are EM for e-mail banning, IP for IP banning, and UN for username banning.

ForumID

Integer

The ID of the forum that the user belongs to. Enter a 0 if you want to pull the values that are set globally.

BanString

String

The value that you want to ban.

BanReason

String

The reason for why you want to ban.

 

Examples

Visual Basic.Net

'Method AddBanning

Results = ftObj.AddBanning(BanType_Email, ForumID, "fusetalk.com", "Because they are always spamming the forums")

If Results <> 0 Then MsgBox("Error: " & Results)

 

Results = ftObj.AddBanning(BanType_IP, ForumID, "127.0.", "Another reason")

If Results <> 0 Then MsgBox("Error: " & Results)

 

Results = ftObj.AddBanning(BanType_UserName, ForumID, "AnyPartOfAUsername", "Yet another reason")

If Results <> 0 Then MsgBox("Error: " & Results)

 

C#

//Method AddBanning

Results = ftObj.AddBanning(BanType_Email, ForumID, "fusetalk.com", "Because they are always spamming the forums");

if (Results != 0)

{

interaction.MsgBox(Results.Tostring(), Microsoft.VisualBasic.MsgBoxStyle.Information,"My Title");

}

 

Results = ftObj.AddBanning(BanType_IP, ForumID, "127.0.", "Another reason");

if (Results != 0)

{

interaction.MsgBox("Error: " + Results, Microsoft.VisualBasic.MsgBoxStyle.Information,"My Title");

}

 

Results = ftObj.AddBanning(BanType_UserName, ForumID, "AnyPartOfAUsername", "Yet another reason");

if (Results != 0)

{

interaction.MsgBox("Error: " + Results, Microsoft.VisualBasic.MsgBoxStyle.Information,"My Title");

}

 

CheckEmailBan

CheckEmailBan

Check if an email address has been banned from the forumid that you have passed or from the global banned list. This method will return a list of banned email addresses that match your criteria. If the object returned is empty, the email is not banned.

 

Return Type: String()

 

Name

Type

Description

ForumID

Integer

The ID of the forum that the user belongs to. Enter a 0 if you want to pull the values that are set globally.

Emailaddress

String

The value you wish to determine the ban status of.

 

Examples

Visual Basic.Net

'Method CheckEmailBan

CheckResults = ftObj.CheckEmailBan(ForumID, "sales@fusetalk.com")

If Not CheckResults Is Nothing Then

    Dim ErrorCode As Integer = CheckResults(0)

    Dim BanReason As String = CheckResults(1)

    MsgBox(ErrorCode & ": " & banreason)

End If

 

C#

//Method CheckEmailBan

CheckResults = ftObj.CheckEmailBan(ForumID, "sales@fusetalk.com");

if (CheckResults != null)

{

string ErrorCode = CheckResults[0];

string BanReason = CheckResults[1];

interaction.MsgBox(ErrorCode + ": " + BanReason, 0, null);

}

 

CheckIPBan

CheckIPBan

Check if an IP address has been banned from the forumid that you have passed or from the global banned list. This method will return a list of banned IP addresses that match your criteria. If the object returned is empty, the IP Address is not banned.

 

Return Type: String()

 

Name

Type

Description

ForumID

Integer

The ID of the forum that the user belongs to. Enter a 0 if you want to pull the values that are set globally.

IPAddress

String

The value you wish to determine the ban status of.

 

Examples

Visual Basic.Net

'Method CheckIPBan

CheckResults = ftObj.CheckIPBan(ForumID, "127.0.0.1")

If Not CheckResults Is Nothing Then

    Dim ErrorCode As Integer = CheckResults(0)

    Dim BanReason As String = CheckResults(1)

    MsgBox(ErrorCode & ": " & banreason)

End If

 

C#

//Method CheckIPBan

CheckResults = ftObj.CheckIPBan(ForumID, "127.0.0.1");

if (CheckResults != null)

{

string ErrorCode = CheckResults[0];

string BanReason = CheckResults[1];

interaction.MsgBox(ErrorCode + ": " + BanReason, 0, null);

}

 

CheckUserBan

CheckUserBan

Check if a username has been banned from the forumid that you have passed or from the global banned list. This method will return a list of banned usernames that match your criteria. If the object returned is empty, the username is not banned.

 

Return Type: String()

 

Name

Type

Description

ForumID

Integer

The ID of the forum that the user belongs to. Enter a 0 if you want to pull the values that are set globally.

Username

String

The value you wish to determine the ban status of.

 

Examples

Visual Basic.Net

'Method CheckUserBan

CheckResults = ftObj.CheckUserBan(ForumID, "MyUserName")

If Not CheckResults Is Nothing Then

    Dim ErrorCode As Integer = CheckResults(0)

    Dim BanReason As String = CheckResults(1)

    MsgBox(ErrorCode & ": " & banreason)

End If

 

C#

//Method CheckUserBan

CheckResults = ftObj.CheckUserBan(ForumID, "MyUserName");

if (CheckResults != null)

{

string ErrorCode = CheckResults[0];

string BanReason = CheckResults[1];

interaction.MsgBox(ErrorCode + ": " + BanReason, 0, null);

}

 

DeleteBanByID

DeleteBanByID

Deletes a banning entry based on a ban ID.

 

Return Type: n/a

 

Name

Type

Description

BanID

Integer

The ID you want to delete.

ForumID

Integer

The ID of the forum the ban entry belongs to. Enter a 0 if the ban entry is global.

 

Examples

Visual Basic.Net

'Method GetBanByType

Dim BanItems() As Ban = ftObj.GetBanByType(BanType_UserName, ForumID)

If Not BanItems Is Nothing Then

    Dim tmpBan As Ban

    For Each tmpBan In BanItems

        MsgBox(tmpBan.BanID & ": " & tmpBan.BanReason)

        'Method UpdateBan

        ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID)

 

        'Methog GetBanByID

        Dim GetBan As Ban = ftObj.GetBanByID(tmpBan.BanID, ForumID)

        MsgBox(GetBan.BanID & ": " & GetBan.BanReason)

 

        'Method DeleteBanByID

        ftObj.DeleteBanByID(GetBan.BanID, ForumID)

    Next

End If

 

C#

//Method GetBanByType

FuseTalk.API.Ban[] BanItems = ftObj.GetBanByType(BanType_UserName, ForumID);

if (BanItems != null)

{

foreach (FuseTalk.API.Ban tmpBan in BanItems)

{

interaction.MsgBox(tmpBan.BanID + ": " + tmpBan.BanReason, 0, null);

//Method UpdateBan

ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID);

 

//Methog GetBanByID

FuseTalk.API.Ban GetBan = ftObj.GetBanByID(tmpBan.BanID, ForumID);

interaction.MsgBox(GetBan.BanID + ": " + GetBan.BanReason, 0, null);

 

//Method DeleteBanByID

ftObj.DeleteBanByID(GetBan.BanID, ForumID);

}

}

 

GetBanByID

GetBanByID

Each banned value has a numeric ID associated to it. This function returns the banned record that is associated with the ID.

 

Return Type:Ban

 

Name

Type

Description

BanID

Integer

The ID of the banned record you want to retrieve.

ForumID

Integer

The ID of the forum that the user belongs to. Enter a 0 if you want to pull the values that are set globally.

 

Examples

Visual Basic.Net

'Method GetBanByType

Dim BanItems() As Ban = ftObj.GetBanByType(BanType_UserName, ForumID)

If Not BanItems Is Nothing Then

    Dim tmpBan As Ban

    For Each tmpBan In BanItems

        MsgBox(tmpBan.BanID & ": " & tmpBan.BanReason)

        'Method UpdateBan

        ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID)

 

        'Method GetBanByID

        Dim GetBan As Ban = ftObj.GetBanByID(tmpBan.BanID, ForumID)

        MsgBox(GetBan.BanID & ": " & GetBan.BanReason)

 

        'Method DeleteBanByID

        ftObj.DeleteBanByID(GetBan.BanID, ForumID)

    Next

End If

 

C#

//Method GetBanByType

FuseTalk.API.Ban[] BanItems = ftObj.GetBanByType(BanType_UserName, ForumID);

if (BanItems != null)

{

foreach (FuseTalk.API.Ban tmpBan in BanItems)

{

interaction.MsgBox(tmpBan.BanID + ": " + tmpBan.BanReason, 0, null);

//Method UpdateBan

ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID);

 

//Methog GetBanByID

FuseTalk.API.Ban GetBan = ftObj.GetBanByID(tmpBan.BanID, ForumID);

interaction.MsgBox(GetBan.BanID + ": " + GetBan.BanReason, 0, null);

 

//Method DeleteBanByID

ftObj.DeleteBanByID(GetBan.BanID, ForumID);

}

}

 

Related Items

GetBanByKeyword, GetBanByType, GetPrivateBanning

 

GetBanByKeyword

GetBanByKeyword

Search a ban string based on a keyword.

 

Return Type:  Ban()

 

Name

Type

Description

BanType

String

Values are EM for e-mail banning, IP for IP banning, and UN for username banning.

Keyword

Integer

The keyword you wish to search.

ForumID

Integer

The forum the ban string your are searching belongs to. Enter a 0 if the ban entry is global.

 

Examples

Visual Basic.Net

'Method GetBanByKeyword

Dim BanSearch As Ban() = ftObj.GetBanByKeyword(BanType_Email, "fusetalk.com", ForumID)

If Not BanSearch Is Nothing Then

    Dim tmpBan As Ban

    For Each tmpBan In BanItems

        MsgBox(tmpBan.BanID & ": " & tmpBan.BanReason)

    Next

End If

 

C#

//Method GetBanByKeyword

FuseTalk.API.Ban[] BanSearch = ftObj.GetBanByKeyword(BanType_Email, "fusetalk.com", ForumID);

if (BanSearch != null)

{

foreach (FuseTalk.API.Ban tmpBan in BanItems)

{

interaction.MsgBox(tmpBan.BanID + ": " + tmpBan.BanReason, 0, null);

}

}

 

Related Items

GetBanByID, GetBanByType, GetPrivateBanning

 

GetBanByType

GetBanByType

Gets the values that are banned based on the type of banning.

 

Return Type:  Ban()

 

Name

Type

Description

BanType

String

Values are EM for e-mail banning, IP for IP banning, and UN for username banning.

ForumID

Integer

The ID of the forum that the user belongs to. Enter a 0 if you want to pull the values that are set globally.

 

Examples

Visual Basic.Net

'Method GetBanByType

Dim BanItems() As Ban = ftObj.GetBanByType(BanType_UserName, ForumID)

If Not BanItems Is Nothing Then

    Dim tmpBan As Ban

    For Each tmpBan In BanItems

        MsgBox(tmpBan.BanID & ": " & tmpBan.BanReason)

        'Method UpdateBan

        ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID)

 

        'Methog GetBanByID

        Dim GetBan As Ban = ftObj.GetBanByID(tmpBan.BanID, ForumID)

        MsgBox(GetBan.BanID & ": " & GetBan.BanReason)

 

        'Method DeleteBanByID

        ftObj.DeleteBanByID(GetBan.BanID, ForumID)

    Next

End If

 

C#

//Method GetBanByType

FuseTalk.API.Ban[] BanItems = ftObj.GetBanByType(BanType_UserName, ForumID);

if (BanItems != null)

{

foreach (FuseTalk.API.Ban tmpBan in BanItems)

{

interaction.MsgBox(tmpBan.BanID + ": " + tmpBan.BanReason, 0, null);

//Method UpdateBan

ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID);

 

//Methog GetBanByID

FuseTalk.API.Ban GetBan = ftObj.GetBanByID(tmpBan.BanID, ForumID);

interaction.MsgBox(GetBan.BanID + ": " + GetBan.BanReason, 0, null);

 

//Method DeleteBanByID

ftObj.DeleteBanByID(GetBan.BanID, ForumID);

}

}

 

Related Items

GetBanByKeyword, GetBanByID, GetPrivateBanning

 

UpdateBan

UpdateBan

Update a banned value from the banned table.

 

Return Type:  n/a

 

Name

Type

Description

BanID

Integer

The ID of the banned record you want to update.

BanString

String

The value that you want to ban.

BanReason

String

The reason for why you want to ban.

ForumID

Integer

The ID of the forum that the user belongs to. Enter a 0 if you want to pull the values that are set globally.

 

Examples

Visual Basic.Net

'Method GetBanByType

Dim BanItems() As Ban = ftObj.GetBanByType(BanType_UserName, ForumID)

If Not BanItems Is Nothing Then

    Dim tmpBan As Ban

    For Each tmpBan In BanItems

        MsgBox(tmpBan.BanID & ": " & tmpBan.BanReason)

        'Method UpdateBan

        ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID)

 

        'Methog GetBanByID

        Dim GetBan As Ban = ftObj.GetBanByID(tmpBan.BanID, ForumID)

        MsgBox(GetBan.BanID & ": " & GetBan.BanReason)

 

        'Method DeleteBanByID

        ftObj.DeleteBanByID(GetBan.BanID, ForumID)

    Next

End If

 

C#

//Method GetBanByType

FuseTalk.API.Ban[] BanItems = ftObj.GetBanByType(BanType_UserName, ForumID);

if (BanItems != null)

{

foreach (FuseTalk.API.Ban tmpBan in BanItems)

{

interaction.MsgBox(tmpBan.BanID + ": " + tmpBan.BanReason, 0, null);

//Method UpdateBan

ftObj.UpdateBan(tmpBan.BanID, "NewUserName", "NewReason", ForumID);

 

//Methog GetBanByID

FuseTalk.API.Ban GetBan = ftObj.GetBanByID(tmpBan.BanID, ForumID);

interaction.MsgBox(GetBan.BanID + ": " + GetBan.BanReason, 0, null);

 

//Method DeleteBanByID

ftObj.DeleteBanByID(GetBan.BanID, ForumID);

}

}