Method: Jabber::MUC::SimpleMUCClient#kick
- Defined in:
- lib/xmpp4r/muc/helper/simplemucclient.rb
#kick(recipients, reason) ⇒ Object
Administratively remove one or more users from the room.
Will wait for response, possibly raising ServerError
Sample usage:
my_muc.kick 'pistol', 'Avaunt, you cullion!'
my_muc.kick(['Bill', 'Linus'], 'Stop flaming')
- recipients
- Array
-
of, or single [String]: Nicks
- reason
- String
-
Kick reason
177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/xmpp4r/muc/helper/simplemucclient.rb', line 177 def kick(recipients, reason) recipients = [recipients] unless recipients.kind_of? Array items = recipients.collect { |recipient| item = IqQueryMUCAdminItem.new item.nick = recipient item.role = :none item.reason = reason item } send_affiliations(items) end |