Author Topic: Block a bot  (Read 1156 times)

I saw too many people complaining about chatbots and how they are irritating and the rest.
So I threw together a little script that should stop the majority of them:


// Chatboticide
//  For those annoying little bots


package blockDemBots
{
    function serverCmdMessageSent(%client, %message)
    {
        %pos = strPos(%message, ":");
        if(!%pos < 1)
        {
            %message = strLwr(%message);
            if(getSubStr(%message, %pos - 3, 3) $= "bot")
            {
                commandToClient(%client, 'messageBoxOK', "No Bots!", "You are not allowed to use irritating chatbots on this server");
                return;
            }
        }
        return parent::serverCmdMessageSent(%client, %message);
    }
};
activatePackage(blockDemBots);


I made this topic because it's not worth releasing as a proper add-on, more of a resource; this basically stops any chat-bot using the form "*bot: blah blah" from being posted in chat and also sends them a message. Hope this is useful

also:

Don't forget this little part!
Code: [Select]
package BlockWelcomeBot
{
function serverCmdMessageSent(%c,%m)
{
%tempmsg = getSubStr(%m,0,strLen(%m)-1);
%tempmsg = getWord(%m,1);
for(%x=0;%x<ClientGroup.getCount();%x++)
if(%tempmsg $= ClientGroup.getObject(%x).getPlayername() && ClientGroup.getObject(%x).joinTime+0.3 > getSimTime()/1000)
{
commandToClient(%client, 'messageBoxOK', "No Bots!", "You are not allowed to use irritating chatbots on this server");
return;
}
return parent::serverCmdMessageSent(%c,%m);
}
function GameConnection::autoAdminCheck(%c)
{
%c.jointime = getSimTime()/1000;
return Parent::autoAdminCheck(%c);
}
};
activatePackage(BlockWelcomeBot);

Stops people from saying "____ <name>" when <name> has just joined the server. Effectively blocking greeting bots.
Some market research right there
Chat bots are just plain pointless and annoying, the advanced chat bots are just so loving stupid.
Whenever I see someone's messages starting with "_____Bot:", I add the bot's name to the e-tard list.
Clientside bots are loving annoying.

Badspot should find a way to make them no longer function (if possible without locking up important parts of the engine).
But nobody wants another chatbot ._.
« Last Edit: March 27, 2012, 11:24:15 AM by Fluff-is-back »


Thank you very much.

Chat bots have no sense
I used mine to learn very basic scripting
Then I used it to automaticly eval useless functions
Then I realised how stupid that way is
Then I deleted it

To go around that script, simple make the bot say Blahbot says blah or something

To go around that script, simple make the bot say Blahbot says blah or something
There's a truckload of ways around it. :/

There's a truckload of ways around it. :/
It just blocks against the way the majority of them are made.

Don't forget this little part!
Code: [Select]
package BlockWelcomeBot
{
function serverCmdMessageSent(%c,%m)
{
%tempmsg = getSubStr(%m,0,strLen(%m)-1);
%tempmsg = getWord(%m,1);
for(%x=0;%x<ClientGroup.getCount();%x++)
if(%tempmsg $= ClientGroup.getObject(%x).getPlayername() && ClientGroup.getObject(%x).joinTime+0.3 > getSimTime()/1000)
{
commandToClient(%client, 'messageBoxOK', "No Bots!", "You are not allowed to use irritating chatbots on this server");
return;
}
return parent::serverCmdMessageSent(%c,%m);
}
function GameConnection::autoAdminCheck(%c)
{
%c.jointime = getSimTime()/1000;
return Parent::autoAdminCheck(%c);
}
};
activatePackage(BlockWelcomeBot);

Stops people from saying "____ <name>" when <name> has just joined the server. Effectively blocking greeting bots.

Don't forget this little part!
Code: [Select]
package BlockWelcomeBot
{
function serverCmdMessageSent(%c,%m)
{
%tempmsg = getSubStr(%m,0,strLen(%m)-1);
%tempmsg = getWord(%m,1);
for(%x=0;%x<ClientGroup.getCount();%x++)
if(%tempmsg $= ClientGroup.getObject(%x).getPlayername() && ClientGroup.getObject(%x).joinTime+0.3 > getSimTime()/1000)
{
commandToClient(%client, 'messageBoxOK', "No Bots!", "You are not allowed to use irritating chatbots on this server");
return;
}
return parent::serverCmdMessageSent(%c,%m);
}
function GameConnection::autoAdminCheck(%c)
{
%c.jointime = getSimTime()/1000;
return Parent::autoAdminCheck(%c);
}
};
activatePackage(BlockWelcomeBot);

Stops people from saying "____ <name>" when <name> has just joined the server. Effectively blocking greeting bots.
What about those of us who greet people we know like that?

fun fact for the people with bots like me:

turn them into a GUI interface, it seems more effective AND doesn't spam the whole server while you're using it. Also this gives you bot lovers a target to make your first GUI.

RESULT.

What about those of us who greet people we know like that?
If you can greet them using their exact name in less than 0.3 seconds let me know.
There's also a problem I overlooked, spaces in names.

If you can greet them using their exact name in less than 0.3 seconds let me know.
There's also a problem I overlooked, spaces in names.
Woop, I missed that time thing.
I'll laugh if someone just sets a delay to a chatbot.

Woop, I missed that time thing.
I'll laugh if someone just sets a delay to a chatbot.
If someone intentionally bypasses something you're trying to block, that warrants punishment.