mIRC Homepage
Posted By: spirit_cro help with text relay script - 20/08/06 03:03 PM
Hello im just trying to write something real simple regarding text relay. For e.g. If i have a help channel called #help and a client called Help and a private channel called #help-priv with my staff. I want to be able to let people message the client Help with their queries. When they message "Help" the client will relay their request to the private channel #help-priv. So my staff can see the request and then whoever is available in the priv channel can type !msg $nick and the answer to the question. Therefore the client "Help" will message the person with an answer. Any help with this would be appreciated, im really keen to learn so help would be greatful. Im a busy person ill do my best to co-operate.
Posted By: Riamus2 Re: help with text relay script - 20/08/06 03:12 PM
Here you go. You can change the text parts to say something else if you don't like how I worded things.

Code:
on *:text:!help *:#help: {
  msg #help-priv Help requested by $nick $+ : $2-
}

on *:text:.msg *:#help-priv: {
  if ($2 ison #help) {
    if ($3) {
      msg $2 Answer: $3-
    }
    else msg $chan Error: You need to enter the answer to the question.
  }
  else msg $chan Error: The nick is not in #help.
}
Posted By: OrionsBelt Re: help with text relay script - 20/08/06 03:50 PM
I think he meant, when someone messages his "Help" bot.
Change the code to this:

Code:
on *:text:*:?: {
  .msg $nick Your request has been forwarded, please wait for someone to process your request.
  .msg #help-priv Help requested by $nick $+ : $2-
}

on *:text:.msg *:#help-priv: {
  if ($2 ison #help) {
    if ($3) {
      msg $2 Answer: $3-
    }
    else msg $chan Error: You need to enter the answer to the question.
  }
  else msg $chan Error: The nick is not in #help.
}
Posted By: Riamus2 Re: help with text relay script - 20/08/06 05:17 PM
Read more than just the beginning. I already showed how to do that both ways.
Posted By: spirit_cro Re: help with text relay script - 20/08/06 11:01 PM
Will this allowin anyone in #help-priv to type !msg $nick the answer to your question is ... and the bot will msg them what you wrote after $nick ? !msg being the trigger.
Posted By: Riamus2 Re: help with text relay script - 22/08/06 08:30 AM
Yes.
© mIRC Discussion Forums