mIRC Home    About    Download    Register    News    Help

Print Thread
#83030 15/05/04 05:22 AM
Joined: Dec 2003
Posts: 199
K
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2003
Posts: 199
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...?


Want to Link Servers? PM Me
- EliteIRC.dyndns.org -
#83031 15/05/04 08:23 AM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
My guess would be because you're not stopping the default mode messages.

/!help on mode

#83032 15/05/04 06:38 PM
Joined: Dec 2003
Posts: 199
K
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2003
Posts: 199
It has haltdef in it... smirk


Want to Link Servers? PM Me
- EliteIRC.dyndns.org -
#83033 15/05/04 06:43 PM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Read again what I said..

I said the MODE messages.

Trust me, try /!help on mode

Look there.

#83034 15/05/04 06:47 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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.

Last edited by Zyzzyx26; 15/05/04 06:48 PM.

"All we are saying is give peace a chance" -- John Lennon
#83035 15/05/04 07:11 PM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
/! 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.


New username: hixxy
#83036 15/05/04 07:24 PM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
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.

#83037 15/05/04 07:43 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Oh.. interesting! Thanks for the explanation! smile


Wolfie: Im not sure i understood your last post correctly... sorry smirk


"All we are saying is give peace a chance" -- John Lennon
#83038 15/05/04 09:39 PM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Dude, in plain english, look at the ON MODE event.

Are you halting that? No.
There is your double printing.

#83039 15/05/04 10:02 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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.



"All we are saying is give peace a chance" -- John Lennon
#83040 15/05/04 11:01 PM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
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.

#83041 16/05/04 12:37 AM
Joined: Dec 2003
Posts: 199
K
Vogon poet
OP Offline
Vogon poet
K
Joined: Dec 2003
Posts: 199
Alright:
1) Does it work with bans/unbans/ECT
2) Can someone explain On Rawmode in DETAIL frown


Want to Link Servers? PM Me
- EliteIRC.dyndns.org -
#83042 16/05/04 12:40 AM
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
on rawmode is every channel mode, that includes, +/- b/o/h/v/q/etc +/- m/n/s/t/p/s/etc.


New username: hixxy
#83043 16/05/04 03:06 AM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Use the rawmode - if you want to insist on using the on OP, DEOP, etc, you'll need to use timers and text parsing.

#83044 16/05/04 03:23 AM
Joined: Mar 2004
Posts: 108
X
Vogon poet
Offline
Vogon poet
X
Joined: Mar 2004
Posts: 108
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..


sometimes these are as bad as quit messages :tongue:
#83045 16/05/04 03:57 AM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
No, it's multiple ops/deops/etc that's causing the duplicate lines.

#83046 16/05/04 01:01 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
The on Rawmode is an interesting idea! I hadn't heard about it untill now smile

Zyzzy.


"All we are saying is give peace a chance" -- John Lennon
#83047 17/05/04 05:02 AM
Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
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.


Link Copied to Clipboard