Hi, I have been working on a TCL Script for an eggdrop bot v1.6.18 for a while now and seemed okay. It is a script that I made to have the bot temporary ban and kick users that post URL links to fraudulent websites, which is this.
Code: Select all
bind pubm -|U "*://testtesttest.com*" badurl
bind pubm -|U "*://*.testesttest.com*" badurl
proc badurl {nick uhost hand chan arg}
newchanban $chan *!*[string trimleft $uhost ~] Badurl Ban 10
putquick "KICK $chan $nick :Banned: Posting links to fraudulent sites is not welcomed here"
}
The -|U is because I was using the script with a user entry for all users with the +U channel flag only for whatever channel this script is active in and has *!*@* for the host, which is so that I could except users by adding users with hosts that don't have the +U channel flag in case if I have to add a wildcarded entry for a large group of domains. Then I noticed that there was a slight issue. What if someone had the URL testtesttest.com.br that isn't fraudulent. So, I went to make some changes to try to solve that a bit which it is now this.
Code: Select all
bind pubm -|U "*://testtesttest.com/*" badurl
bind pubm -|U "*://*.testesttest.com/*" badurl
bind pubm -|U "*://testesttest.com" badurl
bind pubm -|U "*://*.testesttest.com" badurl
proc badurl {nick uhost hand chan arg}
newchanban $chan *!*[string trimleft $uhost ~] Badurl Ban 10
putquick "KICK $chan $nick :Banned: Posting links to fraudulent sites is not welcomed here"
}
This, I thought had solved that issue after I have restarted the bot since that it appeared that
www.testtesttest.com.br no longer matches a bind. Apparently, when I went to test it in the testing channel by having another userr joining that was also me and entered
http://www.testtesttest.com.br it did the temporary kick ban. So, right now I do not know what the problem is because that should not have matched it anymore. The above code does not have the actual domains that I have listed on it as it is just to show what the script looks like. And it is pretty long too and adds a bind on the bot for each entry I have.
I also have tried to temporary change the pubm to pub (restarting the bot on each change I made to it) and the bot does nothing when testing the script in the testing channel. [/code]