mIRC Homepage
Posted By: PhantasyX Broader "on INPUT" - 07/06/05 01:36 AM
I think I have already started a topic like this? not for sure, maybe mebe not.

but I would like the 'on input' event mcbobber to be broader. It only covers DCC Chat, FileServ, Regular Chat, Window, and PM. but wheres the catcher for commands executed from remote script files? According to "@Debug" even commands executed in script files are inputs "->" and I would very much like to see this so I can even catch commands before they get put in.

I guess a small example using a kick revenge.

"** You were kicked from #kingdom -by- Overlord"
;Yay! Kicked! Now here is what shows up in @debug.

(Input from script) -> [server] JOIN :#kingdom
(Input from script) -> [server] KICK #kingdom Overlord Die!

These are still inputs from a remote script,
just not covered in on INPUT

So basically, I think on INPUT should cover everything sent to the server even if you didn't enter it manually


Anyone see what I am saying? I sometimes have a hard time explaining.
Posted By: Hrung Re: Broader "on INPUT" - 07/06/05 02:04 AM
Only commands that aren't built-in or aliased go to the server. Join does, because it's a server command. /echo does not, because it is something that mIRC does locally. I am unsure if you want an event for every /command used, or just the ones that are sent to the server. If it is the latter, you can always write a /debug -i @hiddenwindow alias to call alias for everything that would get sent to the @hiddenwindow. Not exactly the best solution, though, as it triggers for every single line sent to/from the server, and to my knowlege, you can't halt the line being sent. You can tell what is sent out by the fact that the $1- has -> instead of <-. I believe that the former, an event that triggers for every command used, has been suggested before.
Posted By: PhantasyX Re: Broader "on INPUT" - 07/06/05 05:02 AM
I just want commands sent to the server
be able to catch with "on INPUT"


Quote:

write a /debug -i @hiddenwindow alias to call alias for everything that would get sent to the @hiddenwindow

(I believe the custom mIRC version uses debug) ;x

Would be mutch simplier if you specify
on *:INPUT:*:/:{
if ($command == fart) { echo -a FART COMMAND USED! | halt }
elseif ($command == kick) { echo -a Do.what.ever.when.kick.command.is.called | halt }
aline @debug $1-
}

(just an example of what I mean)

I know you could use /debug -i @debug debug2
alias debug2 { if (*FART* iswm $3-) { halt } | aline @debug $1- }

but having to make sure /debug is currently on, @ to have a window open. Just be a little more hassle then
just to have on *:INPUT:*:/:{ or so.

the ":/:" is just an example.

Wonder if I scripted these example write, that'd suck if I didn't. xd
Me & my newbish ways to make things complicated for other ;x
Posted By: mIRCManiac Re: Broader "on INPUT" - 07/06/05 05:06 AM
Could leave ON INPUT as-is and have ON COMMAND?
Now that would be cool IMO smile
Posted By: PhantasyX Re: Broader "on INPUT" - 07/06/05 05:23 AM
Quote:
Could leave ON INPUT as-is and have ON COMMAND?
Now that would be cool IMO smile


Good idea? smirk
Posted By: Armada Re: Broader "on INPUT" - 07/06/05 10:58 AM
I wouldnt mind seeing this, althought i wouldnt use it right away but later on I might think of something, but why would you need it?
Posted By: DaveC Re: Broader "on INPUT" - 07/06/05 12:24 PM
Quote:

I know you could use /debug -i @debug debug2
alias debug2 { if (*FART* iswm $3-) { halt } | aline @debug $1- }

but having to make sure /debug is currently on, @ to have a window open. Just be a little more hassle then
just to have on *:INPUT:*:/:{ or so.


Just a few things...
You dont need to aline to the @debug window as u showed, the idea is you use /RETURN xxxx and xxxx gets displayed in the @debug window

Also u can use NUL instead of a window name /debug -i nul debug2

And then just take action based apon the command that was issued, Doesnt help ya tho that the command stil goes out <groan>, you can always disconnect LOL
© mIRC Discussion Forums