Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

Commit

Permalink
Add Channel#remove, supporting the REMOVE command
Browse files Browse the repository at this point in the history
Closes gh-102
  • Loading branch information
dominikh committed Mar 17, 2014
1 parent f646988 commit ebc55c2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions lib/cinch/channel.rb
Expand Up @@ -332,6 +332,21 @@ def kick(user, reason = nil)
@bot.irc.send("KICK #@name #{user} :#{reason}")
end

# Removes a user from the channel.
#
# This uses the REMOVE command, which is a non-standardized
# extension. Unlike a kick, it makes a user part. This prevents
# auto-rejoin scripts from firing and might also be perceived as
# less aggressive by some. Not all IRC networks support this
# command.
#
# @param [User] user the user to remove
# @param [String] reason a reason for the removal
# @return [void]
def remove(user, reason = nil)
@bot.irc.send("REMOVE #@name #{user} :#{reason}")
end

# Sets or unsets modes. Most of the time you won't need this but
# use setter methods like {Channel#invite_only=}.
#
Expand Down

0 comments on commit ebc55c2

Please sign in to comment.