mIRC Home    About    Download    Register    News    Help

Print Thread
#48686 11/09/03 09:54 AM
Joined: Sep 2003
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2003
Posts: 6
Is it possible to make a script that will be run on connect, will check the number of users on a channel, and then join that channel if there are more than 4 users in it? I am connecting to a server in Croatia, and the channel I am planning to use the script on has a stats-bot in it.

thanks!

#48687 11/09/03 10:51 AM
Joined: Sep 2003
Posts: 5
K
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
K
Joined: Sep 2003
Posts: 5
I don't see any way of doing this other than by listing the channel u want:
Code:
on *:connect:{
  .list #channelyouwnat
}
raw 322:*:{
  if ($3 > 4) {
    join $2
    halt
  }
}
 


-------------------------
mailman @ Axenet
mailman @ Gh0st4u
#48688 11/09/03 05:04 PM
Joined: May 2003
Posts: 161
A
Vogon poet
Offline
Vogon poet
A
Joined: May 2003
Posts: 161
That's going to go crazy when you list all channels. You should have it only join when it's the right channel

Code:
on *:connect:{
  .list #channelyouwant
}

raw 322:*:{
  if ($2 == #channelyouwant) && ($me !ison $2) && ($3 > 4) {
    join $2
  }
}

#48689 11/09/03 05:38 PM
Joined: Sep 2003
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2003
Posts: 6
this may seem a stupid question, but since I'm new to mIRC, it's not stupid for me:
where do I enter the code?

thanks!

#48690 11/09/03 05:48 PM
Joined: Jun 2003
Posts: 242
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
ALT+R in your mIRC

#48691 11/09/03 05:58 PM
Joined: Sep 2003
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2003
Posts: 6
t doesn't work.
I get "ON Unknown command"
I am using mIRC 6.10

#48692 11/09/03 05:59 PM
Joined: Jun 2003
Posts: 242
R
Fjord artisan
Offline
Fjord artisan
R
Joined: Jun 2003
Posts: 242
well then you have a missing bracket somewhere above it

#48693 11/09/03 08:29 PM
Joined: Sep 2003
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2003
Posts: 6
a friend suggested this:
#tolkien_newsi is the channel i'll be using the script on

on 1:CONNECT:{
.list #tolkien_newsi
raw 322:*:{
if ($2 == #tolkien_newsi) && ($3 > 4)
/join $2
}
}

#48694 11/09/03 08:32 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Then this "friend" doesn't know his scripting too well. You can't have an event inside an event, and raw events are events. Ashkrynt gave you code that should work. The error you pasted indicates that the code BEFORE Ashkrynt's isn't properly terminated.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#48695 12/09/03 08:47 AM
Joined: Sep 2003
Posts: 6
R
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Sep 2003
Posts: 6
I have copied Askhrynt's code into scripts.ini, but when I connect to the server, it only shows the number of users on the channel, it doesn't join it!

#48696 12/09/03 11:03 AM
Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
Make sure that the channel does not have mode +s on. As this would hide it from any /list, therefor failing to trigger the if in Askhrynt's code.


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby

Link Copied to Clipboard