Ok what I am trying to do is get my bot to message multiple people (staff of a company) on a certain command.
For example:
The command "!help" will send a message to people in a channel with "companyname" on their IRC nick.
< user1 > !help
< bot > (notice): staff has been paged
--- bot messages business-ron and business-bob --- because they have "business-" on their names.
Any help?
i think this is what your looking for :P
on *:text:!help:#channel: {
msg # (Notice) Staff has been paged
var %total = $nick(#,0)
var %selected = 1
var %tag = business-
while (%selected <= %total) {
if (%tag isin $nick(#,%selected)) { notice $nick(#,%selected) (notice) $nick Wants help }
inc %selected 1
}
}
Is there nothing like
on 1:text:!help:#channel: /msg tag* $nick needs help.
I tried your script and I got the following
"(Notice) Staff has been paged var = 2 var = 1 var = business- while (%selected <="
Hi,
are you aware that when you copy a piece of code from these msg boards, and u paste them in ur mirc scripts editor,
that the text is put in one line?
Unless the script is piped to be 1 line, it will not work.
So what u need to do is put that pasted stuff in the same way as you see it here in the msg boards, in other words using multiple lines.
Greetz
Or you can copy it from here into WordPad; then re-copy it from WordPad into the mIRC editor and the line breaks will be retained.
Thanks! I wasn't aware IE did that (since I don't use it).
I tested with the Netscape, Opera, and Mozilla browsers, and they do NOT put it in one line when copied from here and pasted to remotes.