mIRC Homepage
Posted By: Kriminal ON Problem - 15/05/04 05:22 AM
on ^*:op:#:echo $chan $timestamp2 %theme.color $+ - $+ 0--  $+ $nick $+  sets mode: $+  $+ %theme.color $1 %theme.color2 $+ $2- $+  | haltdef
on ^*:deop:#:echo $chan $timestamp2 %theme.color $+ - $+ 0--  $+ $nick $+  sets mode: $+  $+ %theme.color $1 %theme.color2 $+ $2- $+  | haltdef
on ^*:help:#:echo $chan $timestamp2 %theme.color $+ - $+ 0--  $+ $nick $+  sets mode: $+  $+ %theme.color $1 %theme.color2 $+ $2- $+  | haltdef
on ^*:dehelp:#:echo $chan $timestamp2 %theme.color $+ - $+ 0--  $+ $nick $+  sets mode: $+  $+ %theme.color $1 %theme.color2 $+ $2- $+  | haltdef
on ^*:voice:#:echo $chan $timestamp2 %theme.color $+ - $+ 0--  $+ $nick $+  sets mode: $+  $+ %theme.color $1 %theme.color2 $+ $2- $+  | haltdef
on ^*:devoice:#:echo $chan $timestamp2 %theme.color $+ - $+ 0--  $+ $nick $+  sets mode: $+  $+ %theme.color $1 %theme.color2 $+ $2- $+  | haltdef
Hi, If I do this:
/mode #Channel +oo Nick1 Nick2
It echos this exactly:
blah blah sets mode: +oo Nick1 Nick2
blah blah sets mode: +oo Nick1 Nick2
It does it twice ect. How can I fix this...?
Posted By: Wolfie Re: ON Problem - 15/05/04 08:23 AM
My guess would be because you're not stopping the default mode messages.

/!help on mode
Posted By: Kriminal Re: ON Problem - 15/05/04 06:38 PM
It has haltdef in it... smirk
Posted By: Wolfie Re: ON Problem - 15/05/04 06:43 PM
Read again what I said..

I said the MODE messages.

Trust me, try /!help on mode

Look there.
Posted By: Zyzzyx26 Re: ON Problem - 15/05/04 06:47 PM
From the help file of /help on mode:

The on MODE event triggers when a user changes a channel mode.
Note: These events only trigger on channel mode changes not user mode changes such as ops, bans, etc.


But i dont see any problem with the code, so i have no idea why it shows it twice smirk

BTW, i've always wondered why the ! in the commands, like /!remote off or /!help.... why do you put it for? smile

Zyzzy.
Posted By: tidy_trax Re: ON Problem - 15/05/04 07:11 PM
/! means it calls the internal alias, for example:

alias echo { echo -a hello }

//echo -a $time - this will echo 'hello'.
//!echo -a $time - this will echo whatever $time is.

Kriminal:

Code:
on ^*:rawmode:#:{
  echo $chan $timestamp2 %theme.color $+ - $+ 0--  $+ $nick $+  sets mode: $+  $+ %theme.color $1 %theme.color2 $+ $2- $+  
  haltdef
}


No need for on op, on voice, etc.
Posted By: Wolfie Re: ON Problem - 15/05/04 07:24 PM
Does your script catch limit changes? What about bans?

There's more to modes than just opping/deopping and the like.

You would need to parse the mode command as well and halt that.

Try it.
Posted By: Zyzzyx26 Re: ON Problem - 15/05/04 07:43 PM
Oh.. interesting! Thanks for the explanation! smile


Wolfie: Im not sure i understood your last post correctly... sorry smirk
Posted By: Wolfie Re: ON Problem - 15/05/04 09:39 PM
Dude, in plain english, look at the ON MODE event.

Are you halting that? No.
There is your double printing.
Posted By: Zyzzyx26 Re: ON Problem - 15/05/04 10:02 PM
I've looked in the help for the on Mode, and also in the on OP and on BAN and etc..

The on Mode only gets channel modes right? Kriminal said that when the user mode o (@op) was changed, he got the message twice
Quote:
Hi, If I do this:
/mode #Channel +oo Nick1 Nick2
It echos this exactly:
blah blah sets mode: +oo Nick1 Nick2
blah blah sets mode: +oo Nick1 Nick2
It does it twice ect. How can I fix this...?
The on Mode might help if they were trying to change the channel modes (mntlsp and others), but in the example they gave in the 1st post, they mentioned the user mode +o.

Also, all the code they posted were user modes.. and, of what i could understand from the help file, the on Mode only responds to channel modes.

Kriminal: I have tested it here and it happens the same thing. The script is responding to each OP event. It this case, you've got 2 op events... Nick1 and Nick2. The identifier $1 goes for the mode and $2-, for the nicks (as i could understand by testing the script).

So the script responds twice because there was 2 op events, but each of those times it shows all the nicks that got opped.

I've tested tidy_trax's script, and it works fine! You can also user $opnick ($vnick and $hnick for voice and help, respectively) instead of $2-, but it will show as many lines as the number of $opnicks

I dont know if i made myself clear.. it sounds messy to me :P The thing is that tidy_trax's script works and it doesnt repeat lines.

Greetings, Zyzzy.

Posted By: Nobodi Re: ON Problem - 15/05/04 11:01 PM
have a look at "on rawmode" as 'on op" will echo the line once for each nick that is oped, if three nicks were oped at the one time it would echo three times.
Posted By: Kriminal Re: ON Problem - 16/05/04 12:37 AM
Alright:
1) Does it work with bans/unbans/ECT
2) Can someone explain On Rawmode in DETAIL frown
Posted By: tidy_trax Re: ON Problem - 16/05/04 12:40 AM
on rawmode is every channel mode, that includes, +/- b/o/h/v/q/etc +/- m/n/s/t/p/s/etc.
Posted By: Wolfie Re: ON Problem - 16/05/04 03:06 AM
Use the rawmode - if you want to insist on using the on OP, DEOP, etc, you'll need to use timers and text parsing.
Posted By: xxxYODAxxx Re: ON Problem - 16/05/04 03:23 AM
If nothing else.... Might be a dumb reply.. but.. do you have it doubled up.. another script doing the same thing.. I have done it before.. hehe..
Posted By: Wolfie Re: ON Problem - 16/05/04 03:57 AM
No, it's multiple ops/deops/etc that's causing the duplicate lines.
Posted By: Zyzzyx26 Re: ON Problem - 16/05/04 01:01 PM
The on Rawmode is an interesting idea! I hadn't heard about it untill now smile

Zyzzy.
Posted By: Wolfie Re: ON Problem - 17/05/04 05:02 AM
Hey, could get complex and usage timers and hash tables to do it all...

ex: when detecting an opping, add a name to the list, etc, set up a timer for like 100ms to display it, so that all other ops/deops/etc also get parsed and then it all gets displayed when the timer kicks in.
smile
But even that gets tricky.
© mIRC Discussion Forums