mIRC Home    About    Download    Register    News    Help

Print Thread
#156824 20/08/06 03:03 PM
Joined: Dec 2005
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2005
Posts: 22
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.
}


Invision Support
#Invision on irc.irchighway.net
Joined: Apr 2006
Posts: 464
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Apr 2006
Posts: 464
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.
}

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Read more than just the beginning. I already showed how to do that both ways.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2005
Posts: 22
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2005
Posts: 22
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard