mIRC Home    About    Download    Register    News    Help

Print Thread
#150680 06/06/06 09:50 PM
Joined: Mar 2004
Posts: 96
G
Gremel Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Mar 2004
Posts: 96
I am tryign to make a on PING script that will send a message to the person who pinged me, but do nothing when a server pings me. I can't seem to figure it out.

If you could, set it up for so that it does two random names, nick1 and nick2 for example, and then if neither of these match, perform a ison to the channel of #Santharia and #Salitonia , using the && part of a if , if the nick being on these channels, sending them a message. If the nick isn't on these two channel, then ignore the ping entirely.

Is this possible? All I've been able to do is get a response form the serve when it pings me. frown

#150681 06/06/06 09:59 PM
Joined: Dec 2002
Posts: 417
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Try this you can find it in the mIRC help file under on ctcpreply

on 1:CTCPREPLY:PING*:/echo $nick replied to my ping!




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
#150682 06/06/06 10:02 PM
Joined: Dec 2002
Posts: 204
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Dec 2002
Posts: 204
A.F.A.I.K. - the on ping/pong event is just for servers
to reply to others you would need to listen to CTCP's I believe, and reply to them with ctcp's. try looking at the mirc help file for ctcp events (/help ctcp).

another person could prob help with the coding, cause whenit comes to coding iI really bite the big one smile


edit: sorry posted at the same time - dont mind mine

Last edited by keeker; 06/06/06 10:04 PM.

keek: Scots - intr.v. keeked, keekĀ·ing, keeks
To peek; peep.
#150683 06/06/06 10:10 PM
Joined: Mar 2004
Posts: 96
G
Gremel Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Mar 2004
Posts: 96
CTCPREPLY only works if I am the one doing the pinging. I am trying to set it up so when someone pings me, it replies.

#150684 06/06/06 10:13 PM
Joined: Mar 2004
Posts: 96
G
Gremel Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Mar 2004
Posts: 96
I'll take a look at that section Keeker, thanks, though I am not sure if the way I wish to reply can be done CTCP's.

#150685 06/06/06 10:18 PM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
Quote:
If you could, set it up for so that it does two random names, nick1 and nick2 for example, and then if neither of these match, perform a ison to the channel of #Santharia and #Salitonia , using the && part of a if , if the nick being on these channels, sending them a message. If the nick isn't on these two channel, then ignore the ping entirely.


try this
Code:
ctcp *:ping:*:{
  if ($nick == Tom) || ($nick == Harry) {
    if ($nick ison #Santharia) && ($nick ison #Salitonia) {
      msg $nick you are $nick and are in both  #Santharia  and  #Salitonia
    }
  }
  else halt
}


either one person or the other, in BOTH channels
other wise it stops, this also means anyone else pings you they will not get a reply.

#150686 06/06/06 10:26 PM
Joined: Mar 2004
Posts: 96
G
Gremel Offline OP
Babel fish
OP Offline
Babel fish
G
Joined: Mar 2004
Posts: 96
Thanks Mike.

I figured it out myself, but didn't know of the halt bit. I'll put that in on my script, though if the server doesn't get a response to its ping, will it disconnect me?

#150687 07/06/06 12:41 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
/help on ping
Quote:

on PING/PONG

The on PING event triggers when a server sends you a PING message to see if you're still connected.

The on PONG even triggers when you receive a PONG reply from the server after sending it a ping.


Format: on <level>:PING:<commands>
Example: on 1:PING:/echo -s $nick just PING'd me!

Examples

on 1:PING:/notice $me Wake up! The server is PINGing you: $1-

This triggers when the server pings you. The $1- parameters hold the ping message.

on 1:PONG:echo pong reply: $1-

This triggers when the server replies to your ping.

Note: You can't use this to intercept /pings to your own nickname, this is used internally by mIRC.


so the short answer is No

#150688 07/06/06 01:38 AM
Joined: May 2005
Posts: 449
Fjord artisan
Offline
Fjord artisan
Joined: May 2005
Posts: 449
The ON PING event is different from using ctcp *:ping:*:{. The first is only used for pings to the server, and the second is for responding to pings from other users. If you put a haltdef in ctcp *:ping:*:{, it won't halt pings back to the server, since this event doesn't deal with the server. It will just stop mIRC from pinging the person back who pinged you.

Last edited by bwr30060; 07/06/06 01:39 AM.
#150689 07/06/06 02:46 AM
Joined: Dec 2002
Posts: 1,245
M
Hoopy frood
Offline
Hoopy frood
M
Joined: Dec 2002
Posts: 1,245
I think you need to go back and read my posts a little closer


Link Copied to Clipboard