mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#30067 16/06/03 10:36 AM
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
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

Last edited by ECGN_Ryan; 16/06/03 10:38 AM.
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:TEXT:#channel1:{
if * $+ $chr(63) $+ * iswm $1-
msg #channel2 $nick asked $1-
}


new username: tidy_trax
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
awesome. Thanks a bunch!

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
#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


new username: tidy_trax
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
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

Joined: Dec 2002
Posts: 169
J
Vogon poet
Offline
Vogon poet
J
Joined: Dec 2002
Posts: 169
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:

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:JOIN:#:{
msg #channel1 $nick please query me with your question
}
on *:TEXT:*:?:{
msg #channel2 $nick asked $1-
}


new username: tidy_trax
#30074 16/06/03 11:29 AM
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
Trial and error.. disregard this post :tongue:

Last edited by ECGN_Ryan; 16/06/03 11:35 AM.
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
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!

Joined: Dec 2002
Posts: 169
J
Vogon poet
Offline
Vogon poet
J
Joined: Dec 2002
Posts: 169
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.

Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
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.

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:VOICE:#:{
msg #channel1 $vnick $+ , you have been voiced please respond within five minutes, or face removal from the room
}


new username: tidy_trax
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
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.

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:TEXT:@take*:#channel2:{
msg #channel1 $nick has taken your request $2
}


new username: tidy_trax
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
What do i have to intregrate to have the bot voice the user also?

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:TEXT:@take*:#channel2:{
mode #channel1 +v $2
msg #channel1 $nick is ready to take your question $2
}

Last edited by pheonix; 16/06/03 12:48 PM.

new username: tidy_trax
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
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.

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
not a clue bout /dqwindow, but, the bot would know who $2 is because you will type @take blah, and it would voice blah.


new username: tidy_trax
Joined: Jun 2003
Posts: 18
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Jun 2003
Posts: 18
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.

Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
mode #channel1 +v $2-


new username: tidy_trax
Page 1 of 2 1 2

Link Copied to Clipboard