mIRC Home    About    Download    Register    News    Help

Print Thread
#114545 15/03/05 10:10 AM
L
Luke
Luke
L
Hi

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

e.g.

/kick Username [reason]

rather than

/kick #channel Username [reason]

Thanks in advance.
smile

#114546 15/03/05 10:20 AM
Joined: Nov 2003
Posts: 2,321
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,321
Code:
alias kick { !kick $active $1- }


Put the above into remote (Alt+R)

#114547 17/03/05 01:33 PM
N
namnori
namnori
N
Here's my unglorius version. I'd frown on making the alias the same name as the function it calls =D

Code:
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

#114548 17/03/05 01:59 PM
Joined: Mar 2004
Posts: 175
R
Vogon poet
Offline
Vogon poet
R
Joined: Mar 2004
Posts: 175
/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.


Link Copied to Clipboard