mIRC Home    About    Download    Register    News    Help

Print Thread
#151577 19/06/06 06:53 AM
Joined: Jun 2006
Posts: 3
X
XEIJ Offline OP
Self-satisified door
OP Offline
Self-satisified door
X
Joined: Jun 2006
Posts: 3
Is there a script which auto PM's everyone in a specific channel?

#151578 19/06/06 07:10 AM
Joined: Aug 2005
Posts: 31
D
Div Offline
Ameglian cow
Offline
Ameglian cow
D
Joined: Aug 2005
Posts: 31
that's called spamming.

I don't think many people will be willing to assist you on that.

#151579 19/06/06 08:04 AM
Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
DaveC wrote:
Quote:

ok lets break it down, you want to send a private message to everyone in the channel, So thats a message everyone in the channel can see....

Would not the simply solution be

/MSG #channel your message here

thats going to be private to everyone in the channel!

#151580 19/06/06 03:28 PM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
---It's up to them to use the code in good manner---

if they spam they get kicked as per server rules depending which network they are on...

There's several ways you can pm everyone in the channel you are on and this is the code

#1 you need a loop and a calculation of people in the current channel

$nick(#,0) will give us total now we must create a loop from 1 to X number of people in the channel and from 1 to x amount put an indicator that your going small to big or equal too its like math back in school, one of the simplest ways to do this is like this

Code:
%x = 1
while (%x <= $nick(#,0)) { perform command here + increment }


so you wanna autoPM everyone in a specific chan correct?

well you can create an alias to where you execute the command everytime you wanna pm everyone like...

Code:
alias autopm { 
var %x = 1
while (%x <= $nick(#,0)) {
msg $nick(#,%x) $1-
inc %x
}
}


basically what I did is create an alias where you type /autopm msghere and it will message everyone in the channel you typed that with any message you type after /autopm

next for example if you want the Operators of the channel to have a specific command so they could message the whole channel privately you would do something similar to this...

Code:
on @:TEXT:*:#:{
if ($1 == !pm) {
var %x = 1
while (%x <= $nick(#,0)) {
msg $nick(#,%x) $2-
inc %x
}
}
}


basically in that command an op types !pm Hello everyone you will say hello to everyone in the channel

there's many methods of doing this but you have the basic concept of what needs to be done.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#151581 20/06/06 01:23 AM
Joined: Jun 2006
Posts: 3
X
XEIJ Offline OP
Self-satisified door
OP Offline
Self-satisified door
X
Joined: Jun 2006
Posts: 3
sorry im really new to this whole code/scripting thing with irc, where exactly do i insert this code? And where do i type that cmd to find out how many ppl i nchan?

Last edited by XEIJ; 20/06/06 01:30 AM.
#151582 20/06/06 05:10 AM
Joined: Aug 2005
Posts: 1,052
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
Quote:
sorry im really new to this whole code/scripting thing with irc, where exactly do i insert this code? And where do i type that cmd to find out how many ppl i nchan?


This code goes in the remotes section Press ALT + R
then click File new and put the script in there

you dont have to type any commands to find out how many nicks are in the channel look above your mIRC client theres a count there for you but if you must know the command then simply type

//echo -a $nick(#,0)

make sure you have the 2 slashes you see $nick refers to someone executing your script, however should you put a channel name in between the command you can handle the channel as being the executer (hard to explain)

either way I can control $nick to find out how many users are in chan or locate a user like if the nicklist is only 4 people in channel

Alpha
Beta
Charlie
David

and i typed //echo -a $nick(#,3) it would give me the name Charlie since he's third in the script


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
#151583 20/06/06 08:07 AM
Joined: Jun 2006
Posts: 3
X
XEIJ Offline OP
Self-satisified door
OP Offline
Self-satisified door
X
Joined: Jun 2006
Posts: 3
thanks mate, got it now!


Link Copied to Clipboard