mIRC Home    About    Download    Register    News    Help

Print Thread
#261140 06/08/17 12:41 AM
Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
I am trying to make a little script that will make your onotice and notices go to a separate window instead of the active window or status when and you can type a reply in that window. How would I get started?

Joined: Jan 2004
Posts: 1,949
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,949
Before making a scripting solution, I wanted to double-check that your problem isn't because of an unwanted setting checked.

In mirc-options/IRC
there's a group of 6 checkboxes on the right side, one of which is for notices. If notice is checked, mirc shows it in your active window instead of being where it "belongs". I just wanted to make sure you weren't wanting this scripting window because you have several channels open, and notices from each unrelated channel were following your cursor around instead of staying where they belong.

Also, in my experience the receiver can't tell the difference between receiving an onotice vs a normal notice, as the onotice command just figures out who's an op and sends the notice to them.

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
I want all of my notices to go to one window just for notices so it will be easier to read and answer.

Joined: Jan 2004
Posts: 1,949
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,949
try this for starters. If you don't want it muted from also showing the notice where it "belongs" then delete the "haltdef".

Code:
ON &^*:NOTICE:*:*:{
  if (!$window(@notices)) window -ez @notices
  aline -hp $color(notice) @notices $asctime([HH:nn:ss]) $nick -> $target $+ $network $+ : $1-
  haltdef
}

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
great that works how i want it to for the most part. Is there anyway to get to show /notice in the text box so I don't have to type it in every time when I want to answer the notice? Also when I answer the onotice with the command /onotice #channelname message it says I am not in the channel but it works correctly when i type /notice @#channelname message. Is there any way around that?

Thanks for your help. Also do you know if they have any type of classes online to learn this?

Joined: Jan 2004
Posts: 1,949
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,949
Code:
ON &^*:NOTICE:*:*:{
  if (!$window(@notices)) window -lez @notices
  aline -hp $color(notice) @notices $asctime([HH:nn:ss]) $nick -> $+($target,@,$network,:) $1-
  editbox @notices /notice $nick :
  haltdef
}

menu @notices {
  dclick:editbox @notices /notice $gettok($sline($active,1),2,32) :
}


This fills "/notice nick :" into the notices window. (For the 1st time you'll need to close @notices so it can re-open as a -l list window.) Note that it also fills the editbox when you double-click on that line in @notices. You may want to remove the line filling the editbox as each notice is received, since that creates the risk that person2 sends a notice while you're composing notice to person#1 and wiping out your text. At least it won't send the message to the wrong person instead of zapping it.

/onotice is simply a built-in short-cut by mirc to send a normal notice to all ops in the active channel. Since @notices isn't a channel, mirc has no way to know what channel you're referring to.

what you're doing is accidentally discovering a 2nd way to send notices to a group of people, and the receiver can tell the difference.

When you do "/onotice message", receivers cannot tell the difference compared to your doing a separate "/notice nick message" to each recipient, and they see $target as $me.

When you do /notice @#channelname message", the receiver sees target not as $me but as @#channelname. Different ircd's in the past have supported or not-supported different variations of targets, and they can neglect to support a target without warning and instead blab the notice to 100% of the channel. You should also be able to do @+#channelname to send the message to all ops+voices at the same time, and might also be able to send message to superop/protected ops with the & prefix with /notice &#channelname. You might have to use a clone to see which targets are received by the intended prefixes, and whether it also bleeds to be seen by 100% of the channel.

The code can be changed to fill the command as the sending target which could be @#channel but your mirc can't tell whether someone uses /onotice or send a specific notice to only you.

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
Code:
ON &^*:NOTICE:*:*:{
  if (!$window(@notices)) window -e @notices
  aline -hp $color(notice) @notices $asctime([hh:nn:ss]) $nick -> $+($target,@,$network,:) $1-
  editbox @notices /notice @ $+ $chan «[ $+ $opnick(#,0) $+ ]Secret OP Minx-o-gram»
  haltdef
}

menu @notices {
  dclick:editbox @notices /notice $nick  «Minx-o-gram» $gettok($sline($active,1),2,32) 
}


It is getting closer to what I want it to be. I use the top part to answer op notices and the double click to answer normal notices. The only problem I have is that when I double click the nick it doesn't include the nick it will just say /notice «Minx-o-gram» or if I remove the «Minx-o-gram» just /notice. I know there has to be some way to get this the way I want. I can do it in the pnp by pai script but that code is hard to understand.

Joined: Jan 2004
Posts: 1,949
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,949
Because you changed the dclick code to send /notice to $nick which is only filled during certain $event and double-clicking in a @custom window isn't one of them. Change $nick back to $gettok($sline($active,1),2,32)

If you tweak the @display, you might need to use something other than the 2nd word, or strip chevron symbols from it.

Also, I ended my edit with a colon because I haven't figured out how to end the editbox text with a space to separate it from the target of the nick, but since you have the minxogram label you won't need it, though you might in that case use $+ $chr(160) to fake the space.

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
it still doesn't work. Just shows /notice

wish I could figure this out.

Would and if then else statement work??

Joined: Jan 2004
Posts: 1,949
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,949

Code:
ON &^*:NOTICE:*:*:{
  if (!$window(@notices)) window -e @notices
  aline -hp $color(notice) @notices $asctime([hh:nn:ss]) $nick -> $+($target,@,$network,:) $1-
  editbox @notices /notice @ $+ $chan «[ $+ $opnick(#,0) $+ ]Secret OP Minx-o-gram»
  haltdef
}

menu @notices {
  dclick:editbox @notices /notice $gettok($sline($active,1),2,32)  «Minx-o-gram» to $gettok($sline($active,1),2,32) $chr(160)
}


If you're double-clicking on a line where the 2nd 'word' is the nick who sent you the message, this should put into the editbox:

/notice Clicked-on-Nick «Minx-o-gram» to Clicked-on-Nick  

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
Unfortunately that doesn't work either.

Joined: Jan 2004
Posts: 1,949
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,949
sorry, i didn't catch another change you made to what i posted. My earlier code created the @notices window using the -lez switches, and you changed it to -e. You can't select a line or double-click on it unless it's a listbox window, so your deleting the 'l switch is why nothing happens when you double-click. The 'z' switch is your preference, whether you want the notices window to appear at the far-right, and matters only when you're connected to 2+ networks. If you're needing to reply to messages on 2 networks, you'd need to change the script to display the $cid of the $network you're replying to, so you can switch to that when you reply.

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
ahhh now it is working.... i changed that because I couldn't see my own messages in the window.

Joined: Jan 2004
Posts: 1,949
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2004
Posts: 1,949
When you use /onotice or send to target @ $+ $chan it doesn't send to yourself nor trigger the on-notice event. If you do them in a #channel it shows the outgoing notice in the active window, but since you're doing it in a @custom it shows instead in Status Window

Code:
on *:INPUT:@notices:{ if ($1 == /notice) aline @notices me -> $2 $+ : $3- }

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
Thank You So Much for your help!!!

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
One more problem....

If the notice line is too long it won't go thru after a certain point. Though when it is not a listbox it will go all the way to the finish.

Joined: Jun 2017
Posts: 20
A
Angela Offline OP
Ameglian cow
OP Offline
Ameglian cow
A
Joined: Jun 2017
Posts: 20
Thanks! I found a script that I could modify with some of your code and it works exactly as I want it!


Link Copied to Clipboard