# $EPIC: msg,v 1.4 2001/11/27 22:06:33 anders Exp $
Synopsis:
   msg <nickname> <text to send>
   msg <channel> <text to send>
   msg =<dcc chat peer> <text to send>
   msg %<process id|process name> <text to send>
   msg /<command> <command arguments>

Description:
   The /msg command is how you send a message to someone else.  You can
   send a message to another nick on irc, to a channel, to someone
   you have a DCC CHAT connection open with, to an /exec'd process, or
   to an EPIC command.  You may use a comma-separated list (no spaces) to 
   send a single message to more than one recipient at a time.  You may
   freely mix and match each of the types of targets in any way you want.

   There are three "magic" recipients.  The comma (',') recipient is the
   last person to send you a message.  The period ('.') recipient is the
   last person you sent a message to.  The asterisk ('*') recipient is the
   current channel in your current window.  These "magic" recipients may 
   not be included with any other recipients in a comma-separated list; 
   they must be used alone.

   There are never any restrictions on sending a /msg to an /EXEC target,
   a /DCC CHAT target, or an /ALIAS target.

   However, from within an /ON MSG, /ON PUBLIC, /ON DCC_OFFER, or any other 
   /ON that occurs because of a "PRIVMSG", the /MSG command (and other
   commands that send PRIVMSGs, such as /SAY, /SEND, /CTCP, and /DCC) sends
   your message with a "NOTICE".  The effect of this is that you cannot 
   properly use /DCC CHAT or /DCC SEND from within these /ON's.  This 
   requirement is specified by the irc protocol and is intended to prevent 
   infinite message loops between clients.

   You may not always be able to send a message to a channel.  If the channel
   mode is +n, you must be a member of the channel to send a message to it.
   If the channel mode is +m, you must be a member of the channel and also 
   must either be a channel operator (+o) or a channel voice (+v) to send a 
   message to it.  The MODE help page talks about this in more detail.

   You may not always be able to send a message to multiple irc targets.  
   Because of the spread of spambots/floodbots, some servers restrict the 
   number of irc targets you can send a message to in any one message.  As 
   with every server restriction, what happens if you exceed this limit 
   varies from server to server.

Examples:
   To send a private message to your friend Buddha:
      /msg buddha hi there!

   To send a message to your current channel:
      /msg #channel how is everyone today?

   To send a message to the running EXECed process with id 2:
      /msg %2 exit

   To send a message to your friends buddha, booya (with whom you have a
   DCC CHAT running), and channel #foobar:
      /msg buddha,=booya,#foobar see you later!

   To send a message to an EXECed process named "mail":
      /msg %mail x

See Also:
   dcc(1) chat; exec(5); load(5) nicks; notice(1); on(5) msg, public_msg,
   send_msg; query(1); say(1); send(5); set(4) beep_on_msg

