mIRC Home    About    Download    Register    News    Help

Print Thread
#136926 05/12/05 07:02 PM
Joined: Mar 2005
Posts: 5
R
rOglrah Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
R
Joined: Mar 2005
Posts: 5
I don't know if this topic is related to the scripts forum, because maybe there's a way threw the channel options. Anyway, I don't know about such thing.
Is there any way to allow ops only to write in color in my channel?

Thanks in advanced.

Joined: Aug 2005
Posts: 525
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2005
Posts: 525
As far as I know, there is no way to do that other than possibly kick users who uses colors. In that case...

Code:
on @*:text:*:[color:red]#YourChannel[/color]:{
  if ($chr(3) isin $1- && $nick !isop #) { kick # $nick }
}

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
On ^@*:Text:*:#: {
  if ($chr(3) isin $1- || $chr(3) !isin $1-) {
    var %ct = $chan, %dt = echo -t %ct $+(<,$nick,>) $1-
    if ($nick isop %ct) %dt
    else {
      $replace(%dt,$1-,$strip($1-))
    }
  }
  haltdef
}


Or schaefer31's way if you want to kick the users. smile

-Andy

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
To do this the way I think you want it, you'd have to edit the ircd (server) code. There would need to be a channel mode that only allows ops to use colors.

The server I'm on has 2 modes to deal with colors in channels. Channel mode +S strips all color codes from incoming text and then displays the uncolored message. Channel mode +c completely blocks any text that has colors in it.

-genius_at_work

Joined: Apr 2003
Posts: 701
K
Hoopy frood
Offline
Hoopy frood
K
Joined: Apr 2003
Posts: 701
(A || not A) is just the same as $true, so I hope you meant something else smile

Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Kelder is correct, the first if-statement always evaluates to $true, and it is also unnecessary. If there is a color code present, it will be stripped out by $strip, otherwise nothing will be removed. I altered the $strip command in the example to only remove color codes (that's all that was asked).

Code:
on ^*:TEXT:*:#: {
  echo -t $chan $+(<,$nick,>) $iif($nick isop $chan,$1-,$strip($1-,[color:red]c[/color]))
  haltdef
}
}


-genius_at_work


Link Copied to Clipboard