mIRC Home    About    Download    Register    News    Help

Print Thread
Help #266735 25/01/20 02:55 PM
Joined: Jan 2020
Posts: 7
V
violeta Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
V
Joined: Jan 2020
Posts: 7
Hello!
I need a little help because I don't understand mirc to explain more clearly here what I did:

Code
ON *:JOIN:#: {
set %ip *!*@203.212.27.190
if ($address($nick,2) == %ip) { /msg  mynick <message-test>  }
}


..and the result is that as the apex in question appears on the channel, I get a PM with the text
I tested it with an ip and it works.

So now I need:

Add a new ip to get notified.
In place of , the nickname that automatically logs the ip will be released automatically.
Since it has not been tested with multiple ip, I do not know if a new PM will be received for each individual ip and, if it can be in one window for all, or possibly in Status, where the info about the added Nicknames on Notify is received.

I did not explain it very difficult ...

Re: Help [Re: violeta] #266741 25/01/20 08:15 PM
Joined: Jan 2004
Posts: 1,282
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,282
You can use $me to always be your own nick. The method that differs as little as possible from your method would be where %ip contains mainy addresses
but you must /set the %ip variable elsewhere then have the event be like:

elsewhere: /set %ip *!*@203.212.27.190 *!*@123.123.12.123 *!*@321.321.32.321
Code
ON *:JOIN:#: {
  if ($istok(%ip,$address($nick,2),32)) {
  /msg  $me <message-test>
  var %a $findtok(%ip,$address($nick,2),1,32)
  set -s %ip $deltok(%ip,%a,32)
  }
}

You can remove the -s if you don't need to see how many IP remain in the list

Re: Help [Re: violeta] #266758 28/01/20 05:00 AM
Joined: Jan 2020
Posts: 7
V
violeta Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
V
Joined: Jan 2020
Posts: 7
You're a great maroon, now I have this:

Code
ON *:JOIN:#sex: { 
  if ($istok(%ip,$address($nick,2),32)) {
  /msg  $me $timestamp 4 $nick 10 с IP: 4 $address 10 влезе в канал: $chan
  var %a $findtok(%ip,$address($nick,2),1,32)
  set %ip  *!*@t3vik5.ip.btc-net.bg $deltok(%ip,%a,32)
  }
}


1. Can it be done and when it goes offline?
2. The other thing that is a little annoying is that it shows a double result..

[img]http://mesm.snimka.bg/other/my-test.5164802.39240304.big[/img]

Re: Help [Re: violeta] #266759 28/01/20 05:41 AM
Joined: Jan 2004
Posts: 1,282
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,282
I do not understand your question #1

As for the double result, that's because you ask it show $nick then $address
The $address looks like nick!userid@hostname so if you want to have it be shorter, you can alter it.

If you want userid@hostname change $address to
Code
 $gettok($address,2-,33)

if you want just the portion following the @ then change $address to
Code
$gettok($address,2-,64)

Re: Help [Re: maroon] #266762 28/01/20 07:14 AM
Joined: Jan 2020
Posts: 7
V
violeta Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
V
Joined: Jan 2020
Posts: 7
Sorry maroon Google translate ... I'll try again ... blush
The same code as ON *:QUIT:#sex: { .....
Thanks for your patience!

I'll try double-serving and post if it's useful to others smile

Re: Help [Re: violeta] #266764 28/01/20 09:20 AM
Joined: Jan 2004
Posts: 1,282
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,282
The ON QUIT event does not have a channel attached to it, so if you are in more than 1 channel, you must first verify if the person was in the channel being monitored.

Code
ON *:QUIT: { 
  if (!$nick(#channelname,$nick)) return

  same code as in the JOIN event goes here

}

Re: Help [Re: maroon] #266766 28/01/20 11:08 AM
Joined: Jan 2020
Posts: 7
V
violeta Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
V
Joined: Jan 2020
Posts: 7
Is this what you mean:

Code
ON *:QUIT: { 
  if (!$nick(#sex,$nick)) return

  ON *:JOIN:#: {
  if ($istok(%ip,$address($nick,2),32)) {
  /msg  $me $timestamp 4 $nick 10 с IP: 4 $address 10 влезе в канал: $chan
  var %a $findtok(%ip,$address($nick,2),1,32)
  set %ip *!*@t3vik5.ip.btc-net.bg *!*@evt5r8.ip.btc-net.bg $deltok(%ip,%a,32)
  }
}

}


I get this: crazy
[13:01:45] * ON Unknown command
[13:02:15] * ON Unknown command
[13:02:20] * ON Unknown command
[13:02:26] * ON Unknown command
[13:02:27] * ON Unknown command

Re: Help [Re: violeta] #266767 28/01/20 04:08 PM
Joined: Jan 2004
Posts: 1,282
maroon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,282
Put the code that's IN the JOIN event, not put the ON JOIN itself there too.
Take out the ON JOIN line from within ON QUIT, and also take out the matching end curly brace too.

If you want to be alerted when people QUIT, you may also wish to also be alerted when they click to close the channel window without quitting from the network too. The syntax to handle the PART event is the same as for the JOIN event. You would copy the entire ON JOIN event below it, then change :JOIN: into :PART:

But only make 1 change at a time, to be certain each change is correct. While the remote editor is open, click in the upper right corner on the checkmark within the circle so it verifies if your matching curly braces are correct.

Re: Help [Re: maroon] #266769 29/01/20 05:04 AM
Joined: Jan 2020
Posts: 7
V
violeta Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
V
Joined: Jan 2020
Posts: 7
Thank you very much maroon you are great!

I put up ready codes, if they are helpful to someone else.

[Linked Image from media.snimka.bg]

Code
-----------------------------------------------------------
ON *:JOIN:#: {
  if ($istok(%ip,$address($nick,2),32)) {
  /msg  $me $timestamp 4 $nick 10 with IP: 4 $address 10 JOIN: $chan
  var %a $findtok(%ip,$address($nick,2),1,32)
  set %ip *!*@t3vik5.ip.btc-net.bg *!*@t3dsg7.ip.btc-net.bg $deltok(%ip,%a,32)
  }
}
------------------------------------------------------------
ON *:QUIT: { 
  if (!$nick(#sex,$nick)) return
  if ($istok(%ip,$address($nick,2),32)) {
  /msg  $me $timestamp 4 $nick 10 with IP: 4 $address 10 QUIT: $chan
  var %a $findtok(%ip,$address($nick,2),1,32)
  set %ip *!*@t3vik5.ip.btc-net.bg *!*@t3dsg7.ip.btc-net.bg $deltok(%ip,%a,32)
  }
}
--------------------------------------------------------------
ON *:PART:#sex: { 
  if ($istok(%ip,$address($nick,2),32)) {
  /msg  $me $timestamp 13 $nick 10 with IP: 13 $address 10 PART: $chan
  var %a $findtok(%ip,$address($nick,2),1,32)
  set %ip *!*@t3vik5.ip.btc-net.bg *!*@t3dsg7.ip.btc-net.bg $deltok(%ip,%a,32)
  }
}
---------------------------------------------------------------