Replace text from with a command (badwords.conf)?

If your UnrealIRCd is up and running but you have a question about it, then use this forum.
(NOT for installation or connecting issues! Use the other forum instead.)

Moderator: Supporters

Post Reply
NinjaSnickers
Posts: 1
Joined: Tue Aug 02, 2022 1:28 pm

Replace text from with a command (badwords.conf)?

Post by NinjaSnickers »

Hello, I'm looking for a way to avoid certain words (e.g: !bot_commands) to be displayed for more than the user writing the command. I have been messing around a bit with the "badword"-block trying to replace a command with another command to try to force the command to be sent as a private message to the bot in the channels, but i haven't succeeded and i don't know if it's doable at all or with some modifications, I'll give you an example of what i mean below:

Code: Select all

# A working example, will replace the botcommand with another string for other users

badword channel {
        word !command;
        replace "I'm typing a command!";
}

# What i would like is to be able to force a user to send the botcommand in a /msg BotName
# private message to the bot directly and therefore hide the command in the channel like:

badword channel {
        word !command2;
        replace "PRIVMSG MyIRCBot :!command2";
}
As you probably can guess this just results in the message being translated as is, have been trying to format it in various different ways and have tried "/msg" etc too with no luck. Is this something that's even doable (maybe with some modifications)?

Any tips/suggestions are welcome :) Thanks on beforehand!
CrazyCat
Posts: 174
Joined: Thu Apr 28, 2005 1:05 pm
Location: France
Contact:

Re: Replace text from with a command (badwords.conf)?

Post by CrazyCat »

You can't use badword with this way, as the text (message) is modified, not its channel (channel means the destination).
Badword only does a text substitution, not a reorientation.
You'll need a dedicated module to do what you want
Post Reply