mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Nov 2021
Posts: 115
Simo Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Nov 2021
Posts: 115
Greetingz Gentz ,

does anyone know of a proper way to remove -k key outputs regardless where they are in the output of this and have only the rest of the cmodes pass throu in the same line to output :

regardless where it is found like:

-kv+o key nick nick
+h-kv nick key nick

and so on.



Code

ON ^*:RAWMODE:#:{ echo -t $chan $nick Sets Mode on $chan to: $strip($1-,bcru) | haltdef }



Thanks in advance much apreciated.

Joined: Jan 2012
Posts: 323
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 323
Try using this script code:
Code
on ^*:RAWMODE:#:{ echo -t $chan $nick sets mode on $chan to: $hidekey($1-) | haltdef }
alias -l hidekey { tokenize 32 $1- | return $1 $deltok($2-,$pos($remove($1,-,+),k),32) }


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples
Joined: Nov 2021
Posts: 115
Simo Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Nov 2021
Posts: 115
Thanks epic ive tried it but it doesnt seem to strip the key and cmode for key but since the channel bot that uses this always uses a fixed key i used that and that stripped both cmode for key and the key itselve so it seems fine now.

Thanks Epic much apreciated as always.

Joined: Jan 2012
Posts: 323
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Jan 2012
Posts: 323
When translating your request into Russian language and view the provided code, it seemed to me that you wanted to do something similar to display in your mIRC.

The channel operator executes the command: /mode #channel +h-kv nick1 key12345 nick2

All channel users will see this message: * @Admin sets mode: +h-kv nick1 key12345 nick2
You will see a message like this: * @Admin sets mode: +h-kv nick1 nick2

That is, this script removes the secret key of the channel from the message about set modes. In this case, this will work if this channel key was previously set and can now be unset. The same will be displayed when set the channel key. But hiding the key will only work for those users who have this script code installed, since this message is sent to the chat from the server/services side and you will not be able to change the display of its outgoing data for other users.

Although I would prefer, instead of deleting, to simply replace the key with inscription: * @Admin sets mode: +h-kv nick1 [hide-key] nick2

If I misunderstood your idea and something needs to be fix/changed in this code - let me know about it in a new comment.

    [Linked Image from i.ibb.co]


🌐 http://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples

Link Copied to Clipboard