mIRC Home    About    Download    Register    News    Help

Print Thread
custom "ON"s (like the ON *:TEXT:*:#: { } ) #121320 26/05/05 07:56 AM
Joined: May 2005
Posts: 8
NightQuest Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: May 2005
Posts: 8
I suggest we make it where we are able to make Custon "ON" things
like the ON ^*:TEXT:*:*: { }
what if we want to make a custom thing that most people cant see? shocked
well as of now.. we can't but personally i would like to see this in futer versions smile

~NightQuest~

Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121321 26/05/05 08:45 AM
Joined: Apr 2003
Posts: 701
K
Kelder Offline
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
What else is there to trigger on? Alle irc related events are possible, either with on something or with RAW events.

If you want to run a custom trigger from a script or whatever, check the on signal (/help /signal) event trigger, maybe that's what you want?

If not, then please elaborate what you suggest, perhaps with some clear examples and an explanantion of the suggested syntax.

Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121322 26/05/05 11:22 AM
Joined: May 2005
Posts: 8
NightQuest Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: May 2005
Posts: 8
well some servers have more than just vho/+%@ and i would like to include those via "on"

eg. ON ^*:OWNER:*:#: { } etc.
and maybe have a section like the ALIAS in remotes:

EVENT(or whatever) $Owner {
blah blah blah
}

Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121323 26/05/05 02:04 PM
Joined: Mar 2004
Posts: 359
L
LostServ Offline
Fjord artisan
Offline
Fjord artisan
L
Joined: Mar 2004
Posts: 359
on owner
on deowner

those both work like on op, and use $opnick like on op.

Last edited by LostServ; 26/05/05 02:04 PM.
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121324 26/05/05 02:14 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
thats where signals come in handy rawcheck for if a mode isin rawtext then do a /signal -n mode $1-

on *:signal:mode: { do stuff here }

although you just do a on raw there too smirk


$maybe
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121325 26/05/05 07:57 PM
Joined: May 2005
Posts: 7
S
SilentShadow Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: May 2005
Posts: 7
OK... How about making custom operators? Something like

isowner

and possibly making the /window command allow full control over all windows, as I seemed to have some trouble altering a normal channel window smile

In any case, I'll still look into the Signals but they seem more like more raw work then I would like to do :P

-EDIT-
Also, is there a way to alter the raw connection between mIRC and the server?

Last edited by SilentShadow; 26/05/05 07:59 PM.
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121326 26/05/05 08:17 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
Quote:
OK... How about making custom operators? Something like

isowner


That operator exists already, but I like the idea.

Quote:
Also, is there a way to alter the raw connection between mIRC and the server?


Short answer: no.
Long answer: no, but you can write your own connection script using sockets to connect to irc and alter the data being sent through your sockets.


New username: hixxy
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121327 27/05/05 04:31 AM
Joined: May 2005
Posts: 7
S
SilentShadow Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: May 2005
Posts: 7
Ok, I have seen that isowner and ON OWNER/DEOWNER exists, but yet I have never seen them......

Perhaps my helpfile is old? *tries it out*

And another thing... Is there a way to say...listen on a certain port, and once a connection is made redirect that connection to another port?

-EDIT-

ok... they do exist, but they are not mentioned in the helpfile? And what about ON PROTECT/DEPROTECT and isprotect[ed]

Last edited by SilentShadow; 27/05/05 04:53 AM.
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121328 27/05/05 04:59 AM
Joined: May 2005
Posts: 8
NightQuest Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
Joined: May 2005
Posts: 8
me and silent-shadow have tooken some time and explored these, ON OWNER and ON DEOWNER exist, as he said what about protect?

we have tried on protect/on deprotect; nothing

i just thought it would be a nice feature and is there another place where i can learn about the on signals?
the help dosnt help much..

~NightQuest~

Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121329 27/05/05 11:45 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
Code:
on *:RAWMODE:#: { 
 ;$1 == the one who sets it, $3 == modes set, $4- == nick(s) affected
 if (-* iswm $3) && (a isin $3) { ;on Deprotect event }
 if (+* iswm $3) && (a isin $3) { ;on protect event }
}


