I just figured this out today
. If I'm all wrong
, please please let me know
/mode #channel +b *nick*!*ident*@*.host.domain
/mode invokes the channel mode command. Used for so much more than banning.
#channel, is, of course, your current channel.
+b means add a ban directive.
* are wildcards. Also ? can be used as single character wildcards.
nick is the nick or part thereof of the person/bot/alien you are trying to ban.
! is the divider between nick and ident.
ident is the name they have set for themselves in their ident reply to the irc server. This is often your username, but not always. Many IRC clients let you set this.
If they are on a dialup account, generally the first part of their host string is going to be changeable, so you want to account for that by putting a * (wildcard) in there.
hostname, well, the base host name
and domain, the domain.
To unban, put in the exact same banned string but with a -b instead of a +b.