mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2004
Posts: 18
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Dec 2004
Posts: 18
Hello,

I've tried adding my simple /kb script in different ways but it simply doesn't seem to want to work.

The objective is to first set a ban and then a kick:, while being able to input a reason, so it goes like this:

/kb $$1 /mode # +b $$1 2 | /kick # $$1 $$?2-

There's 2 problems: 1), the script only kicks with partial reason even if i put an - at the end to allow for multiple words, also the ban isn't set.

I though I allowed the ban towards the nick to be type 2 mask (*!*@host.mark)

What am I doing wrong here ?

Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
Code:
kb { mode # +b $address($$1,2) 5 | kick # $$1 $$?="Enter kick message here" }


The syntax is: /kb <nick> and it goes to your aliases.

Joined: Sep 2008
Posts: 62
_
Babel fish
Offline
Babel fish
_
Joined: Sep 2008
Posts: 62
/kb $$1 /mode ... <-- When you type /kb, it executes $$1 /mode. Wrong syntax. It's alias name, then commands.

/mode # +b $$1 2 <-- theres no channel mode '2'

/kick # $$1 $$?2- <-- What's '?2-' ?

1) I think you're thinking of /ban instead of /mode (and you can use -k to kick the person after setting the ban)

2) If you require the second parameter, you don't need to require the first one, i.e $1 $$2

3) $?, $?2, $?2- works fine here. It pops up a dialog and it returns everything I put in there. Perhaps you want '$2-' instead.

try:

Code:
kb ban # -k $$1 2

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Hm, instead of $$?2-, use $? to enter the kick reason in an input box, or $2- to pass the reason directly in the command.
For /kb <nick> <reason>:
ban # $1 2
kick # $1 $$2-

or for /kb <nick> and hav the input box asking for the kick reason:
ban # $1 2
kick # $1 $$?

or a combination of those (ask for a ban reason only if if none is provided directly)
ban # $1 2
kick # $1 $iif((!$2),$$?),$2-)

which as pointed out, can be reduced to
ban -k # $1 2 $iif((!$2),$$?,$2-)

Last edited by Horstl; 13/11/08 01:56 AM.
Joined: Dec 2004
Posts: 18
C
Pikka bird
OP Offline
Pikka bird
C
Joined: Dec 2004
Posts: 18
thanks all, now I can see that I can do multiple things smile


Link Copied to Clipboard