Say you have several lines to send to a user, sometimes as /msg and sometimes as /notice. To avoid needing a bunch of duplicate lines where the only difference is "/msg" vs. "/notice", is it possible to just store the command in a variable? So, for example where:
if ($something = msg) {
  /msg $nick line1
  /msg $nick line2
  /msg $nick line3
  /msg $nick line4
elseif ($something = notice) {
  /notice $nick line1
  /notice $nick line2
  /notice $nick line3
  /notice $nick line4

could be optimized with something like:
var %cmd = $something
%cmd $nick line1
%cmd $nick line2
%cmd $nick line3
%cmd $nick line4

I did try the above as both "var %cmd = $something" and "var %cmd = / $+ $something" but get "Unknown command". If this isn't possible, what about sending a raw message instead of /msg|/notice?