mIRC Home    About    Download    Register    News    Help

Print Thread
#230398 07/03/11 08:02 AM
Joined: Mar 2011
Posts: 4
E
edunpa Offline OP
Self-satisified door
OP Offline
Self-satisified door
E
Joined: Mar 2011
Posts: 4
Hello, mIRC developers!

I would like to find out if it is possible to write a filter command and hopefully a Drag&Drop function.

/filterChat [nickname] [channel] [window] -keep

All [text/actions] including prior nicknames it was changed from will be transferred[copied & deleted], from the channel window to the window specified.

This can be applied to multiple nicks.

All text from the chatbox in the windows specified will be sent to the channel.

On the other hand, it could also be used to filter out unwanted text from the channel window.

Eitherway, the main channel window will appear cleaner and much simpler to chat in.

Background:
I have max 700+ chatters in my channel at times.
And things get messy when people try to chat with each other amongst all the "repeated text".

We can't control what the user sees at their end.
but if they have control, something like the filter chat function that I have just suggested, the makes it much easier to read and chat.

Thank you!

edunpa

Joined: Apr 2010
Posts: 969
F
Hoopy frood
Offline
Hoopy frood
F
Joined: Apr 2010
Posts: 969
THe problem with this is the simple fact many users use a different theme for the others. Ones with timestamps, extra spacing, etc.


You could write one for yourself, but there's no guarantee it will work for the next person.

Example:
Quote:

[01:01:01] UserA: this is my theme!
<01:01> UserB: This is my theme!
UserC: No timestamp in my theme
01/11@01:01 - I don't show my nick when I speak


I am SReject
My Stuff
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
You can do this fairly easily. It isn't much different from a relay script that copies text from one channel or network to another. It would just be changed to copy it from a channel to a custom window.

It wouldn't include drag/drop as that's really not any part of mIRC, though I suppose a DLL could manage to make that happen. And if you want to track prior nicks, you'd have to set that up as well. There are a variety of scripts already that have that function built in (usually for on join scripts). So you could basically just copy the functionality of those two kinds of scripts and put it into a single script.

Just keep in mind that if anyone uses a theme (as mentioned), they'd have to customize the script to have their theme show up in the custom window.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2011
Posts: 4
E
edunpa Offline OP
Self-satisified door
OP Offline
Self-satisified door
E
Joined: Mar 2011
Posts: 4
however, I can't apply the changes to the main channel window.
that's why I'm requesting it to be an added feature.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Here's a basic idea without many options or features.

*Untested
Code:
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:
Code:
    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.

Last edited by Riamus2; 07/03/11 04:11 PM.

Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Originally Posted By: edunpa
however, I can't apply the changes to the main channel window.
that's why I'm requesting it to be an added feature.


Right. Every user who cares about this would need a script to handle it.

I don't speak for Khaled and maybe he'll add this to his to-do list, but I honestly don't think it will be added to mIRC. It is something that is easily scripted and affects a relatively small number of people (people who care about it anyhow). Those two things significantly decrease the chance of it being added. But like I said, I don't know what Khaled will choose and he may consider adding that kind of feature some day. In the meantime, a script is a very easy alternative for any of your users who want it.


Invision Support
#Invision on irc.irchighway.net
Joined: Mar 2011
Posts: 4
E
edunpa Offline OP
Self-satisified door
OP Offline
Self-satisified door
E
Joined: Mar 2011
Posts: 4
Alright, thank you.

Joined: Mar 2011
Posts: 4
E
edunpa Offline OP
Self-satisified door
OP Offline
Self-satisified door
E
Joined: Mar 2011
Posts: 4
*bows* thank you!


Link Copied to Clipboard