mIRC Homepage
Posted By: ECGN_Ryan bot helps me with support - 16/06/03 10:36 AM
Hey guys.. new here. got a q.

I have a bot right now.. very simple. Heres what i want to acheive with him.

When a user joins a channel, the bot querys the user. When the person responds the bot's query, the bot will tell another channel what the person said.

Example:

Person joins support channel
Bot querys person "What is your question?"
Person responds "i cant login to the forums"
Bot messages staff channel "$nick says: i cant login to the forums"

Is this possible? I have a scipt now that when someone types @page, the bot messages the staff channel with "user $nick has requested support"

Any ideas? Thanks!

EDIT: I cant spell... heh
Posted By: pheonix Re: bot helps me with support - 16/06/03 10:39 AM
on *:TEXT:#channel1:{
if * $+ $chr(63) $+ * iswm $1-
msg #channel2 $nick asked $1-
}
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 11:03 AM
awesome. Thanks a bunch!
Posted By: pheonix Re: bot helps me with support - 16/06/03 11:06 AM
#channel1 being the name of the channel with the nick asking the question and #channel2 being the channel you want to send the message to
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 11:15 AM
just gave it a try... the person enters channel1 and says something, and this is relayed to channel 2?

I really was aiming for relaying a message sent in a Private Message (query) to the bot from the user.

Person enters channel1, bot pm's person upon entering, persons message to bot is relayed to channel 2
Posted By: Jerk Re: bot helps me with support - 16/06/03 11:20 AM
on !*:join:#channel1:/.msg $nick What is your question?

on *:text:*:?: if ($nick ison #channel1) { msg #channel2 $nick asks: $1- }

Good luck with flooding issues :tongue:
Posted By: pheonix Re: bot helps me with support - 16/06/03 11:27 AM
on *:JOIN:#:{
msg #channel1 $nick please query me with your question
}
on *:TEXT:*:?:{
msg #channel2 $nick asked $1-
}
Posted By: ECGN_Ryan oops ;) - 16/06/03 11:29 AM
Trial and error.. disregard this post :tongue:
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 11:31 AM
Ahh yes.. sorry.. another quick question. Any way i can get the bot to close its query message? its on a windows box, and those PM's can stack up!
Posted By: Jerk Re: bot helps me with support - 16/06/03 11:41 AM
Yes, instead of ON TEXT, use ON OPEN and haltdef

on ^*:open:?:*: if ($nick ison #channel1) { msg #channel2 $nick asks: $1- | haltdef }

Or you can use ON TEXT and just use the dedicated query window. /dqwindow on
That wil make all msgs go to one window.
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 11:41 AM
i promise, this is my last question. You guys have taught me a bunch and helped quick. Thanks a bunch.

I want the bot to tell the user that they were voiced. The room is +m, so when a staff members +v's a user, i want the bot to say something like 'you have been voiced. Please respond within 5 minues or face removal from the room'

Or perhaps.. have the user in the staff channel say something like @take and that support operator can 'take' the message. And then.. the bot would voice the user, and say 'you have been voiced by (staffmember) please state your problem'

Which ever is easier. Thanks a bunch guys. I owe you.
Posted By: pheonix Re: bot helps me with support - 16/06/03 11:45 AM
on *:VOICE:#:{
msg #channel1 $vnick $+ , you have been voiced please respond within five minutes, or face removal from the room
}
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 11:56 AM
could i do something like

on 1:text:@take $nick:#ecgn-staff:{

Can i make the support operator have the bot set +v and say 'so and so has taken your request for support'

This would happen if the support operator deicded to take to take the support request.
Posted By: pheonix Re: bot helps me with support - 16/06/03 12:05 PM
on *:TEXT:@take*:#channel2:{
msg #channel1 $nick has taken your request $2
}
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 12:06 PM
What do i have to intregrate to have the bot voice the user also?
Posted By: pheonix Re: bot helps me with support - 16/06/03 12:48 PM
on *:TEXT:@take*:#channel2:{
mode #channel1 +v $2
msg #channel1 $nick is ready to take your question $2
}
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 12:55 PM
how does the bot know who $2 is?

Also, a note about the dqwindow.

/dqwindow on is support to make all query's go into one box? Seems it opens new ones every time.I guess.. i could make those notices $nicks, but the room is +m and and couldnt send... So is /dqwindow on the only way to close down querys? Im just afraid i wont be able to login to the server, and there will be hundreds of querys.
Posted By: pheonix Re: bot helps me with support - 16/06/03 01:00 PM
not a clue bout /dqwindow, but, the bot would know who $2 is because you will type @take blah, and it would voice blah.
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 01:06 PM
ahhh ok got ya.

I got this part, and its fine:

msg #channel1 $nick is ready to take your question $2

unfortunelly, it wont voice the user. It still says their name ok ($2) but mode #channel1 +v $2 doesnt want to work for some reason.
Posted By: pheonix Re: bot helps me with support - 16/06/03 01:10 PM
mode #channel1 +v $2-
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 01:19 PM
hmmm.. ive tried variations of that. Still no luck.
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 01:20 PM
oh wow... IDIOT.. the bot wasnt oped. SORRY!! hahahaha
Posted By: ECGN_Ryan Re: bot helps me with support - 16/06/03 11:24 PM
Indeed... anyone know about the /dqwindow on.. is this supposed to go to one window? I logged in today, and there were about 20 query windows.
Posted By: Jerk Re: bot helps me with support - 17/06/03 05:19 AM
The dedicated query window works for me. All my messages go to it (unless they are in my notify list)
© mIRC Discussion Forums