mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
hello

I made this script NOT to work for opers, how do I make it not to work for voices too?

thanks!

Code:
on 1:join:#:{ if ($nick !isop $chan) { .timermsg1 1 3 /msg $nick welcome! } }
  

Joined: Jun 2003
Posts: 5,024
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Jun 2003
Posts: 5,024
if ($nick !isop $chan) && ($nick !isvoice #) {

Regards,


Mentality/Chris
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
When a person joins a channel, they don't have a status yet, so they are always regular. Therefore you are doing your if checks in the wrong place, you should pass an alias to your timer, and check in that alias. If you want this only to work on regular users, as in not voiced/hoped/oped you can use: if ($nick isreg <channel>)

Additionally it would be a good idea to use the ! event prefix to prevent this script from triggering when you are the person joining.

On an ending note, I strongly advise you to specify an actual channel name in the on join event instead of just #, as that will trigger on any channel you are on, something the operators of channels where you are not staff will surely not appreciate.


Gone.
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
thank you!

and this one?

Code:
 alias m { var %a $nopnick($chan,0) | while %a { .timer 1 $calc(%a * 9) .msg $nopnick($chan,%a) $1- | dec %a } } 
 


how can I do it?

Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
Just change the $nopnick to $nvnick and that should solve the problem.

Joined: Oct 2003
Posts: 9
S
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: Oct 2003
Posts: 9
Could you maybe please explain what you want this script to do?

And why set a timer that multiply the number of total non opped
nicks in the nicklist by 9?
The while loop will try to msg every nick in the nicklist without ops
with the delay of the total number of nonopped nicks multiplyed by 9...

Are you simply trying to make a script that msgs every non ops?
(That is generally a bad idea, since most people will open a new
window on msg, and when responding, you will get lots of windows with replies) grin

If thats what your trying to do, then it works..but it will take ages to
tell everyone whatever you want to tell, and if its on a big channel,
you will find your self waiting a long time to say anything..


--==> Wizard Suntop <==--
Joined: Feb 2006
Posts: 307
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Feb 2006
Posts: 307
Quote:
Just change the $nopnick to $nvnick and that should solve the problem.


ummm, this will make it not to work BOTH for ops and voices?

Quote:
Could you maybe please explain what you want this script to do?

And why set a timer that multiply the number of total non opped
nicks in the nicklist by 9?
The while loop will try to msg every nick in the nicklist without ops
with the delay of the total number of nonopped nicks multiplyed by 9...

Are you simply trying to make a script that msgs every non ops?
(That is generally a bad idea, since most people will open a new
window on msg, and when responding, you will get lots of windows with replies) grin

If thats what your trying to do, then it works..but it will take ages to
tell everyone whatever you want to tell, and if its on a big channel,
you will find your self waiting a long time to say anything..


this is a for a bot which is hard to be flooded and the content of the message is informative and does not require reply

thanks!

Joined: Nov 2005
Posts: 105
D
Vogon poet
Offline
Vogon poet
D
Joined: Nov 2005
Posts: 105
yeah. Using $nvnick(#channel,0) returns the number of users less than voice. So basically all normal users only.


Link Copied to Clipboard