Guest Posted January 25, 2005 Share Posted January 25, 2005 alias mta.findid { var %a = 0 while (%a <= $readini($mta.dir $+ mta.ini,$1,max)) { if $2 isnum { if $mta.name($1,$2) != Unknown { !return $2 } else { var %b = 0 while %b <= $readini($mta.dir $+ mta.ini,$1,max) { if ($+(*,$2,*) iswm $readini($mta.dir $+ $1.ini,ID $+ %b,name)) !return %b !inc %b } !return -1 } } elseif ($+(*,$2,*) iswm $readini($mta.dir $+ $1.ini,ID $+ %a,name)) !return %a !inc %a } !return -1 } on *:SIGNAL:mta.command: { var %b = $iif($4 == $null,$2,$mta.findid($1,$4))) elseif $3 == !ban { if $2 == %b mta.msg $1 $2 Error - You cannot ban you else { if %b == -1 mta.say $1 Error - Invalid ID else { mta.say $1 $+(',$mta.name($1,%b),') is banned by admin $+(',$mta.name($1,$2),':) $iif($5,$5-,No reason.) !writeini -n "MTAbans.ini" banreasons $mta.name($1,%b) $5- $date $time $mta.name($1,$2) !writeini -n "MTAbans.ini" bannedip $mta.name($1,%b) $mta.ip($1,%b) $date $time $mta.name($1,$2) !writeini -n "MTAbans.ini" main $mta.name($1,%b) 4 !writeini -n "data.ini" ip $gettok($mta.ip($1,$2),1-2,46) $mta.name($1,%b) mta.ban $1 %b } } elseif $3 == !blacklist { if %b == -1 mta.say $1 Error - Invalid ID else mta.say $1 $mta.name($1,%b) - Added to the Blacklist !writeini -n "blacklist.ini" $mta.name($1,%b) $mta.ip($1,%b) 1 !writeini -n "blacklist.ini" $mta.name($1,%b) $mta.name($1,%b) 1 !writeini -n "blacklist.ini" $mta.name($1,%b) $gettok($mta.ip($1,$2),1-2,46) 1 mta.ban $1 %b } } } } on *:SIGNAL:mta.join: { if ($gettok($mta.ip($1,$2),1-2,46)) && $readini(data.ini,shortip,$gettok($mta.ip($1,$2),1-2,46)) { mta.say $1 Warning: $mta.name($1,$2) - First 2 ip groups match $readini(data.ini,ip,$gettok($mta.ip($1,$2),1-2,46)), who was banned. $+ } if ($readini(blacklist.ini,$mta.name($1,$2),$mta.ip($1,$2)) == 1) { mta.say $1 $mta.name($1,$2) Reason: Blacklisted mta.ban $1 $2 } if ($readini(blacklist.ini,$mta.name($1,$2),$mta.name($1,$2)) == 1) { mta.say $1 $mta.name($1,$2) Reason: Blacklisted mta.ban $1 $2 } if ($readini(blacklist.ini,$mta.name($1,$2),$gettok($mta.ip($1,$2),1-2,46)) == 1) { mta.say $1 $mta.name($1,$2) Reason: Blacklisted mta.ban $1 $2 } } Link to comment
Quig Posted January 25, 2005 Share Posted January 25, 2005 sry i'm a noob when it comes to scripting just one ? what makes it advanced? Link to comment
Cam. Posted January 25, 2005 Share Posted January 25, 2005 I just skimmed through the code, it looks like it adds a new IP to the blacklist when needed, and if the first two quadrants of someone being on the blacklist mtach, then it will warn you. Link to comment
Quig Posted January 25, 2005 Share Posted January 25, 2005 soooo its pretty much the same as the banning system in place now Link to comment
Cam. Posted January 25, 2005 Share Posted January 25, 2005 Nope, not really. Btw, nice job on it, I'll try it out when I can. Link to comment
Oli Posted January 25, 2005 Share Posted January 25, 2005 its basically a compilation of stuff. The ip match thing is something i wrote in 0.3.. and the findid system is mine too.. and the blacklist thing.. if u wanna call it that is based on a script of aerons i think. Link to comment
Guest Posted January 27, 2005 Share Posted January 27, 2005 its basically a compilation of stuff. The ip match thing is something i wrote in 0.3.. and the findid system is mine too.. and the blacklist thing.. if u wanna call it that is based on a script of aerons i think. can you add it to GRS anyway? Link to comment
Oli Posted January 27, 2005 Share Posted January 27, 2005 ill write my own version of this which provides more information and include it in the next release Link to comment
Jani Posted January 28, 2005 Share Posted January 28, 2005 thanks, can we get a rough projected release date? Link to comment
Recommended Posts