Here's a basic idea without many options or features.
*Untested
menu nicklist {
Message Catcher
.Add Nick:mcnick add $address($$1,2)
.Remove Nick:mcnick rem $address($$1,2)
}
menu channel,query {
Message Catcher
.Add Address:mcnick add $$?="Enter address:"
.Remove Address:mcnick rem $$?="Enter address in the form of *!*@host.com:"
}
alias mcnick {
if ($left($2,4) != *!*@) { echo -a Error adding address. Address format needs to be in the form of *!*@host.com . | return }
if ($1 == add) { write msgcatcher.txt $$2 }
elseif ($1 == rem) { write -ds $+ $$2 msgcatcher.txt }
}
on *:text:*:*: {
if ($read(msgcatcher.txt,snt,$address($nick,2))) {
if (!$window(@MsgCatcher)) { window @MsgCatcher }
echo -tlbfmrc @MsgCatcher < $+ $nick $+ > $1-
}
}
on *:action:*:*: {
if ($read(msgcatcher.txt,snt,$address($nick,2))) {
if (!$window(@MsgCatcher)) { window @MsgCatcher }
echo -tlbfmrc @MsgCatcher * $nick $1-
}
}
on *:notice:*:*: {
if ($read(msgcatcher.txt,snt,$address($nick,2))) {
if (!$window(@MsgCatcher)) { window @MsgCatcher }
echo -tlbfmrc @MsgCatcher < $+ $nick $+ > $1-
}
}
Note that the echo lines such as:
echo -tlbfmrc @MsgCatcher < $+ $nick $+ > $1-
...are what you would change to match a user's theme settings. You might also want to include where the text came from, such as possible including the network name. And if the text is from a channel, include the channel name. If not from a channel, mark as being from a query. These are just some options you can add. There are others you might think of as well. Like I said, this is just a very basic example.
Also, this uses the mask *!*@host.com. If you want more control over that kind of option or to use multiple types of hosts, you'll need to adjust it for that. But considering this is just for messages and not for any kind of protection, this should be fine.
This will track any nick that has the same address match, so although it doesn't keep track of nick changes, it will still know if it's the same address.
Notes on mask choices-
*!*@host.com (address mask 2) is a commonly used one for most things.
Most hosts are set up similar to 000-000-000-000.somehost.com, where those numbers are the IP. This does, of course, vary from host to host, but most are somewhat similar. This mask will match anyone with the same IP in that host address, which should be only the person you choose. However, the IP can change, so you may have to add multiple addresses for a person to cover all of the IP addresses they use. And, if the person's host doesn't resolve and shows as only the IP (such as *!*@000.000.000.000), then you'd need an address added for that also.
*!*@*.host.com (address mask 4) is similar the address mask 2, but is less strict.
This mask is generally not a good choice, but does have some benefits... especially when this script isn't dealing with security. It will match any address from host.com regardless of the IP. You still have to include an address for the IP (*!*@000.000.000.000) as well as the one for the host, but you won't have to change the host address if the IP changes. You'll only have to change the IP part. That gives you half the number of addresses per person, which is useful. The downside here is that multiple people in a channel may have the same host and it won't distinguish between them.
*!*identd@host.com (address mask 1) is useful to find a specific person who doesn't change their identd.
This mask is slightly more strict than address mask 2 in that it also checks the identd to make sure it matches. Because most people don't change that, it can be helpful to prevent the possibility of a match if someone else ends up with the same host.com part of the address. Like mask 2, you still have to put in any matching addresses if the IP changes.
There are other masks as well that can get even more strict, but it is unlikely you'll need any of the others. Of course, you could consider something like nick!*@* to match the nick regardless of the address, but that doesn't track anything besides the nick, or even nick!*identd@* to match just nick and identd without checking the host. Both might be okay for what you're doing here, but again, the nick is checked, so it won't look for alternate nicks.
If you decide to change the mask type from 2 (what is in this script), you'll need to adjust the script to handle it. Right now, it only handles mask 2.