Contents Index Topic Contents | ||
Previous Topic: Methods Next Topic: ChangeChannelProperty Method |
BanMembers Method
Bans a member(s) and reinstates a member(s).
Syntax
object.BanMembers MemberItems, Set
Parameters
object Required. An object expression that evaluates to a Channel object. MemberItems Required. An object expression that evaluates to a ChatItems object. Specifies which members are to be banned or reinstated. The valid item names for constructing the MemberItems object are:
IPAddress IPAddressOp Nickname NicknameOp UserName UserNameOp Set Required. A Boolean variable. This parameter must be TRUE to ban the member from the channel, or FALSE to reinstate the member to the channel. Examples
1. Ban all the users with an IP address that ends with ".net":
Dim mi As ChatItems Set mi = New ChatItems mi.AssociatedType = "Query" mi.Item("IPAddressOp") = "EndsWith" mi.Item("IPAddress") = ".net" chan.BanMembers mi, True Set mi = Nothing2. Ban all the users with the username "ProutZ":
Dim mi As ChatItems Set mi = New ChatItems mi.AssociatedType = "Query" mi.Item("UserName") = "ProutZ" chan.BanMembers mi, True Set mi = Nothing3. Reinstate all the users with a username that contains "regis" and an IP address that starts with "ms":
Dim mi As ChatItems Set mi = New ChatItems mi.AssociatedType = "Query" mi.Item("UserNameOp") = "Contains" mi.Item("UserName") = "regis" mi.Item("IPAddressOp") = "StartsWith" mi.Item("IPAddress") = "ms" chan.BanMembers mi, False Set mi = NothingSee Also
Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.