mIRC Home    About    Download    Register    News    Help

Print Thread
Closing Sockets #27166 31/05/03 12:51 AM
Joined: May 2003
Posts: 7
H
HiFi Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: May 2003
Posts: 7
I don't want sockets to be used in mIRC. How can I make a script that will close a socket and alert me when one tries to open?

Re: Closing Sockets #27167 31/05/03 12:55 AM
Joined: May 2003
Posts: 177
P
Prizm Offline
Vogon poet
Offline
Vogon poet
P
Joined: May 2003
Posts: 177
I think this should do what you want:

Code:
on *:SOCKOPEN:*:{
  var %sockname = $sockname
  sockclose %sockname
  echo -es * Socket ( $+ %sockname $+ ) was closed
}

Re: Closing Sockets #27168 31/05/03 01:08 AM
Joined: May 2003
Posts: 7
H
HiFi Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: May 2003
Posts: 7
No no no! That's not what I want. Can't you read?

Re: Closing Sockets #27169 31/05/03 01:14 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
maybe u should try reading yourself ..... that script closed the socket that attempted to open and it gave u an alert ....... change the message if u want but its still exactly what u requested


D3m0nnet.com
Re: Closing Sockets #27170 31/05/03 01:21 AM
Joined: May 2003
Posts: 7
H
HiFi Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
H
Joined: May 2003
Posts: 7
what I want is when a socket tries to open, an alert box will popup asking if a socket should continue opening or not. I made this very clear in my first post.

Re: Closing Sockets #27171 31/05/03 01:34 AM
Joined: May 2003
Posts: 177
P
Prizm Offline
Vogon poet
Offline
Vogon poet
P
Joined: May 2003
Posts: 177
I don't see anything about a popup alert dialog in your original post. All you said is you want to to close the socket and be alerted when it tries to open. I gave you a simple script that would do just that.

What your now asking for would require rewriting the /sockopen command.

Re: Closing Sockets #27172 31/05/03 06:00 AM
Joined: Mar 2003
Posts: 49
S
SnakeRulez Offline
Ameglian cow
Offline
Ameglian cow
S
Joined: Mar 2003
Posts: 49
Try this :
on *:SOCKOPEN:*:{
set %snake $?!="A socket tring to open, close the socket?"
if (%snake == $true) {
var %sockname = $sockname
sockclose %sockname
}
if ((%snake == $false) {
halt
}
}

Re: Closing Sockets #27173 31/05/03 04:13 PM
Joined: May 2003
Posts: 177
P
Prizm Offline
Vogon poet
Offline
Vogon poet
P
Joined: May 2003
Posts: 177
There's no need for global variables. And you also have an if-then-else bracket mismatch.

Try this:

Code:
on *:SOCKOPEN:*:{
  var %sockname = $sockname
  if ($input(A socket named " $+ %sockname $+ " has opened. Would you like to close it?,wy,Socket Opened)) {
    sockclose %sockname
    if ($input(Socket " $+ %sockname $+ " has been closed.,io,Socket closed)) { return }
  }
}


Re: Closing Sockets #27174 31/05/03 09:03 PM
Joined: Jan 2003
Posts: 3,012
KingTomato Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Sounds like they want all the comforts of ZonaAlarm in their own mirc--heh


-KingTomato