None of the above is any coherent form of mIRC syntax. Where did you get this code from? When you write code, you cannot just make up the syntax as you go along. You should type /help Aliases in mIRC to read about how to write proper aliases using proper mIRC syntax.
In any case, what you're trying to do cannot be described in one line. This is because of the fact that any command that interacts with an IRC server will
have a delay. Read that URL to figure out how to deal with the situation.
Basically, typing /server does not immediately connect you to the server. In fact, mIRC won't even start connecting until your entire set of commands finish processing, so typing /server SERVER | /join #chan will not work. You'll need an ON CONNECT event to authenticate or join
when you connect. However, since joining a channel immediately after connecting is a common task,
/server myserver.com -i NICKNAME -j #chan KEY
is a quick builtin way of connecting to a server with a nickname and joining a channel with a key-- this does not work for "authentication" however, though some networks support nickserv authentication by sending your password as the server pass
/server myserver.com MYNICKSERVPASS
I'm not sure what the rest of what you're trying to do is, but you will need to
wait until you join the channel if you want to send a message to it-- this means using an ON JOIN event as well
You can lookup ON CONNECT and ON JOIN by typing the following in mIRC:
/help ON CONNECT
/help ON JOIN
Maybe someone else might be generous enough to write the entire script out for you here.