mIRC Home    About    Download    Register    News    Help

Print Thread
block a query #47202 04/09/03 11:18 PM
Joined: Aug 2003
Posts: 23
M
MaGoOsCuRo Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2003
Posts: 23
on *:text:*:?: {

if $1 == %nickaceptado .msg $1 bienvenido a mi privado

else if $nick != %nickaceptado .echo -s Please | .ignore $nick

}

its work fine but i didnt not know how close the query

any help?


thnx


Re: block a query #47203 04/09/03 11:26 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
on *:text:*:?: {
if ($1 == %nickaceptado) { .msg $1 bienvenido a mi privado }
elseif ($nick != %nickaceptado) { .echo -s Please | .ignore $nick | window -c $nick }
}


new username: tidy_trax
Re: block a query #47204 04/09/03 11:30 PM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Can I suggest something, why not use on OPEN?
Code:
on 1:OPEN:?:*: {
  if ($nick == %nickaceptado) { .msg $1 bienvenido a mi privado }
  else { 
    .echo -s Please 
    .ignore $nick 
    close -m $nick 
  }
}


Re: block a query #47205 04/09/03 11:33 PM
Joined: Aug 2003
Posts: 23
M
MaGoOsCuRo Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2003
Posts: 23
thnx so much

Re: block a query #47206 04/09/03 11:37 PM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
np smile


new username: tidy_trax
Re: block a query #47207 05/09/03 04:11 AM
Joined: Aug 2003
Posts: 23
M
MaGoOsCuRo Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2003
Posts: 23
i put on practice thnx ,i use both command but this time ,
not ,thnx so much for the help

Re: block a query #47208 05/09/03 04:25 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
You're welcome mate. smile

Re: block a query #47209 05/09/03 04:56 AM
Joined: Aug 2003
Posts: 23
M
MaGoOsCuRo Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2003
Posts: 23
on 1:text:?:*: {

.echo $chan 0,4 l nick $nick quiere hablar en privado con ud... 
.pregunta

}




alias pregunta {

set %aceptar $$?="Desea aceptar si o no"

if %aceptar == si my code here
else .msg $Nick i dont not acepted



}


how can you do this thnx for the help


Re: block a query #47210 05/09/03 05:04 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
on 1:text:*:?: {
  echo $chan 0,4 l nick $nick quiere hablar en privado con ud... 
  .pregunta
} 

alias pregunta {
  set %aceptar $$?="Desea aceptar si o no" 
  if (%aceptar == si my code here) { commands }
  else { .msg $Nick i dont not acepted }
}

Re: block a query #47211 05/09/03 05:08 AM
Joined: Aug 2003
Posts: 23
M
MaGoOsCuRo Offline OP
Ameglian cow
OP Offline
Ameglian cow
M
Joined: Aug 2003
Posts: 23
* $?: no puedo usar en un evento (línea 7, script50.mrc)
-

the command $? can not be use on event


Re: block a query #47212 05/09/03 05:11 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Oh yeah, I forgot about that. :\
Why don't you make it dialog based?
Edit: Coded a dialog based one for original poster.
Try this
Code:
on ^1:OPEN:?:*: {
  set -u120 %nick $nick
  set -u120 %message $1-
  msg $nick Please standby for confirmation, I am using a secure query event.
  dialog -dm query.block query.block
  did -a query.block 7 %nick
  did -a query.block 4 %message
  haltdef
}

dialog query.block {
  title "MaGoOsCuRo's Query Blocker"
  size -1 -1 131 156
  option dbu
  text "Nickname:", 1, 5 11 26 8
  box "MaGoOsCuRo's Query Blocker.", 2, 2 1 127 153
  text "Message:", 3, 6 45 25 8
  edit "", 4, 4 58 118 45
  edit "", 7, 4 23 118 10
  button "Accept", 5, 7 119 37 12, ok
  button "Decline", 6, 86 119 37 12, ok
  button "Close", 8, 6 140 119 9, cancel
}

on 1:DIALOG:query.block:sclick:5: {
  query %nick
  .msg %nick I have accepted your request %nick $+ , what did you want?
  echo %nick :: $me :: I have accepted your request %nick $+ , what did you want?
  echo %nick :: %nick :: %message
  dialog -x query.block query.block
}

on 1:DIALOG:query.block:sclick:6: {
  msg %nick Sorry %nick $+ , I am not accepting any pm's at this time. Please try again later.
  ignore -u60 %nick $+ !*@*
  dialog -x query.block query.block
}

on 1:DIALOG:query.block:sclick:8: {
  dialog -x query.block query.block
}

Re: block a query #47213 05/09/03 08:10 AM
Joined: Dec 2002
Posts: 3,547
S
SladeKraven Offline
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Two minor errors..
echo %nick :: $me :: I have accepted your request %nick $+ , what did you want?
echo %nick :: %nick :: %message
should actually be
Code:
echo %nick < $+ $me $+ > I have accepted your request %nick $+ , what did you want?  
echo %nick < $+ %nick $+ > %message

Possibly echo -t depending if you use timestamps or not.