mIRC Home    About    Download    Register    News    Help

Print Thread
#114545 15/03/05 10:10 AM
Joined: Mar 2005
Posts: 1
L
Luke Offline OP
Mostly harmless
OP Offline
Mostly harmless
L
Joined: Mar 2005
Posts: 1
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,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Code:
alias kick { !kick $active $1- }


Put the above into remote (Alt+R)


New username: hixxy
#114547 17/03/05 01:33 PM
Joined: Dec 2002
Posts: 14
N
Pikka bird
Offline
Pikka bird
N
Joined: Dec 2002
Posts: 14
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
Vogon poet
Offline
Vogon poet
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.


- Relinsquish

Link Copied to Clipboard