mIRC Home    About    Download    Register    News    Help

Print Thread
#44541 28/08/03 12:28 AM
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Feb 2003
Posts: 79
i want to make a command, well use the name "mycommand" in this example... I want to use:

/mycommand hi
$mycommand(data)
$mycommand(process).kill

but i dont know how to sperate the /mycommand from the $mycommand, i do know about $prop though

Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Here's a pretty common structure used.

Alias MyCommand {
  var %s = stuff stuff
  more stuff here...
  if ($isid) return %s
  echo $colour(info) -ati *** MyCommand: %s
}

$isid == $true if MyCommand was called as an identifier.
Since you /return %s at this point, the subsequent /echo only displays if MyCommand was called as a command/alias.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Joined: Feb 2003
Posts: 79
A
Ancyker Offline OP
Babel fish
OP Offline
Babel fish
A
Joined: Feb 2003
Posts: 79
yay ty.


Link Copied to Clipboard