mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2024
Posts: 9
M
Mairel Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2024
Posts: 9
Hi guys, basically I have a script that makes all notices appear in a custom window called @Notice.

How can I remove a single notice from the @Notice window, as soon as I receive it, if it contains a certain word?

I tried to delete a notice that contained the phrase "try this new feature", with something like this:

on *:NOTICE:*try this new feature*:*: { /dline -s @Notice 1- }

aaaand it didn't work of course cool any help?

Joined: Jan 2012
Posts: 337
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 337
It will be easier for you to initially not record a notice/message containing certain words than to later search for and delete this saved string in the window.

Try using this script code instead of your script:
Code
on *:NOTICE:*:*:{
  if (*try this new feature* iswm $1-) { return }
  if (!$window(@Notice)) window @Notice
  aline -p @Notice $timestamp $1-
}


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Dec 2024
Posts: 9
M
Mairel Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2024
Posts: 9
You're right. Your method definitely makes more sense.

I tried the script and it works, and I guess I just need to add more identical lines one below the other, with different words, in a row like this:


if (*try this 2* iswm $1-) { return }
if (*try this 3* iswm $1-) { return }


Just to add more words if needed.

Before changing my script with this, I have to ask you just a few things please: could you add a nicks exception service? I need to be able to add nicks of my choice to the list, so that the notices of those nicks do not appear in the @Notice window. This is useful for separating people's notices from those of NickServ, ChanServ, MemoServ and so on, since I only need those in the active window.

Second thing: I would like the @Notice window to light up like before when a notice arrives in that window, now it doesn't happen anymore.

Last thing: how can I set a separator in the @Notice window for the various notices?

At the moment they look like this for example:

11:30:24 Notice1
11:31:45 Notice2

With more than one notice it becomes a bit confusing, can I do something like this for example?

11:30:24 Notice1
-
11:31:45 Notice2

Joined: Jan 2012
Posts: 337
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 337
Quote
could you add a nicks exception service? I need to be able to add nicks of my choice to the list, so that the notices of those nicks do not appear in the @Notice window. This is useful for separating people's notices from those of NickServ, ChanServ, MemoServ and so on, since I only need those in the active window.
If the number of nicknames is small, within reasonable limits, then you can add this line: if ($istok(NickServ ChanServ MemoServ,$nick,32)) { return }
Otherwise, it would be better to save the nicknames in a separate text file and use "$read()".

Quote
I would like the @Notice window to light up like before when a notice arrives in that window, now it doesn't happen anymore.
You can add the "-h" switch to the "aline" command to enable window highlighting when you write a new line: aline -hp @Notice $timestamp $1-

Quote
how can I set a separator in the @Notice window for the various notices?
You can add an additional command "aline" to the code to write a string that will contain a certain separator character: aline @Notice -


As a result, after making changes, the script code may look like this:
Code
on *:NOTICE:*:*:{
  if ($istok(NickServ ChanServ MemoServ,$nick,32)) { return }
  if (*try this new feature* iswm $1-) { return }
  if (!$window(@Notice)) window @Notice
  aline -hp @Notice $timestamp $1- | aline @Notice -
}


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Dec 2024
Posts: 9
M
Mairel Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2024
Posts: 9
As for the second thing, I realized that it could be because of the mIRC "Do not disturb" feature, which was accidentally checked. I know it works for private messages, I don't know about the flashing windows

Joined: Dec 2024
Posts: 9
M
Mairel Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2024
Posts: 9
Regarding this:


if ($istok(NickServ ChanServ MemoServ,$nick,32)) { return }


Should I just add all the nicks next to each other separated by a space, or can I just add another line of this code below, with more nicks, in case it gets too long (I don't think that will happen, just to see if it can be done this way)?

Like:


if ($istok(NickServ ChanServ MemoServ Try1,$nick,32)) { return }
if ($istok(Try2 Try3 Try4,$nick,32)) { return }

Joined: Jan 2012
Posts: 337
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 337
Yes. It will work in both cases. You can do it as you prefer, in one or several lines of code.
For a beginner script coder this is normal and will be the simplest and most understandable solution in the order of actions :-)


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Dec 2024
Posts: 9
M
Mairel Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2024
Posts: 9
Ok, trying it works well, but I thought about one thing: how does it work if I have another nickname connected from the same mIRC? For example, if I have the nicknames Hi1 and Hi2 connected in the same channel, and I receive a notice that appears in the @Notice window, how can I understand to whom of the two nicknames the notice is addressed? Is it possible to make the nickname to which the notice is sent appear in some way? Like:

"my nickname" "nick of the person who sent the notice" "notice messages".

This way it should look like this:

Hi2 - Mairel - "I'll wait for you in my channel in an hour!"

Joined: Jan 2012
Posts: 337
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 337
Quote
if I have the nicknames Hi1 and Hi2 connected in the same channel, and I receive a notice that appears in the @Notice window, how can I understand to whom of the two nicknames the notice is addressed? Is it possible to make the nickname to which the notice is sent appear in some way?
You can use the identifiers "$me" and "$nick", which return recipient's your nickname and the sender's nickname of the notice.
They need to be added before the message identifier "$1-" in this line of code: aline -hp @Notice $timestamp $me - $nick :: $1-


In full code it will look like this:
Code
on *:NOTICE:*:*:{
  if ($istok(NickServ ChanServ MemoServ,$nick,32)) { return }
  if (*try this new feature* iswm $1-) { return }
  if (!$window(@Notice)) window @Notice
  aline -hp @Notice $timestamp $me - $nick :: $1- | aline @Notice -
}


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Dec 2024
Posts: 9
M
Mairel Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Dec 2024
Posts: 9
That fixes the problem. I'm trying it out and if any unexpected issues arise I'll update the thread. Anyway, thanks for the support Epic, 10/10


Link Copied to Clipboard