$maybe
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121330 27/05/05 03:27 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Your script would trigger the 'deprotect' part when somebody does something like /mode #chan [color:red]-o+a nick nick[/color], when in fact this command should trigger the 'protect' part.

Also, $1 is not the person who sets the mode, that's $nick. $1- is modes and their parameters, so in the example above
$1 = -o+a
$2 = nick
$3 = nick
$1- = -o+a nick nick
That means you should change every instance of $3 to $1.

Last edited by qwerty; 27/05/05 03:32 PM.
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121331 27/05/05 03:36 PM
Joined: May 2005
Posts: 7
S
SilentShadow Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: May 2005
Posts: 7
I have created complicated scripts such as that, and as for the $1 $2 being other things... That's not how I found it.

;$1 = modes,$nick = User,$chan = Location
ON *:RAWMODE:#: {
var %temp,%i = 0,%x = 1
while (%i < $len($1)) {
inc %i
if ($mid($1,%i,1) == +) { %temp = + | continue }
if ($mid($1,%i,1) == -) { %temp = - | continue }
if (%temp == +) {
if ($mid($1,%i,1) isin beIlLkvhoaq) { inc %x }
;The above line is so you can match the correct word in the $2- part

if ($mid($1,%i,1) == a) {
;Here we have ON PROTECT
;to get the corresponding NICK you would use [ [ $ $+ %x ] ]
}

;End of +
}
if (%temp == -) {
if ($mid($1,%i,1) isin beIkvhoaq) { inc %x }
;Same as before but some don't require/show the following parameter

if ($mid($1,%i,1) == a) {
;Here we have ON DEPROTECT

}

;End of -
}

;End of WHILE
}

;End of EVENT
}


Atleast that's how I was able to manually control all bans and compare them to a list of nick!user@hosts that I personally wouldn't allow smile

I'm just saying that it would be nice to be able to write them like ON *:OP:#:

Meh, thanks for your time


O_O What are YOU looking at?
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121332 27/05/05 03:39 PM
Joined: May 2005
Posts: 7
S
SilentShadow Offline
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
S
Joined: May 2005
Posts: 7
Hehe hi qwerty, nice timing :P

-EDIT-
I have been coding mIRC long enough to know MOST things... Some things I have never heard of...
I have been able to make my own way around things but ... I still wanna make it easier on myself! :P

Last edited by SilentShadow; 27/05/05 03:41 PM.

O_O What are YOU looking at?
Re: custom "ON"s (like the ON *:TEXT:*:#: { } ) #121333 27/05/05 11:53 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Two tips regarding the inc %x check:

1) Use isincs instead of isin, as modes are case sensitive (for example, some network might have a channel mode A that takes no parameters)

2) You can make the script more flexible by using $chanmodes and $nickmode instead of a fixed list of 'known' modes.

So, you can replace
Code:
if ($mid($1,%i,1) isin [color:green]beIlLkvhoaq[/color]) { inc %x }
with
Code:
if ($mid($1,%i,1) isin[color:red]cs[/color] [color:green]$deltok($chanmodes,4-,44) $nickmode[/color]) { inc %x }



and
Code:
if ($mid($1,%i,1) isin [color:blue]beIkvhoaq[/color]) { inc %x }
with
Code:
if ($mid($1,%i,1) isin[color:red]cs[/color] [color:blue]$deltok($chanmodes,3-,44) $nickmode[/color]) { inc %x }


$nickmode is an undocumented identifier similar to $prefix except it returns the mode letters instead of the symblos ("ohv" instead of "@%+" for example)

$chanmode is documented but the help file doesn't explain what each comma-separated token is. v5.9 versions.txt, however, does in item #37 (the full list of version changes can be found here).


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com