Hey Epic, hope you are doing well.
As discussed yesterday, i am attaching the code here:
================================= code 1 ==================================== alias bos { /ban # $nick 2 | /kick # $nick you are banned! //write scripts\Abuse.txt $replace($address($nick,5),!,$chr(32),@,$chr(32)) } ================================= code 2 ==================================== on *:JOIN:#:{ var %ident $remove($gettok($address($nick,5),1,64),$nick $+ !) var %host $gettok($address($nick,5),2,64) var %c 1, %l $lines(scripts\Abuse.txt) while (%c <= %l) { var %line $read(scripts\Abuse.txt,%c) if ($findtok(%line,$nick,0,32) || $findtok(%line,%ident,0,32) || $findtok(%line,%host,0,32)) { mode # +b $+($nick,!*@*) kick # $nick [Banned] Oh i know u! } inc %c 1 } }
1. /bos $nick = this will trigger a manual ban on a nick
2. i want the banned nick to be written automatically in abuse.ini or abuse.txt or abuse.hsh file
3. the code 2 will automatically retireve the banned ip from abuse.ini or abuse.txt or abuse.hsh file whenever that nick/ip joins the channel
4. the code 2 will automatically ban the nick/ip on arrival
what i wish to do:
code 1
Alias: if a manual ban is placed in any channel using /bos $nick, the ip address of that particular host should be saved in a file eg. ipaddress.txt or ipaddress.ini or ipaddress.hsh (maroon recommended me to use hash file instead of txt or ini file)
code 2
Remote: this code should automatically scan the joining host in any channel and match it with the ip addresses stored in ipaddress.txt or ini or hsh file. if found to be in the list then this code should automatically kick/ban the host.
Reason for this code : Ban list of any given channel is limited. each time an abuser joins in and gets banned then the ip address of that particular host gets unbanned after a while or day. that same abuser can then rejoin the channel and abuse again until another ban is placed on them. the sole purpose of this code is to automatically add the ip address of any abuser into the list of blocked users and ban them right on sight when they attempt to rejoin. I could have used a normal blacklist for this purpose but it takes a lot of time to add the ip address into the list just to keep the abusers out of the channel.
couple of additions i would love to see : maybe a dialogue box from where i can add or delete an ip address manually if needed which should run in tandem with the ipaddress.txt or ini or hsh file. A host specific custom kick msg would do wonders as the mods would be able to recognize the host as per their behavior. eg. given below :-
abuser 1 : /kick # $1 you are an abuser
abuser 2 : /kick # $1 you have been spamming in this channel since long
abuser 3 : /kick # $1 you are a pedophile and are not welcomed in.
Problems : the network to which i belong always cloak an ip address for privacy. so, essentially, the ipaddress.txt or ini or hsh file would only contain a cloaked host and not actual ip address in numbers.
do let me know if you have questions regarding this. i would be glad to respond :D
Thanks mah man!
Stay awesome!
Sleepyhead