mIRC Home    About    Download    Register    News    Help

Print Thread
#142741 19/02/06 03:55 AM
Joined: Oct 2003
Posts: 10
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Oct 2003
Posts: 10
Hi everybody !

I was wondering if there's a way to open a window via menus for onotice chat(while being opped of course).
Any ideeas ?

I know there are several mirc-scripts that allow that, but I'd like to use simple mIRC with this "addon" only.

Any help is appreciated.
Thanks !

#142742 19/02/06 05:44 AM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If you are talking about the /onotice command in mIRC, then it would be difficult to make an onotice chat window. That is because the /onotice command doesn't actually send an onotice. Rather, it goes through all the users on a channel and if they are an @op, it sends them a PRIVATE notice. A true onotice is done with a command like this: /notice @#channel message. And the server sends the notice as a CHANNEL notice to all the ops on the channel. If you aren't set on using the /onotice command, you can use this script instead:

Code:
menu channel {
  ONotice Chat $chan:ONoticeChat $chan
}
menu @ON.* {
  Close:window -c $active
}

alias ONoticeChat {
  ;1=channel
  var %win = $+(@ON.,$$1)
  if (!$window(%win)) {
    window -e %win /ONChat
    aline -hpi %win $timestamp ONotice Chat for channel: $1
    aline -hpi %win $timestamp -=-=-=-=-=-
  }
  else window -a %win
}

alias ONChat {
  if ((@ON.* !iswm $active) || ($1 == $null)) return
  var %onchan = $gettok($active,2,46)
  .notice @ $+ %onchan $1-
  aline -hpi $active $timestamp < $+ $me $+ > $1-
}

on *:NOTICE:*:#:{
  if (@* !iswm $target) return
  var %win = $+(@ON.,$chan)
  if (!$window(%win)) return
  aline -hpi %win $timestamp < $+ $nick $+ > $1-
  [color:red];haltdef[/color]
}


The option to open an ONotice chat window for a channel is in the popup menu for each channel. The /ONChat command is used to send a (real) onotice message to the channel corresponding to the active ONChat window. /ONChat can't be used anywhere else. The window will only catch real onotices (as described above), and only when the ONChat window is open. If the ONChat window for that channel is not opened, then the onotice is displayed regularly.

The red line above lets you choose whether the onotices are displayed in the channel window.
To show the onotices, the line should be: ;haltdef
To hide onotices while the ONChat is open, the line should be: haltdef
Note the missing ; in the second example.


In order for this script to catch onotices from other users, they must use the /notice @#channel message format. The script should be able to communicate with other users who have the same script.

-genius_at_work

#142743 19/02/06 06:57 AM
Joined: Oct 2003
Posts: 10
E
Pikka bird
OP Offline
Pikka bird
E
Joined: Oct 2003
Posts: 10
Thank you very much !
This is exactly what I was looking for smile

Also thanks for explaining those basic concepts(i guess) about onotice & the script itself !

Peace !


Link Copied to Clipboard