mIRC Home    About    Download    Register    News    Help

Print Thread
#242121 18/06/13 04:37 AM
Joined: Jan 2012
Posts: 54
J
Babel fish
OP Offline
Babel fish
J
Joined: Jan 2012
Posts: 54
I want a simple... a very simple logging script, but I have no idea how I'd go about it.

I'll try to explain the concept of it, since I'm usually BAD at these things.

I want a script to tell me if I am logging a chat channel or pm window when it opens, without it logging that actual line. I log windows in a very specific way, so it'd be neat if I had some way of mIRC to go "You are not logging this window." when I open it, so I can turn logging on for said window.

It is to mainly make it so if I know someone that tends to use multiple nicks, I can set their log to ONE log instead of dozens of logs.

If someone could help this would be appreciated.

If can be a simple script just telling me the 'logging status' of the window when I open it. That's all I really need. "Logging is off." "Logging is on."

Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
This one for private msg windows
Code:
on *^:open:?:*:query -n $nick | echo -gce info $nick * Logging: $iif($window($nick).logfile,$v1,Off)

This for channels
Code:
on me:^*:join:#:echo -gce info # * Logging: $iif($window(#).logfile,$v1,Off)


The 'g' switch tells mIRC not to log that line.

Joined: Jan 2012
Posts: 54
J
Babel fish
OP Offline
Babel fish
J
Joined: Jan 2012
Posts: 54
Nice!

The one for channels works, but the one for queries doesn't seem to.

Edit: The one for query works, but only when someone opens a pm window with me. If I open a window with them, it doesn't trigger.

Edit 2: I figured out a snippet that I can use if I make a query window via making a query alias to do the check personally... but sadly it BREAKS the on open event since it uses the query command.
Code:
 alias query {
   !query $$1
   echo -g $1 * Logging: $iif($window($1).logfile,$v1,Off)
 }


That's what breaks the on open event. Now, I decided to add it into the Mouse options in mIRC itself so it doesn't MODIFY the query command...

Code:
/query $$1 | echo -g $1 * Logging: $iif($window($1).logfile,$v1,Off)


The sad part is, it works when I doubleclick a name to open a query window, but if I use /query to message someone, it doesn't do the event trigger.

I feel like I'm in a loop.

Last edited by Jaillynian; 18/06/13 04:58 PM.
Joined: Jan 2012
Posts: 54
J
Babel fish
OP Offline
Babel fish
J
Joined: Jan 2012
Posts: 54
Edit: Oops didn't mean to make this double post here.

Last edited by Jaillynian; 18/06/13 04:58 PM.
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
You should probably use the alias for when you open a query.

Just add a '!' to the on open line; on *^:open:?:*:!query -n $nick
Code:
on *^:open:?:*:!query -n $nick | echo -g $nick * Logging: $iif($window($nick).logfile,$v1,Off)



The ! prefix (!query) tells mIRC to use it's inbuilt command and not your alias to perform the task.

Joined: Jan 2012
Posts: 54
J
Babel fish
OP Offline
Babel fish
J
Joined: Jan 2012
Posts: 54
the alias didn't work at all is the problem

when I made the alias, typing /query just made it go 'durrrr?' and it broke the on open event since, saying 'incomplete code' or something.

Last edited by Jaillynian; 18/06/13 05:33 PM.
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
The alias didn't work for the script because the script sent "-n" as $1. wink

Joined: Jan 2012
Posts: 54
J
Babel fish
OP Offline
Babel fish
J
Joined: Jan 2012
Posts: 54
Ahh... so what should I do for querying people? with a /query command? D: make up a new query command? XD I guess I could do that. Train myself to do /q or something

... Unless /q is taken. D:

Last edited by Jaillynian; 18/06/13 05:43 PM.
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Use the alias that you posted before. it should work fine for when YOU open a query window.

Joined: Jan 2012
Posts: 54
J
Babel fish
OP Offline
Babel fish
J
Joined: Jan 2012
Posts: 54
/query: insufficient parameters (line 15, aliases.mrc)

I'm getting that with the on open event.

It's still referring to my query alias.

EDIT: I got it working. I deleted them both and put them back in and now it works. I dunno why. But it now works.

Last edited by Jaillynian; 18/06/13 05:45 PM.

Link Copied to Clipboard