|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 426 |
Wahoo. Searched for it, and it appeared this hasn't been raised before.
I would like to see an on PRIVMSG feature implemented alongside the on TEXT/ACTION/NOTICE etc.
This would be usefull in that we could script certain events to run regardless of being in a query, or a channel. Thus allowing protection scripts to run better, and other such things.
It would also be a handy way to get the one script to run on a TEXT and ACTION event.
Of course, on TEXT/ACTION etc would still be able to be used, but by giving us an on PRIVMSG event, we could make generic scripts run regardless of where the text is coming from, and going too.
If you can see any negative side affects, please let me know.
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
Actually, an On PRIVMSG event would only cover TEXT/ACTION/CTCP while On NOTICE still covers NOTICE events... but would also have to cover CTCP Replies to be consistant, which would cause a problem as On NOTICE already exists and shouldn't cover CTCP Replies. I've seen a better suggestion, where the RAW prefix would handle named events including PRIVMSG, NOTICE, etc. - Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 426 |
raw PRIVMSG:*:{} does indeed look to be a better solution.
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: May 2003
Posts: 2,265
Hoopy frood
|
Hoopy frood
Joined: May 2003
Posts: 2,265 |
on *:TEXT:*:?:{ on *:NOTICE:*:?:{ on *:ACTION:*:?:{ when you have them there is no point in what your suggesting
new username: tidy_trax
|
|
|
|
Joined: Dec 2002
Posts: 32
Ameglian cow
|
Ameglian cow
Joined: Dec 2002
Posts: 32 |
actually the on raw works but it's not great I'd like on raw to interpret tokens in the same numerical order as you'd see them with a socket. mirc does some preformatting to the raw. probably a tall order but I'd like to be able to seam raw scripts from a bot to a script without having to rearrange the $'s and gettoks
It's only called insanity if you're poor. I stay alive to spite those that wish me dead.
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
It can't be used.
/raw privmsg is already a command.
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
(he meant the RAW event prefix)
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
on 1:TEXT:*:*: { .signal privmsg $iif($target == $me, $nick, $chan) $nick $1- } on 1:NOTICE:*:*: { .signal privmsg $iif($target == $me, $nick, $chan) $nick $1- } on 1:ACTION:*:*: { .signal privmsg $iif($target == $me, $nick, $chan) $nick $1- }
on 1:SIGNAL:privmsg: { var %target = $$1, %nick = $$2, %msg = $$3- ; code here }
-KingTomato
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
And we return to codemastr & Nimue's Fall Through. On *:TEXT:*:*:&On *:NOTICE:*:*:&On *:ACTION:*:*: { do stuff }- Raccoon
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 426 |
It would seem that some people mis-interpreted what I was meaning.
I know on NOTICE events are seperate.
I simply just meant an on PRIVMSG function that would allow us to call a script to run on a PRIVMSG, not on NOTICE, or CTCP, or DCC.
Using signals is an interim solution.
Being able to play with PRIVMSG all in the one hit without having to signal it, or code seperate aliases to apply for different events would make (in my opinion), processing text much simpler.
In addition to this, I'd also suggest $privmsg for determining the type.
In addition, a method in which we can call all the data returned on a privmsg. address, channel, and if it's an action.
Something like
$privmsg(action) - determines if it's an action. !$privmsg(action) is used for plain text $privmsg(address) - retrieves the address sent on a privmsg $privmsg(type) - retrieves the type, ie, a channel, or a private query msg.
If you can improve those, feel free. That was simply just a stab in the dark.
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: Feb 2003
Posts: 2,812
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 2,812 |
I simply just meant an on PRIVMSG function that would allow us to call a script to run on a PRIVMSG, not on NOTICE, or CTCP, or DCC.
I don't know if you're aware of this but an ACTION, CTCP and DCC are all PRIVMSG. a CTCP Reply is also a NOTICE.
Well. At least I won lunch. Good philosophy, see good in bad, I like!
|
|
|
|
Joined: Apr 2003
Posts: 426
Fjord artisan
|
OP
Fjord artisan
Joined: Apr 2003
Posts: 426 |
Bleh, no I didn't. Now I see what you meant.
*neophyte smacks his forhead
-------- mIRC - fun for all the family (except grandma and grandpa)
|
|
|
|
Joined: Dec 2002
Posts: 2,985
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,985 |
ON *:TEXT,ACTION,NOTICE,KICK:*:*: { is the best proposal I reckon. ON *:*:*: { is good if you want to make mIRC react to everything.
It's short, clean and doesn't duplicate anything. Why change ON to RAW? It makes no sense at all. As I said (meant) before PRIVMSG is already defined as the event that sends text and is covered by ON TEXT already and RAW PRIVMSG is a remote command in mIRC.
|
|
|
|
|