mIRC Home    About    Download    Register    News    Help

Print Thread
Page 2 of 3 1 2 3
#93578 11/08/04 10:56 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
thank you so very much !

#93579 11/08/04 11:02 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
i know i bugg too much :P

but when a user is non mode, it is normal (default colored)
and when i vop him or op him, he dont changes color.

is it possible to change this ?

#93580 11/08/04 11:03 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
You're welcome smile If you use this code and that one I posted above, you will achieve what you wanted smile

Code I posted above:
Code:
On *:TEXT:*:#: {
 if ($nick isop #) { echo 12 -mtbfl # $+(<,$nick,>) $1- }
 if ($nick isvoice #) { echo 3 -mtbfl # -mtbfl $chan $+(<,$nick,>) $1- }
}


Have fun! smile
Zyzzy


"All we are saying is give peace a chance" -- John Lennon
#93581 11/08/04 11:06 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
yes smile You can either /hop the channel or add this code:

Code:
on *:OP:#: cline 12 # $opnick
on *:DEOP:#: cline 1 # $opnick
on *:VOICE:#: cline 3 # $vnick
on *:DEVOICE:#: cline 1 # $vnick
No bugs on this one, I hope wink

Zyzzyx smile

Last edited by Zyzzyx26; 11/08/04 11:07 PM.

"All we are saying is give peace a chance" -- John Lennon
#93582 11/08/04 11:32 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
i have some problems here:

on *:OP:#: {
if ($opnick isvoice #) cline 12 # $opnick
if ($opnick ishop #) cline 12 # $opnick
else cline 12 # $opnick
}


on *:DEOP:#: {
if ($opnick isvoice #) cline 3 # $opnick
if ($opnick ishop #) cline 11 # $opnick
else cline 1 # $opnick
}

on *:VOICE:#: {
if ($vnick isop #) cline 12 # $vnick
if ($vnick ishop #) cline 11 # $vnick
else cline 3 # $vnick
}


on *:DEVOICE:#: {
if ($vnick isop #) cline 12 # $vnick
if ($vnick ishop #) cline 11 # $vnick
else cline 1 # $vnick
}


If nick is opped and i give him voice it become green altho in code it is specifited to stay blue, when i deop nick that is green it becomes black (default) even if it is voiced and it shoud be green

If nick is voiced, and then opped and i devoice him it stays opped with no color even it is specifited that stays blue

what is wrong here?

#93583 12/08/04 12:10 AM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
on *:OP:#: cline 12 # $opnick
on *:DEOP:#: {
 if ($opnick ishop #) { cline 11 # $opnick }
 elseif ($opnick isvoice #) { cline 3 # $opnick }
 else { cline 1 # $opnick }
}
on *:VOICE:#: {
 if ($vnick ishop #) { cline 11 # $vnick }
 elseif ($vnick isop #) { cline 12 # $vnick }
 else { cline 3 # $vnick }
}
on *:DEVOICE:#: {
 if ($vnick ishop #) { cline 11 # $vnick }
 elseif ($vnick isop #) { cline 12 # $vnick }
 else { cline 1 # $vnick }
}
on *:HELP:#: {
 if ($hnick isop #) { cline 12 # $hnick }
 else { cline 11 # $hnick }
}
on *:DEHELP:#: {
 if ($hnick isop #) { cline 12 # $hnick }
 elseif ($hnick isvoice #) { cline 3 # $hnick }
 else { cline 1 # $hnick }
}
Hope this works smile

Zyzzy


"All we are saying is give peace a chance" -- John Lennon
#93584 12/08/04 01:13 AM
Joined: Nov 2003
Posts: 257
A
Fjord artisan
Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
lol

i thought you only wanted it for the events you saw in the channel

#93585 12/08/04 03:19 AM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
heeee it works perfect now !

just 1 tiny question...
since mirc cannot detect uop (user op) by default as $hnick $vnick, is it possible thru script to do it ?

if yes, how ?

#93586 12/08/04 07:46 AM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
$nick(#,N/nick,aohvr,aohvr)
Returns Nth nickname in the channels nickname listbox on channel #.

Both aohvr parameters are optional. The first specifies which nicks you'd like included, and the second specifies the nicks you'd like excluded, where:
a = all nicks, o = ops, h = halfops, v = voiced, r = regular



but also other mode characters work



Code:
//if ( khaled isgod ) echo yes | else echo no
#93587 12/08/04 10:28 AM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
so how would i include uop with this (above) code ?

if there is no such On UOP mode ?

#93588 12/08/04 04:40 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
I'm not sure of what you're talking about... what is UOP? Is it a user mode, like @ and +v?

If it is, you can use the on RAWMODE event.
I will use the letter q as the UOP letter, like o is @Op and v is +voice, but you must change the q's in red for the actual letter of the user mode
Code:
on *:RAWMODE:#: {
 var %modes = $remove($1,-,+)
 var %x = $numtok($2-,32)
 while (%x) {
  var %i = $len(%modes)
  while (%i) {
    if ([color:red]q[/color] == $mid(%modes,%i,1) && ($left($1,1) == -) { 
    if ($gettok($2-,%i,32) isop $chan) { cline 12 # $gettok($2-,%i,32) }
    elseif ($gettok($2-,%x,32) ishop $chan) { cline 11 # $gettok($2-,%x,32) }
    elseif ($gettok($2-,%x,32) svoice $chan) { cline 3 # $gettok($2-,%x,32) }
    else { cline [color:blue]UOP Color[/color] # $gettok($2-,%x,32) }
    }
    if ([color:red]q[/color] == $mid(%modes,%i,1) && ($left($1,1) == +) { 
   [color:green] ; I am assuming the UOP mode is a LOWER mode than OP
    ; but HIGHER than Half Op and voice[/color]
     if ($gettok($2-,%x,32) isop $chan) { cline 12 # $$gettok($2-,%x,32) } 
     else { cline [color:blue]UOP Color[/color] # $gettok($2-,%x,32) }
   }
   dec %i
  }
dec %x
 }
}    
This is not tested, so please let me know how it goes smile

Zyzzyx smile

Last edited by Zyzzyx26; 12/08/04 04:41 PM.

"All we are saying is give peace a chance" -- John Lennon
#93589 12/08/04 07:15 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
uop is lower than voice
so itz like this:

@ Op
% Hop
+ voice
- uop
normal user

so dunno what shloud be changed here coz you assumed itz above hop and vop

and i get error on this line:

"* /if: invalid format"

if (q == $mid(%modes,%i,1) && ($left($1,1) == -) {

Last edited by ShinZon; 12/08/04 08:14 PM.
#93590 12/08/04 08:17 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Then it should look like this:
Remember to change the q's for the actual UOP letter!!
Code:
on *:RAWMODE:#: {
 var %modes = $remove($1,-,+)
 var %x = $numtok($2-,32)
 while (%x) {
  var %i = $len(%modes)
  while (%i) {
    if ([color:red]q[/color] == $mid(%modes,%i,1) && ($left($1,1) == -) { 
     if ($gettok($2-,%i,32) isop $chan) { cline 12 # $gettok($2-,%i,32) }
     elseif ($gettok($2-,%x,32) ishop $chan) { cline 11 # $gettok($2-,%x,32) }
     elseif ($gettok($2-,%x,32) isvoice $chan) { cline 3 # $gettok($2-,%x,32) }
     else { cline UOP Color # $gettok($2-,%x,32) }
    }
    if ([color:red]q[/color] == $mid(%modes,%i,1) && ($left($1,1) == +) { 
      if ($gettok($2-,%x,32) isop $chan) { cline 12 # $$gettok($2-,%x,32) } 
      elseif ($gettok($2-,%x,32) ishop $chan) { cline 11 # $$gettok($2-,%x,32) } 
      elseif ($gettok($2-,%x,32) isvoice $chan) { cline 3 # $$gettok($2-,%x,32) }
      else { cline UOP Color # $gettok($2-,%x,32) }
    }
  dec %i
  }
dec %x
 }
}

And just out of curiosity.. what is UOP's letter? smile

Zyzzy


"All we are saying is give peace a chance" -- John Lennon
#93591 12/08/04 08:21 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
/mode #chan +u nickname

so itz "u"

prefix is "-"

so in listbox itz

@nickname
%nickname
+nickname
-nickname

#93592 12/08/04 08:26 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Ok then, just replace those red q's for the u smile


"All we are saying is give peace a chance" -- John Lennon
#93593 12/08/04 08:27 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
i stll get error here:

if (u == $mid(%modes,%i,1) && ($left($1,1) == -) {

i changed q to u
and added color 10 for uop and it wont color it into 10 but it stays as normal (white)


Last edited by ShinZon; 12/08/04 08:35 PM.
#93594 12/08/04 08:37 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Code:
on *:RAWMODE:#: {
  var %modes = $remove($1,-,+)
  var %x = $numtok($2-,32)
  while (%x) {
    var %i = $len(%modes)
    while (%i) {
      if (u == $mid(%modes,%i,1)[color:red])[/color] && ($left($1,1) == -) { 
        if ($gettok($2-,%i,32) isop $chan) { cline 12 # $gettok($2-,%i,32) }
        elseif ($gettok($2-,%x,32) ishop $chan) { cline 11 # $gettok($2-,%x,32) }
        elseif ($gettok($2-,%x,32) isvoice $chan) { cline 3 # $gettok($2-,%x,32) }
        else { cline 13 # $gettok($2-,%x,32) }
      }
      if (u == $mid(%modes,%i,1)[color:red])[/color] && ($left($1,1) == +) { 
        if ($gettok($2-,%x,32) isop $chan) { cline 12 # $$gettok($2-,%x,32) } 
        elseif ($gettok($2-,%x,32) ishop $chan) { cline 11 # $$gettok($2-,%x,32) } 
        elseif ($gettok($2-,%x,32) isvoice $chan) { cline 3 # $$gettok($2-,%x,32) }
        else { cline [color:blue]1[/color] # $gettok($2-,%x,32) }
      }
      dec %i
    }
    dec %x
  }
}
There were 2 parentheses missing there :P Also, that 1 in blue should be there, instead of the UOP color. This code I'm almost sure it works laugh

Tell me if it does!
Zyzzy


"All we are saying is give peace a chance" -- John Lennon
#93595 12/08/04 08:42 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
combined with /names raw and ON deop, help, voice... events it works, BUT since uop doesn thave ON UOP event, while having uop mode and opped or voiced, then deoped or devoiced instead uop color it returns to normal color

is it possible to make ON event for UOP too ?

#93596 12/08/04 09:02 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
No, its not possible to create an on UOP mode. The on Rawmode is the best you can have.

This code by starbucks mafia might help you! smile

Good luck!

Zyzzyx.


"All we are saying is give peace a chance" -- John Lennon
#93597 12/08/04 09:18 PM
Joined: Jul 2004
Posts: 169
S
ShinZon Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jul 2004
Posts: 169
i thank you very very much for helping me in this !

add: is it possible then just to detect preffix infront of nickname
like:

on deop IF + is infront then do something ?

Last edited by ShinZon; 12/08/04 09:19 PM.
Page 2 of 3 1 2 3

Link Copied to Clipboard