The invite command is used to 'invite' a user into a channel. The most basic syntax is as follows:
/invite NickName #ChannelName
It is possible to make it so that a channel cannot be entered unless invited in. To do so, the following command is used.
/mode #ChannelName +i
When this mode is on, users in the channel have to use the above command to let another user on, and users wishing to join a channel must use the knock command. The knock command works as follows.
/knock #ChannelName your message to the ops here
If you are the channel owner, or are AOP level or above (or Access level 5 or above), you can invite yourself into the channel
/cs invite #ChannelName
When mode +i is set, and a user should be able to join without having to receive an invite, there is an invite exception list. To be on it, use the following command.
/mode #ChannelName +I nickname!username@hostname