mIRC Homepage
Posted By: mcollett command to message partial name(s) - 05/04/04 04:53 AM
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?
Posted By: ATMA Re: command to message partial name(s) - 05/04/04 05:11 AM
i think this is what your looking for :P

Code:
on *:text:!help:#channel: { 
  msg # (Notice) Staff has been paged
  var %total = $nick(#,0)
  var %selected = 1
  var %tag = business-

  while (%selected &lt;= %total) {
    if (%tag isin $nick(#,%selected)) { notice $nick(#,%selected) (notice) $nick Wants help }
    inc %selected 1
  }
}
Posted By: mcollett Re: command to message partial name(s) - 06/04/04 12:40 AM
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 <="
Posted By: FiberOPtics Re: command to message partial name(s) - 06/04/04 01:29 PM
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

Posted By: Hammer Re: command to message partial name(s) - 06/04/04 06:53 PM
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.
Posted By: CtrlAltDel Re: command to message partial name(s) - 06/04/04 07:50 PM
Thanks! I wasn't aware IE did that (since I don't use it). grin

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.
© mIRC Discussion Forums