Well that sorta has numerous flaws.

For example, DALnet requires /msg chanserv@services.dal.net, since you check if (*serv iswm $2) it won't match.
Also:
//echo -a $iif(*serv iswm #serv,$true,$false)
So /msg #serv hey!
Will cause it to output an error.

Additionally (/*serv* iswm $1-) is wrong:

//echo -a $iif(/*serv* iswm /server,$true,$false)
//echo -a $iif(/*serv* iswm /join #serv,$true,$false)

Also why use /msg* iswm $1- ? Should it trigger if I do /msgops? Or any other custom alias beginning with /msg?