mIRC Home    About    Download    Register    News    Help

Print Thread
Newbie questions #25128 19/05/03 10:45 PM
Joined: May 2003
Posts: 6
T
Tears Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2003
Posts: 6
1.

Is there any way to get all the channels a person is in upon a whois.

( $2 on raw 352 )

2.

I have been attempting to creat a kick-ban script.

It is supposed to kick a user 3 times for saying/doing something not allowed, then ban the user for a specified time.

I messed up totally with it as I started out with the idea of writing the nick in a txt file whenever he/she made an abuse...hence where I am going at...

Any pointers on this would be appriciated.

Thanks in advance.


I cry for Tears
Re: Newbie questions #25129 20/05/03 12:30 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
To know the number of any raw reply, simply type /debug -p @window (-p is for wrapping long lines).

Here's a script that captures the channels information:
Code:
raw 319:*:echo -> $2 is on: $3- | halt

As for a protection script, check out this page, and make sure to read the "reaction levels" part too.


Re: Newbie questions #25130 20/05/03 08:32 AM
Joined: May 2003
Posts: 6
T
Tears Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2003
Posts: 6
Thx alot, I managed to solve it the protection.

/debug -p @window doesn't show the numerics...atleast not for me...

However it seems was more tired then I thought yesterday..

Whois was supposed to be who

Hence the reason I wrote ( $2 on raw 352 )

Bad tendency of playing around with mIRC late at night...


I cry for Tears
Re: Newbie questions #25131 20/05/03 10:21 AM
Joined: Dec 2002
Posts: 1,922
O
Online Offline
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
/debug is meant to monitor any data exchange between mirc and the server you're connected to. You need to open the window, do a /whois (or whatever else) and watch the window to know the order of the parameters, and the numeric belongs to each raw.

Anyhow, only /whois tells what channels the user is on, /who doesn't. If you wanted to make a bad channel kicker, it would be easier (and faster) if the bot sits in the bad channel (so that it can see who joins), and do a simple "if ($nick ison #badchan)" comparison when someone joins your channel.

Re: Newbie questions #25132 20/05/03 04:37 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
/who does actually find the channels a user is on just use this as an example:
on blah:TEXT:`find*:#:{ /who $2 }
raw 352:*:{
if (*#* iswm $2) {
msg $comchan($me,1) $2
}
else {
HALT
}
}


new username: tidy_trax
Re: Newbie questions #25133 20/05/03 10:49 PM
Joined: May 2003
Posts: 6
T
Tears Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2003
Posts: 6
That makes no sence at all to me...

$comchan($me,1) would search for a the first common channel I am in and I am in...


I cry for Tears
Re: Newbie questions #25134 21/05/03 01:44 AM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
If its one thing you should learn quickly on this forum, its to ignore pheonix's responces. 99.9% of the time, they are not helpful.

Secondly to get the channels a user is on with a whois, just use..

raw 319:*: {
/set %channels $3-
/unset %comchannels
/set -u0 %a 1
while (%a <= $numtok(%channels, 32)) {
if ($me ison $gettok(%channels, %a, 32)) /set %comchannels %comchannels $gettok(%channels, %a, 32)
/inc -u0 %a
}
}

Now, you have their channels in %channels, and channels you and they are in saved in %comchannels


-KingTomato
Re: Newbie questions #25135 21/05/03 10:38 AM
Joined: May 2003
Posts: 6
T
Tears Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: May 2003
Posts: 6
Ok...

I knew how to get the channels by numeric 319, but to use %channels on /who I need to save it by performing a /whois on the person first.

My question was however just if there was a way to get all the channels a user is on by just doing a /who on him/her.

And I can't see any need to use variables on /whois replys...

I am but a newbie when it comes to mIRC though, so I might have missed something...

And in all honestly...I have no idea how tokens work...

Thanks for the answer though, I feel kinda bad rejecting ppl when they try to help me...

So I take in conclusion that /who can only show the first channel in response, unless you trigger a /whois upon the target to get the channels, then save them as KingTomato just showed...

"I learned something new wink"

If anyone have a good newbie tutorial about tokens I would be very happy to get the link.

And thanks alot those of you who tried to help me, pls bear with this poor newbie for asking stupid questions...


I cry for Tears
Re: Newbie questions #25136 21/05/03 07:13 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
no that wud mean if you typed `find blah
it would find blah and message all the channels he was found on.
because $comchan($me,1) is a replacement for # or $chan or $active in raw.

Last edited by pheonix; 21/05/03 07:14 PM.

new username: tidy_trax
Re: Newbie questions #25137 21/05/03 07:16 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
also you judged me too quickly bcoz i started off posting msn mad


new username: tidy_trax