mIRC Home    About    Download    Register    News    Help

Print Thread
#170050 02/02/07 02:52 AM
Joined: Feb 2007
Posts: 2
L
Bowl of petunias
OP Offline
Bowl of petunias
L
Joined: Feb 2007
Posts: 2
Hey,

I currently operate a large private server for a volunteer group and need to monitor connects, disconnects, and other events that happen from users and other operators. My problem is that all these oper notices go to my status window and I am looking for a quicker way noticing stuff like HelpOps and other command useage that are drowned in all the connection and disconnect notices. To remedy this I am looking for a way to get custom windows that keeps track of the users who connect, disconnect, commands, etc that get sent as server notices to my status window then redirect them to an appropriate custom window. Let me explain further..

I want to take lines that go to my status window such as these:

[13:49:48] -subdom.domain.com- *** Notice -- Client connecting on port ####: Nick (Nick@address.net) [clients]

[13:53:19] -subdom.domain.com- *** Notice -- Client exiting: Nick (Nick@address.net) [Quit: Quit Message.]

[21:46:23] -subdom.domain.com- *** HelpOp -- from Nick (HelpOp): Test

and move them to the windows @Connections for the connecting and exiting clients, @HelpOps for the HelpOp commands and text. Furthermore, there are other commands for like Glines, Local Kills, Oper commands and other things that I would like sent to their own window.

Is this something that is possible and feasable. If so, can someone point me in the right direction on getting this done. I appreciate it!


Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Well basically ...

To stop messages from going to the status window, you need to monitor the raw events and halt the event. You can also say echo @Connections then halt. This will echo to your window and not show in status.

In these raw events, $numeric is the RAW event, $rawmsg will show you the whole message for that raw event. $1- will work for things, $nick can work as well. Depends on the event.

Code:
raw *:*:{
if ($numeric == 301) {
echo @connections $1-
halt
}
elseif ($numeric == 302) {
echo @connections $rawmsg
halt
}
}


Im not using real raw events as examples. Just giving you the basic idea. You can make a test to see what the different events raw numerics and message style is.

raw *:*:{
echo @test $1-
echo 2 @test $numeric $rawmsg
}

Same goes for other events.

on *:connect:
on *:notice:#:

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Those messages look like SNOTICES. You simply have to use snotice events to reroute snotices to the location of your choosing.

Example:

Code:
on ^*:SNOTICE:& & & client connecting *:snotice @Client $1-
on ^*:SNOTICE:& helpop & from *:snotice @HelpOp $1-

alias snotice {
  ;$1 = @window, $2- = text
  if (!$window($1)) window -n $1
  aline -hpi3 $1 $timestamp $2-
  haltdef
}

(untested code)

Just duplicate the SNOTICE event lines, and change the match text for each different snotice you want to capture.

-genius_at_work

Joined: Feb 2007
Posts: 2
L
Bowl of petunias
OP Offline
Bowl of petunias
L
Joined: Feb 2007
Posts: 2
Excellent Excellent. That works perfectly! I appreciate it smile


Link Copied to Clipboard