mIRC Homepage

Shorter Commands

Posted By: Luke

Shorter Commands - 15/03/05 10:10 AM


Is it possible to edit/create a simple script that allows you to miss out the channel name when kicking or banning a user.


/kick Username [reason]

rather than

/kick #channel Username [reason]

Thanks in advance.
Posted By: tidy_trax

Re: Shorter Commands - 15/03/05 10:20 AM

alias kick { !kick $active $1- }

Put the above into remote (Alt+R)
Posted By: namnori

Re: Shorter Commands - 17/03/05 01:33 PM

Here's my unglorius version. I'd frown on making the alias the same name as the function it calls =D

k {
  var %default_reason = kick
  var %chan = $iif($me ison $1,$1,$active)
  var %nick = $iif($me ison $1,$2,$1)
  var %reason = $iif($me ison $1,$iif($3,$3-,%default_reason),$iif($2,$2-,%default_reason))
  if (($me ison $1) && ($2)) || (($me ison $active) && ($1)) { kick %chan %nick %reason | eenforce 4 manual kick %chan %nick $+($chr(40),%reason,$chr(41)) }
  else { error Syntax: /k [#channel] <nick> [reason] }

I could optimize it a lot more... but I'm a lazy, lazy man. And if it ain't broke, don't fix it
Posted By: Relinsquish

Re: Shorter Commands - 17/03/05 01:59 PM

/eenforce is not an mIRC command. By the way, variables are not needed. You can use all the $iif() identifiers for the /kick command line.
© 2020 mIRC Discussion Forums